Author: nbd
Date: 2015-03-25 18:58:05 +0100 (Wed, 25 Mar 2015)
New Revision: 44998

Modified:
   trunk/target/linux/ar71xx/image/Makefile
Log:
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 <[email protected]>

Modified: trunk/target/linux/ar71xx/image/Makefile
===================================================================
--- trunk/target/linux/ar71xx/image/Makefile    2015-03-25 17:58:00 UTC (rev 
44997)
+++ trunk/target/linux/ar71xx/image/Makefile    2015-03-25 17:58:05 UTC (rev 
44998)
@@ -45,6 +45,26 @@
        mv [email protected] $@
 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 [email protected] \
+               -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 [email protected] $@
+endef
+
+DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
+
 define Device/Default
   BOARDNAME :=
   DEVICE_PROFILE = $$(BOARDNAME)
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to