aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image
diff options
context:
space:
mode:
authorPiotr Dymacz <pepe2k@gmail.com>2017-06-23 23:07:10 +0200
committerPiotr Dymacz <pepe2k@gmail.com>2017-06-29 10:37:36 +0200
commit5b7f59225118a3553af5e9d485e2445f28444fb9 (patch)
tree9b7dddb8a8120b07e8e8db9152d923279beb0a97 /target/linux/ramips/image
parent7d6c63d875421fc1f66833ba0e690914ea28f1a3 (diff)
downloadupstream-5b7f59225118a3553af5e9d485e2445f28444fb9.tar.gz
upstream-5b7f59225118a3553af5e9d485e2445f28444fb9.tar.bz2
upstream-5b7f59225118a3553af5e9d485e2445f28444fb9.zip
build: move mktplinkfw2 related commands to image-commands.mk
There are already two targets (lantiq, ramips) which use mktplinkfw2 tool for creating images. This de-duplicates code, introduces two new build commands: tplink-v2-header, tplink-v2-image and makes use of them in place of old, (sub)target specific ones. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ramips/image')
-rw-r--r--target/linux/ramips/image/mt7620.mk24
1 files changed, 12 insertions, 12 deletions
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index e0f563e1b0..fd9f10a246 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -2,10 +2,7 @@
# MT7620A Profiles
#
-define Build/tplink-header
- $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \
- -o $@.new -k $@ -r $(IMAGE_ROOTFS) && mv $@.new $@
-endef
+DEVICE_VARS += TPLINK_BOARD_ID
define Build/elecom-header
cp $@ $(KDIR)/v_0.0.0.bin
@@ -31,10 +28,11 @@ TARGET_DEVICES += ai-br100
define Device/ArcherC20i
DTS := ArcherC20i
SUPPORTED_DEVICES := c20i
+ TPLINK_BOARD_ID := ArcherC20i
KERNEL := $(KERNEL_DTB)
- KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c
- IMAGE/factory.bin := append-kernel | tplink-header ArcherC20i -j
- IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -s | append-metadata
+ KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
+ IMAGE/factory.bin := tplink-v2-image
+ IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
IMAGES += factory.bin
DEVICE_TITLE := TP-Link ArcherC20i
endef
@@ -43,10 +41,11 @@ TARGET_DEVICES += ArcherC20i
define Device/ArcherC50
DTS := ArcherC50
SUPPORTED_DEVICES := c50
+ TPLINK_BOARD_ID := ArcherC50
KERNEL := $(KERNEL_DTB)
- KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c
- IMAGE/factory.bin := append-kernel | tplink-header ArcherC50 -j
- IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -s | append-metadata
+ KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
+ IMAGE/factory.bin := tplink-v2-image
+ IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
IMAGES += factory.bin
DEVICE_TITLE := TP-Link ArcherC50
endef
@@ -55,9 +54,10 @@ TARGET_DEVICES += ArcherC50
define Device/ArcherMR200
DTS := ArcherMR200
SUPPORTED_DEVICES := mr200
+ TPLINK_BOARD_ID := ArcherMR200
KERNEL := $(KERNEL_DTB)
- KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherMR200 -c
- IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherMR200 -j -s | append-metadata
+ KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header
+ IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata
DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem
DEVICE_TITLE := TP-Link ArcherMR200
endef