summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-07-06 16:34:47 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2017-07-22 23:29:50 +0200
commitb3cb0e75884222e141a40443c25d20deedf7a552 (patch)
tree6c33a23ca49007f1e6df3c1e6bf9f55310741415 /target/linux
parent8223dac99aeab29399b18e358b1cda35ef98495b (diff)
downloadmtk-20170518-b3cb0e75884222e141a40443c25d20deedf7a552.zip
mtk-20170518-b3cb0e75884222e141a40443c25d20deedf7a552.tar.gz
mtk-20170518-b3cb0e75884222e141a40443c25d20deedf7a552.tar.bz2
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 <pepe2k@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/image/tp-link.mk7
1 files changed, 3 insertions, 4 deletions
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index e0207f2..5a74197 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