diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-03-25 17:58:05 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-03-25 17:58:05 +0000 |
commit | 41785176ec55d02b9226fbd44d2af467f4309510 (patch) | |
tree | 33ae4b3eb669e31d954283ad253d53357d5260be | |
parent | d973d160bf2d938b75e46c81d17baaeca51a1188 (diff) | |
download | mtk-20170518-41785176ec55d02b9226fbd44d2af467f4309510.zip mtk-20170518-41785176ec55d02b9226fbd44d2af467f4309510.tar.gz mtk-20170518-41785176ec55d02b9226fbd44d2af467f4309510.tar.bz2 |
ar71xx/image: add Build/mktplinkfw as buildstep for new build code
Use `mktplinkfw sysupgrade` or `mktplinkfw factory` or
`mktplinkfw image`
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
SVN-Revision: 44998
-rw-r--r-- | target/linux/ar71xx/image/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 204a6e7..4023b1a 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -45,6 +45,26 @@ define Build/netgear-image mv $@.new $@ endef +# combine kernel and rootfs into one image +# -a align the rootfs start on an <align> bytes boundary +# -j add jffs2 end-of-filesystem markers +# -s strip padding from end of the image +# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x) +define Build/mktplinkfw + $(STAGING_DIR_HOST)/bin/mktplinkfw \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \ + -k $(word 1,$^) \ + -r $@ \ + -o $@.new \ + -a $(call rootfs_align,$(FILESYSTEM)) \ + $(if $(findstring sysupgrade,$1),-j -X 0x40000) \ + $(if $(findstring factory,$1),-j -X 0x40000 -s) \ + $(if $(findstring initramfs,$1),-s -c) + @mv $@.new $@ +endef + +DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT + define Device/Default BOARDNAME := DEVICE_PROFILE = $$(BOARDNAME) |