aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-15 07:45:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-15 07:45:46 +0000
commit89aadeeae44eac5ef75d66d6cc5cdd33fb267e2f (patch)
tree70e28537a8a3056974c471c4f3b59d9506a402d1 /target/linux/ar71xx/image/Makefile
parent61a0b05dbf0d163f6659f68a65b2b6a2aa3dbb26 (diff)
downloadupstream-89aadeeae44eac5ef75d66d6cc5cdd33fb267e2f.tar.gz
upstream-89aadeeae44eac5ef75d66d6cc5cdd33fb267e2f.tar.bz2
upstream-89aadeeae44eac5ef75d66d6cc5cdd33fb267e2f.zip
ar71xx/image: new build step Build/mkubntimage for ubnt factory images
Signed-off-by: Alexander Couzens <lynxis@fe80.eu> SVN-Revision: 45981
Diffstat (limited to 'target/linux/ar71xx/image/Makefile')
-rw-r--r--target/linux/ar71xx/image/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 580a640786..750de9c3cd 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -104,6 +104,35 @@ endef
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
+# UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
+# UBNT_TYPE e.g. one of (BZ, XM, XW)
+# UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
+
+# mkubntimage is using the kernel image direct
+# routerboard creates partitions out of the ubnt header
+define Build/mkubntimage
+ $(STAGING_DIR_HOST)/bin/mkfwimage \
+ -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-OpenWrt-$(REVISION) \
+ -k $(word 1,$^) \
+ -r $@ \
+ -o $@
+endef
+
+# all UBNT XM device expect the kernel image to have 1024k while flash, when
+# booting the image, the size doesn't matter.
+define Build/mkubntimage-split
+ dd if=$@ of=$@.old1 bs=1024k count=1
+ dd if=$@ of=$@.old2 bs=1024k skip=1
+ $(STAGING_DIR_HOST)/bin/mkfwimage \
+ -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-OpenWrt-$(REVISION) \
+ -k $@.old1 \
+ -r $@.old2 \
+ -o $@
+ rm $@.old1 $@.old2
+endef
+
+DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
+
define Device/Default
BOARDNAME :=
DEVICE_PROFILE = $$(BOARDNAME)