Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbmips/conf Deal the brokenness of some u-boot (bs...



details:   https://anonhg.NetBSD.org/src/rev/39c15061f516
branches:  trunk
changeset: 768392:39c15061f516
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Aug 16 07:01:37 2011 +0000

description:
Deal the brokenness of some u-boot (bsentry [byte swapped entry]) and add
some support for varying compressions schemes.

diffstat:

 sys/arch/evbmips/conf/Makefile.evbmips.inc |  33 +++++++++++++++++++++++++++--
 sys/arch/evbmips/conf/std.rasoc            |   4 +-
 2 files changed, 32 insertions(+), 5 deletions(-)

diffs (70 lines):

diff -r b3e622f5b2c7 -r 39c15061f516 sys/arch/evbmips/conf/Makefile.evbmips.inc
--- a/sys/arch/evbmips/conf/Makefile.evbmips.inc        Tue Aug 16 06:59:19 2011 +0000
+++ b/sys/arch/evbmips/conf/Makefile.evbmips.inc        Tue Aug 16 07:01:37 2011 +0000
@@ -25,11 +25,16 @@
 
 .if defined(NEED_UBOOTIMAGE) && ${NEED_UBOOTIMAGE} != "no"
 _OSRELEASE!=           ${HOST_SH} $S/conf/osrelease.sh
-MKUBOOTIMAGEARGS=       -A mips -T kernel -C none
-MKUBOOTIMAGEARGS+=      -a ${TEXTADDR:C/....$/0000/} -e $(TEXTADDR)
+MKUBOOTIMAGEARGS=       -A mips -T kernel
+MKUBOOTIMAGEARGS+=      -a ${TEXTADDR:C/....$/0000/}
+.if ${NEED_UBOOTIMAGE:Mbsentry} == "bsentry"
+MKUBOOTIMAGEARGS+=     -E $(TEXTADDR)
+.else
+MKUBOOTIMAGEARGS+=     -e $(TEXTADDR)
+.endif
 MKUBOOTIMAGEARGS+=      -n "$(MACHINE) ${_OSRELEASE} ($(KERNEL_BUILD:T))"
 
-.if ${NEED_UBOOTIMAGE} == "gz"
+.if ${NEED_UBOOTIMAGE:Mgz} == "gz"
 MKUBOOTIMAGEARGS+=     -C gz
 
 SYSTEM_LD_TAIL_EXTRA+=; \
@@ -39,7 +44,29 @@
        ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin.gz $@.ub
 
 EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.gz@}
+.elif ${NEED_UBOOTIMAGE:Mlzma} == "lzma"
+#TOOL_LZMA?=           /usr/pkg/bin/lzma e
+#LZMA_ARGS?=           -d20 -pb4
+TOOL_XZ?=              xz -F lzma
+XZ_ARGS?=              -kf --lzma1=dict=1048576,lc=0,lp=0,pb=0
+MKUBOOTIMAGEARGS+=     -C lzma
+
+#      echo ${TOOL_LZMA} e $@.bin $@.bin.lzma -d20 -pb4; \
+#      ${TOOL_LZMA} e $@.bin $@.bin.lzma -d20 -pb4; \
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+       (set -e 1; \
+       rm -f $@.bin.lzma; \
+       echo ${TOOL_XZ} ${XZ_ARGS} $@.bin; \
+       ${TOOL_XZ} ${XZ_ARGS} $@.bin; \
+       lzmainfo $@.bin.lzma; \
+       echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin.lzma $@.ub; \
+       ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin.lzma $@.ub) || \
+       (rm $@ ; exit 1)
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.lzma@}
 .else
+MKUBOOTIMAGEARGS+=     -C none
 SYSTEM_LD_TAIL_EXTRA+=; \
        echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
        ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
diff -r b3e622f5b2c7 -r 39c15061f516 sys/arch/evbmips/conf/std.rasoc
--- a/sys/arch/evbmips/conf/std.rasoc   Tue Aug 16 06:59:19 2011 +0000
+++ b/sys/arch/evbmips/conf/std.rasoc   Tue Aug 16 07:01:37 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: std.rasoc,v 1.2 2011/07/28 15:50:13 matt Exp $
+#      $NetBSD: std.rasoc,v 1.3 2011/08/16 07:01:37 matt Exp $
 
 machine        evbmips mips
 include        "conf/std"      # MI standard options
@@ -15,6 +15,6 @@
 makeoptions    CPUFLAGS+="-march=mips32r2"
 makeoptions    DEFTEXTADDR="0x80010000"
 makeoptions    NEED_BINARY="yes"
-makeoptions    NEED_UBOOTIMAGE="yes"
+makeoptions    NEED_UBOOTIMAGE="bsentry"
 
 include        "arch/evbmips/conf/files.rasoc"



Home | Main Index | Thread Index | Old Index