aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-25 17:58:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-25 17:58:05 +0000
commit0b22d57e91cf533c44f29307aab3ce967ce836aa (patch)
tree5f2546cc5e3133c2e9c34d645df5d31973b04aa6 /target/linux/ar71xx/image/Makefile
parentaac0c4d3456f87b2795026092a016051be8903ec (diff)
downloadmaster-187ad058-0b22d57e91cf533c44f29307aab3ce967ce836aa.tar.gz
master-187ad058-0b22d57e91cf533c44f29307aab3ce967ce836aa.tar.bz2
master-187ad058-0b22d57e91cf533c44f29307aab3ce967ce836aa.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44998 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r--target/linux/ar71xx/image/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 204a6e7ec2..4023b1af92 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)