diff --git a/sys/arch/evbmips/conf/Makefile.evbmips.inc b/sys/arch/evbmips/conf/Makefile.evbmips.inc index 9ac7f649094f..5885d29d7638 100644 --- a/sys/arch/evbmips/conf/Makefile.evbmips.inc +++ b/sys/arch/evbmips/conf/Makefile.evbmips.inc @@ -25,11 +25,16 @@ EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@} .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 @@ SYSTEM_LD_TAIL_EXTRA+=; \ ${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 --git a/sys/arch/evbmips/conf/std.rasoc b/sys/arch/evbmips/conf/std.rasoc index 2c27b2898817..653fa98a4dcb 100644 --- a/sys/arch/evbmips/conf/std.rasoc +++ b/sys/arch/evbmips/conf/std.rasoc @@ -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 @@ options EXEC_SCRIPT # exec #! scripts 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"