Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#	$NetBSD: mk.gumstix,v 1.7 2019/05/18 08:49:23 skrll Exp $

.if ${BOARDTYPE} == "gumstix"
SYSTEM_FIRST_OBJ=	gumstix_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/gumstix/gumstix_start.S

KERNEL_BASE_PHYS=0xa0200000
MKUBOOTEXTRAARGS=
.else
SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S

KERNEL_BASE_PHYS=$(LOADADDRESS)
MKUBOOTEXTRAARGS=	-O linux
.endif

_OSRELEASE!=            ${HOST_SH} $S/conf/osrelease.sh

KERNEL_BASE_VIRT=$(LOADADDRESS)

MKUBOOTIMAGEARGS=	-A arm -T kernel ${MKUBOOTEXTRAARGS}
MKUBOOTIMAGEARGS+=	-a $(KERNEL_BASE_PHYS)
MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@ $@.bin; \
	${OBJCOPY} -S -O binary $@ $@.bin; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
	echo ${TOOL_GZIP} -c $@.bin > $@.bin.gz; \
	${TOOL_GZIP} -c $@.bin > $@.bin.gz; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub

#
# U-boot that operates with old basix/connex has some bugs.
#
.if ${BOARDTYPE} == "gumstix"
	#
	# These not have expanding buffer over 4Mbyte. (before version 1.1.5)
	# And these cannot handle the endian of entry point. (1.1.4 and older)
	#
SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE:C/((-a (0x)*)([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2}))/\1 -e \3\7\6\5\4/W} $@.bin $@-old.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE:C/((-a (0x)*)([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2}))/\1 -e \3\7\6\5\4/W} $@.bin $@-old.ub
.endif
SYSTEM_LD_TAIL_EXTRA+=; \
	echo

EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.gz@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gz.ub@}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}-old.ub@}