From b3cb0e75884222e141a40443c25d20deedf7a552 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Thu, 6 Jul 2017 16:34:47 +0200 Subject: firmware-utils: mktplinkfw: rework combined image option We use combined option in "mktplinkfw" tool for generating initramfs kernel images and header for kernel inside "safeloader" image type (in fact, only for TL-WR1043ND v4 at this moment). There is also "mktplinkfw-kernel" tool, a stripped-down version, used only for generating "simple" header, for safeloader image types. This changes how "mktplinkfw" handles combined images (which then will allow us to drop the stripped-down version of the tool): - drop "ignore size" command line option (it was used only for combined images anyway) - don't require "flash layout id" for combined images (we don't need and shouldn't limit size of the initramfs kernel and for kernels inside safeloader images, the "tplink-safeloader" tool does the size check) - require kernel address and entry point in command line parameters for combined images (consequence of previous point) - don't include md5 sum and firmware length values in header (they are needed only for update from vendor GUI and are ingored in case of initramfs and "tplink-safeloader" images) - drop "fake" flash layout for TL-WR1043ND v4 as it's no longer needed Also, adjust "mktplinkfw-combined" command in ar71xx/image/tp-link.mk to match introduced changes in "mktplinkfw" tool. Signed-off-by: Piotr Dymacz --- target/linux/ar71xx/image/tp-link.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'target/linux') diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk index e0207f2ec1..5a74197dd9 100644 --- a/target/linux/ar71xx/image/tp-link.mk +++ b/target/linux/ar71xx/image/tp-link.mk @@ -40,11 +40,11 @@ endef # -c combined image define Build/mktplinkfw-combined $(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \ - -m $(TPLINK_HEADER_VERSION) \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -N OpenWrt -V $(REVISION) $(1) \ + -L $(KERNEL_LOADADDR) -m $(TPLINK_HEADER_VERSION) \ + -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -k $@ \ -o $@.new \ - -s -S \ -c @mv $@.new $@ endef @@ -707,7 +707,6 @@ define Device/tl-wr1043nd-v4 BOARDNAME := TL-WR1043ND-v4 DEVICE_PROFILE := TLWR1043 TPLINK_HWID := 0x10430004 - TPLINK_FLASHLAYOUT := 16Msafeloader MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware) IMAGE_SIZE := 15552k TPLINK_BOARD_ID := TLWR1043NDV4 -- cgit v1.2.3