Project

General

Profile

TPLINK_ROOTFS_START.patch

Eric Krausser, 01/16/2012 12:53 AM

View differences:

Makefile Mon Jan 16 01:45:22 2012 +0100
550 550
UBNT_KERNEL_ENTRY_POINT?=	${KERNCONF_KERNENTRYPOINT}
551 551
UBNT_KERNEL_FLASH_BASE?=	0xbf030000
552 552

  
553
TPLINK_ROOTFS_START?=	XXX_TODO
554 553
TPLINK_KERN_LOADADDR?=	${KERNCONF_KERNLOADADDR}
555 554
TPLINK_KERN_STARTADDR?=	${KERNCONF_KERNENTRYPOINT}
556 555
TPLINK_IMG_NAME?=	ZRouter.org
......
599 598
# and need "mktplinkfw" for building the firmware
600 599
tplink_image: ${KERNEL_PACKED_NAME} ${ROOTFS_PACKED_NAME} ${ZTOOLS_PATH}/mktplinkfw
601 600
	@echo "++++++++++++++ Making $@ ++++++++++++++"
602
	if [ "x${TPLINK_BOARDTYPE}" = "x" ] ; then \
601
	@if [ "x${TPLINK_BOARDTYPE}" = "x" ] ; then \
603 602
		echo "TPLINK_BOARDTYPE must be defined"; \
604 603
		exit 1; \
605 604
	fi
605
	@if [ "x${KERNEL_MAP_START}" = "x" ] ; then \
606
		echo "KERNEL_MAP_START must be defined, this is the hint.map.?.start ";\
607
		echo "address from board.hints where hint.map.?.name='kernel'"; \
608
		exit 1; \
609
	fi
610
	KERNEL_PACKED_SIZE=`stat -f %z "${KERNEL_PACKED_NAME}"`; \
611
	TPLINK_ROOTFS_START=`printf "%#x" $$(( ${KERNEL_MAP_START} + $${KERNEL_PACKED_SIZE} ))`; \
606 612
	PATH=${IMAGE_BUILD_PATHS} mktplinkfw \
607 613
	    -B ${TPLINK_BOARDTYPE} \
608
	    -R ${TPLINK_ROOTFS_START} \
614
	    -R $${TPLINK_ROOTFS_START} \
609 615
	    -L ${TPLINK_KERN_LOADADDR} \
610 616
	    -E ${TPLINK_KERN_STARTADDR} \
611 617
	    -k "${KERNEL_PACKED_NAME}" \
612 618
	    -N ${TPLINK_IMG_NAME} \
613 619
	    -V ${TPLINK_IMG_VERSION} \
614 620
	    -r "${ROOTFS_PACKED_NAME}" \
615
	    -o "${NEW_IMAGE}"
621
	    -o "${NEW_IMAGE}" && \
622
	PATH=${IMAGE_BUILD_PATHS} mktplinkfw -i "${NEW_IMAGE}"
616 623

  
617 624

  
618 625
split_kernel_rootfs:	${KERNEL_PACKED_NAME} ${ROOTFS_PACKED_NAME}