[Zrouter-src] ZRouter.org: push to ZRouter Makefile

zrouter-src at zrouter.org zrouter-src at zrouter.org
Sat Jan 21 00:34:17 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/543ca52263a3
changeset: 317:543ca52263a3
user:      Eric Krausser <zrouter at krausser-edv.de>
date:      Sat Jan 21 01:33:46 2012 +0100
description:
set TPLINK_ROOTFS_START to KERNEL_MAP_START + KERNEL_PACKED_SIZE, closes #22\n\nApproved by: ray

diffstat:

 Makefile |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 617912b36846 -r 543ca52263a3 Makefile
--- a/Makefile	Mon Jan 16 23:30:09 2012 +0200
+++ b/Makefile	Sat Jan 21 01:33:46 2012 +0100
@@ -555,7 +555,6 @@
 UBNT_KERNEL_ENTRY_POINT?=	${KERNCONF_KERNENTRYPOINT}
 UBNT_KERNEL_FLASH_BASE?=	0xbf030000
 
-TPLINK_ROOTFS_START?=	XXX_TODO
 TPLINK_KERN_LOADADDR?=	${KERNCONF_KERNLOADADDR}
 TPLINK_KERN_STARTADDR?=	${KERNCONF_KERNENTRYPOINT}
 TPLINK_IMG_NAME?=	ZRouter.org
@@ -604,20 +603,28 @@
 # and need "mktplinkfw" for building the firmware
 tplink_image: ${KERNEL_PACKED_NAME} ${ROOTFS_PACKED_NAME} ${ZTOOLS_PATH}/mktplinkfw
 	@echo "++++++++++++++ Making $@ ++++++++++++++"
-	if [ "x${TPLINK_BOARDTYPE}" = "x" ] ; then \
+	@if [ "x${TPLINK_BOARDTYPE}" = "x" ] ; then \
 		echo "TPLINK_BOARDTYPE must be defined"; \
 		exit 1; \
 	fi
+	@if [ "x${KERNEL_MAP_START}" = "x" ] ; then \
+		echo "KERNEL_MAP_START must be defined, this is the hint.map.?.start ";\
+		echo "address from board.hints where hint.map.?.name='kernel'"; \
+		exit 1; \
+	fi
+	KERNEL_PACKED_SIZE=`stat -f %z "${KERNEL_PACKED_NAME}"`; \
+	TPLINK_ROOTFS_START=`printf "%#x" $$(( ${KERNEL_MAP_START} + $${KERNEL_PACKED_SIZE} ))`; \
 	PATH=${IMAGE_BUILD_PATHS} mktplinkfw \
 	    -B ${TPLINK_BOARDTYPE} \
-	    -R ${TPLINK_ROOTFS_START} \
+	    -R $${TPLINK_ROOTFS_START} \
 	    -L ${TPLINK_KERN_LOADADDR} \
 	    -E ${TPLINK_KERN_STARTADDR} \
 	    -k "${KERNEL_PACKED_NAME}" \
 	    -N ${TPLINK_IMG_NAME} \
 	    -V ${TPLINK_IMG_VERSION} \
 	    -r "${ROOTFS_PACKED_NAME}" \
-	    -o "${NEW_IMAGE}"
+	    -o "${NEW_IMAGE}" && \
+	PATH=${IMAGE_BUILD_PATHS} mktplinkfw -i "${NEW_IMAGE}"
 
 
 split_kernel_rootfs:	${KERNEL_PACKED_NAME} ${ROOTFS_PACKED_NAME}


More information about the Zrouter-src mailing list