Module Name:    src
Committed By:   jakllsch
Date:           Wed Nov 30 20:00:40 UTC 2011

Modified Files:
        src/sys/arch/evbarm/conf: mk.mv2120

Log Message:
Explain the reasoning behind the load-time memory layout.
Only build kernels the MV2120 can boot.
Use mkubootimage -E.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.mv2120

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/mk.mv2120
diff -u src/sys/arch/evbarm/conf/mk.mv2120:1.1 src/sys/arch/evbarm/conf/mk.mv2120:1.2
--- src/sys/arch/evbarm/conf/mk.mv2120:1.1	Wed Jul 20 22:53:38 2011
+++ src/sys/arch/evbarm/conf/mk.mv2120	Wed Nov 30 20:00:39 2011
@@ -1,41 +1,33 @@
-#	$NetBSD: mk.mv2120,v 1.1 2011/07/20 22:53:38 jakllsch Exp $
+#	$NetBSD: mk.mv2120,v 1.2 2011/11/30 20:00:39 jakllsch Exp $
 
 SYSTEM_FIRST_OBJ=	marvell_start.o
 SYSTEM_FIRST_SFILE=	${THISARM}/marvell/marvell_start.S
 
 _OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh
 
+#
+# MV2120 U-Boot is 1.1.4.
+#
+# This version cannot uncompress (or relocate?) images larger than 4Mbyte.
+# It also requires the entry point to be byte-swapped (or maybe just in
+# network byte order, this is a LE machine).
+#
+# U-Boot is already consuming the first 4MiB of memory, our image header
+# is 0x40 bytes.  Hence we load the image at 0x400000 and enter at 0x400040.
+#
+
+UIMAGE_BASE_PHYS=0x00400000
 KERNEL_BASE_PHYS=0x00400040
 KERNEL_BASE_VIRT=0xc0400040
 
 MKUBOOTIMAGEARGS=	-A arm -T kernel
-MKUBOOTIMAGEARGS+=	-a 0x00400000 -e 0x40004000 #byteswapped entry
+MKUBOOTIMAGEARGS+=	-a ${UIMAGE_BASE_PHYS} -E ${KERNEL_BASE_PHYS}
 MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
 MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
-MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz
 
-#
-# 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)
-#
-# MV2120 U-Boot is 1.1.4.
-#
 SYSTEM_LD_TAIL_EXTRA+=; \
-	echo ${OBJCOPY} -S -O binary $@ [email protected]; \
 	${OBJCOPY} -S -O binary $@ [email protected]; \
-	echo gzip -c [email protected] > [email protected]; \
-	gzip -c [email protected] > [email protected]; \
-	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} [email protected] [email protected]; \
-	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} [email protected] [email protected]; \
-	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} [email protected] [email protected]; \
-	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} [email protected] [email protected]; \
-	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} [email protected] [email protected]; \
-	${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} [email protected] [email protected]; \
-	echo
+	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} [email protected] [email protected];
 
 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@}
-EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gz.ub@}
-EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}-old.ub@}

Reply via email to