Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/conf Explain the reasoning behind the load-t...
details: https://anonhg.NetBSD.org/src/rev/87870b395630
branches: trunk
changeset: 771716:87870b395630
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Nov 30 20:00:39 2011 +0000
description:
Explain the reasoning behind the load-time memory layout.
Only build kernels the MV2120 can boot.
Use mkubootimage -E.
diffstat:
sys/arch/evbarm/conf/mk.mv2120 | 38 +++++++++++++++-----------------------
1 files changed, 15 insertions(+), 23 deletions(-)
diffs (60 lines):
diff -r 9dddd1eece91 -r 87870b395630 sys/arch/evbarm/conf/mk.mv2120
--- a/sys/arch/evbarm/conf/mk.mv2120 Wed Nov 30 16:12:32 2011 +0000
+++ b/sys/arch/evbarm/conf/mk.mv2120 Wed Nov 30 20:00:39 2011 +0000
@@ -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 $@ $@.bin; \
${OBJCOPY} -S -O binary $@ $@.bin; \
- echo gzip -c $@.bin > $@.bin.gz; \
- gzip -c $@.bin > $@.bin.gz; \
- echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
- ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
- echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
- ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
- 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; \
- echo
+ ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub;
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@}
Home |
Main Index |
Thread Index |
Old Index