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

zrouter-src at zrouter.org zrouter-src at zrouter.org
Tue Jan 3 12:53:56 UTC 2012


details:   http://zrouter.org/hg/zrouter//rev/6b92e391b312
changeset: 304:6b92e391b312
user:      ray at terran.dlink.ua
date:      Tue Jan 03 14:54:31 2012 +0200
description:
Define tplink_image

diffstat:

 Makefile |  42 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 34 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r e1b66ffa8535 -r 6b92e391b312 Makefile
--- a/Makefile	Mon Jan 02 01:31:10 2012 +0200
+++ b/Makefile	Tue Jan 03 14:54:31 2012 +0200
@@ -517,17 +517,23 @@
 MKULZMA_FLAGS?=-v
 MKULZMA_BLOCKSIZE?=131072
 
-KERNCONF_KERNENTRYPOINT?=${KERNCONF_KERNLOADADDR}
+ZROUTER_VERSION?=		0.1-ALPHA
 
-UBOOT_KERNEL_LOAD_ADDRESS?=${KERNCONF_KERNLOADADDR}
-UBOOT_KERNEL_ENTRY_POINT?=${KERNCONF_KERNENTRYPOINT}
+KERNCONF_KERNENTRYPOINT?=	${KERNCONF_KERNLOADADDR}
 
-UBNT_FIRMWARE_IMAGE_SIZE_MAX?=${FIRMWARE_IMAGE_SIZE_MAX}
-UBNT_KERNEL_LOAD_ADDRESS?=${KERNCONF_KERNLOADADDR}
-UBNT_KERNEL_ENTRY_POINT?=${KERNCONF_KERNENTRYPOINT}
-UBNT_KERNEL_FLASH_BASE?=0xbf030000
+UBOOT_KERNEL_LOAD_ADDRESS?=	${KERNCONF_KERNLOADADDR}
+UBOOT_KERNEL_ENTRY_POINT?=	${KERNCONF_KERNENTRYPOINT}
 
-ZROUTER_VERSION?=0.1-ALPHA
+UBNT_FIRMWARE_IMAGE_SIZE_MAX?=	${FIRMWARE_IMAGE_SIZE_MAX}
+UBNT_KERNEL_LOAD_ADDRESS?=	${KERNCONF_KERNLOADADDR}
+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
+TPLINK_IMG_VERSION?=	${ZROUTER_VERSION}
 
 KERNEL_PACKED_NAME=${ZROUTER_OBJ}/${TARGET_VENDOR}_${TARGET_DEVICE}_${PACKING_KERNEL_IMAGE}
 ROOTFS_PACKED_NAME=${ZROUTER_OBJ}/${TARGET_VENDOR}_${TARGET_DEVICE}_${PACKING_ROOTFS_IMAGE}
@@ -568,6 +574,26 @@
 	    -r "${ROOTFS_PACKED_NAME}"			\
 	    -o "${NEW_IMAGE}"
 
+# some TP-Link boards have a modified u-boot bootloader
+# 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 \
+		echo "TPLINK_BOARDTYPE must be defined"; \
+		exit 1; \
+	fi
+	PATH=${IMAGE_BUILD_PATHS} mktplinkfw \
+	    -B ${TPLINK_BOARDTYPE} \
+	    -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}"
+
+
 split_kernel_rootfs:	${KERNEL_PACKED_NAME} ${ROOTFS_PACKED_NAME}
 	touch "${NEW_IMAGE}"
 


More information about the Zrouter-src mailing list