[LEDE-DEV] [PATCH 2/2] lantiq/image: move tplink specific image into own file

Alexander Couzens lynxis at fe80.eu
Sun May 29 19:05:38 PDT 2016


Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 target/linux/lantiq/image/Makefile   | 42 +-----------------------------------
 target/linux/lantiq/image/tp-link.mk | 41 +++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 41 deletions(-)
 create mode 100644 target/linux/lantiq/image/tp-link.mk

diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index ef91033..68f4f7f 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -249,18 +249,6 @@ define Build/append-dtb
 	cat $@.dtb >> $@
 endef
 
-define Build/tplink-fw
-	mktplinkfw2 -c -B $(BOARD_ID) -s \
-		-k $@ -o $@.new
-	mv $@.new $@
-endef
-
-define Build/mktplinkfw2
-	mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \
-		-k $(word 1,$^) -r $(word 2,$^) \
-		-o $@
-endef
-
 define Build/mkbrncmdline
    mkbrncmdline -i $@ -o $@.new BRN-BOOT
    mv $@.new $@
@@ -285,14 +273,6 @@ define Device/Default
 endef
 DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS
 
-define Device/lantiqTpLink
-  KERNEL := kernel-bin | append-dtb | lzma
-  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw
-  IMAGES := sysupgrade.bin
-  IMAGE/sysupgrade.bin := mktplinkfw2
-endef
-DEVICE_VARS += BOARD_ID
-
 define Device/lantiqBrnImage
   KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict
   IMAGES := factory.bin
@@ -425,27 +405,7 @@ Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370)
 Image/BuildKernel/Profile/VG3503J=$(call Image/BuildKernelLoader/Template,VG3503J)
 Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J)
 
-define Device/TDW8970
-  $(Device/lantiqTpLink)
-  DEVICE_PROFILE := TDW8970
-  DEVICE_DTS = $(DEVICE_PROFILE)
-  BOARD_ID := TD-W8970v1
-endef
-
-define Device/TDW8980
-  $(Device/lantiqTpLink)
-  DEVICE_PROFILE := TDW8980
-  DEVICE_DTS = $(DEVICE_PROFILE)
-  BOARD_ID := TD-W8980v1
-endef
-
-define Device/VR200v
-  $(Device/lantiqTpLink)
-  DEVICE_PROFILE := VR200v
-  DEVICE_DTS = $(DEVICE_PROFILE)
-  BOARD_ID := ArcherVR200V
-endef
-TARGET_DEVICES += TDW8970 TDW8980 VR200v
+include tp-link.mk
 
 $(eval $(call lantiqImage,VGV7510KW22NOR))
 $(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7))
diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk
new file mode 100644
index 0000000..c74564c
--- /dev/null
+++ b/target/linux/lantiq/image/tp-link.mk
@@ -0,0 +1,41 @@
+define Build/tplink-fw
+	mktplinkfw2 -c -B $(BOARD_ID) -s \
+		-k $@ -o $@.new
+	mv $@.new $@
+endef
+
+define Build/mktplinkfw2
+	mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \
+		-k $(word 1,$^) -r $(word 2,$^) \
+		-o $@
+endef
+DEVICE_VARS += BOARD_ID
+
+define Device/lantiqTpLink
+  KERNEL := kernel-bin | append-dtb | lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin := mktplinkfw2
+endef
+
+define Device/TDW8970
+  $(Device/lantiqTpLink)
+  DEVICE_PROFILE := TDW8970
+  DEVICE_DTS = $(DEVICE_PROFILE)
+  BOARD_ID := TD-W8970v1
+endef
+
+define Device/TDW8980
+  $(Device/lantiqTpLink)
+  DEVICE_PROFILE := TDW8980
+  DEVICE_DTS = $(DEVICE_PROFILE)
+  BOARD_ID := TD-W8980v1
+endef
+
+define Device/VR200v
+  $(Device/lantiqTpLink)
+  DEVICE_PROFILE := VR200v
+  DEVICE_DTS = $(DEVICE_PROFILE)
+  BOARD_ID := ArcherVR200V
+endef
+TARGET_DEVICES += TDW8970 TDW8980 VR200v
-- 
2.8.3




More information about the Lede-dev mailing list