]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
treewide: simplify inclusion of subtarget image files
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 7 Jun 2020 11:11:15 +0000 (13:11 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 10 Jun 2020 23:44:13 +0000 (01:44 +0200)
Many target use a repetitive if-include scheme for their subtarget
image files, though their names are consistent with the subtarget
names.

This patch removes these redundant conditions and just uses the
variable for the include where the target setup allows it.

For sunxi, this includes a trivial rename of the subtarget image
Makefiles.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/at91/image/Makefile
target/linux/ath79/image/Makefile
target/linux/layerscape/image/Makefile
target/linux/mvebu/image/Makefile
target/linux/oxnas/image/Makefile
target/linux/rockchip/image/Makefile
target/linux/sunxi/image/Makefile
target/linux/sunxi/image/cortexa53.mk [moved from target/linux/sunxi/image/cortex-a53.mk with 100% similarity]
target/linux/sunxi/image/cortexa7.mk [moved from target/linux/sunxi/image/cortex-a7.mk with 100% similarity]
target/linux/sunxi/image/cortexa8.mk [moved from target/linux/sunxi/image/cortex-a8.mk with 100% similarity]
target/linux/x86/image/Makefile

index adb7c6d0ba5c30bda3efc3308973a9c51af4cb78..ff801dae862ebe7e17f3a789d09d4199bcc65945 100644 (file)
@@ -13,12 +13,7 @@ define Build/at91-install-zImage
     $(CP) $(KDIR)/zImage $@
 endef
 
-ifeq ($(SUBTARGET),sam9x)
-include ./sam9x.mk
-endif
-ifeq ($(SUBTARGET),sama5)
-include ./sama5.mk
-endif
+include $(SUBTARGET).mk
 
 AT91_SD_BOOT_PARTSIZE:=64
 FAT32_BLOCK_SIZE:=1024
index 529baf8f571d037720f046e2ce30309e9869fff6..a555cfc6d50c20c4db54f38824c921b861d0b7cb 100644 (file)
@@ -68,20 +68,16 @@ define Device/Default
        append-rootfs | pad-rootfs | append-metadata | check-size
 endef
 
+include $(SUBTARGET).mk
+
 ifeq ($(SUBTARGET),generic)
-include ./generic.mk
-include ./generic-tp-link.mk
-include ./generic-ubnt.mk
-endif
-ifeq ($(SUBTARGET),mikrotik)
-include ./mikrotik.mk
-endif
-ifeq ($(SUBTARGET),nand)
-include ./nand.mk
+include generic-tp-link.mk
+include generic-ubnt.mk
 endif
+
 ifeq ($(SUBTARGET),tiny)
-include ./tiny.mk
-include ./tiny-netgear.mk
-include ./tiny-tp-link.mk
+include tiny-netgear.mk
+include tiny-tp-link.mk
 endif
+
 $(eval $(call BuildImage))
index bc65748853f9ca4e75aba279ddec1fa4bfeff9eb..f5a5ad99804f62c6de736aeab556051cc619a5d5 100644 (file)
@@ -43,12 +43,6 @@ define Build/traverse-fit
        @mv -f $@.new $@
 endef
 
-ifeq ($(SUBTARGET),armv8_64b)
-include armv8_64b.mk
-endif
-
-ifeq ($(SUBTARGET),armv7)
-include armv7.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
index 3a478780693d31023fae0a62b2152c3dc4e79ce7..cbf34c1bc86e16930c0ed4c9316c5c62f42e1244 100644 (file)
@@ -138,16 +138,6 @@ define Device/NAND-512K
   PAGESIZE := 4096
 endef
 
-ifeq ($(SUBTARGET),cortexa9)
-include cortexa9.mk
-endif
-
-ifeq ($(SUBTARGET),cortexa53)
-include cortexa53.mk
-endif
-
-ifeq ($(SUBTARGET),cortexa72)
-include cortexa72.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
index 644c2b87955e49bee3edfb5190bf3caae7967a12..abf83caa1accc59a9e95ee8541e3c4e1c24b8d5e 100644 (file)
@@ -4,12 +4,6 @@ include $(INCLUDE_DIR)/image.mk
 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
 
-ifeq ($(SUBTARGET),ox810se)
-include ox810se.mk
-endif
-
-ifeq ($(SUBTARGET),ox820)
-include ox820.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
index 5f605ebfe5ebba4f93ebc772e8ef5616ea303fd9..22854d9d02df519376503c922514bdad9e2c8584 100644 (file)
@@ -56,8 +56,6 @@ define Device/Default
   DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
-ifeq ($(SUBTARGET),armv8)
-  include armv8.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
index 1b98849a5048dd1353864b86d51bf29e77a1d0a3..01e9742b4602a4e72d086a868fe995c98201d70a 100644 (file)
@@ -42,16 +42,6 @@ define Device/Default
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
-ifeq ($(SUBTARGET),cortexa7)
-include cortex-a7.mk
-endif
-
-ifeq ($(SUBTARGET),cortexa8)
-include cortex-a8.mk
-endif
-
-ifeq ($(SUBTARGET),cortexa53)
-include cortex-a53.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
index 174c272a515e946875c824babcdc0041ffdb2ecb..85c850c1281d6db16d645373f62ea5992f7f508f 100644 (file)
@@ -146,21 +146,7 @@ define Device/Default
   ARTIFACTS := $$(ARTIFACTS-y)
 endef
 
-ifeq ($(SUBTARGET),64)
-  include 64.mk
-endif
-
-ifeq ($(SUBTARGET),generic)
-  include generic.mk
-endif
-
-ifeq ($(SUBTARGET),geode)
-  include geode.mk
-endif
-
-ifeq ($(SUBTARGET),legacy)
-  include legacy.mk
-endif
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))