treewide: simplify inclusion of subtarget image files

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>
master
Adrian Schmutzler 4 years ago
parent 108df3eabb
commit bb39fea11a

@ -13,12 +13,7 @@ define Build/at91-install-zImage
$(CP) $(KDIR)/zImage $@ $(CP) $(KDIR)/zImage $@
endef endef
ifeq ($(SUBTARGET),sam9x) include $(SUBTARGET).mk
include ./sam9x.mk
endif
ifeq ($(SUBTARGET),sama5)
include ./sama5.mk
endif
AT91_SD_BOOT_PARTSIZE:=64 AT91_SD_BOOT_PARTSIZE:=64
FAT32_BLOCK_SIZE:=1024 FAT32_BLOCK_SIZE:=1024

@ -68,20 +68,16 @@ define Device/Default
append-rootfs | pad-rootfs | append-metadata | check-size append-rootfs | pad-rootfs | append-metadata | check-size
endef endef
include $(SUBTARGET).mk
ifeq ($(SUBTARGET),generic) ifeq ($(SUBTARGET),generic)
include ./generic.mk include generic-tp-link.mk
include ./generic-tp-link.mk include generic-ubnt.mk
include ./generic-ubnt.mk
endif
ifeq ($(SUBTARGET),mikrotik)
include ./mikrotik.mk
endif
ifeq ($(SUBTARGET),nand)
include ./nand.mk
endif endif
ifeq ($(SUBTARGET),tiny) ifeq ($(SUBTARGET),tiny)
include ./tiny.mk include tiny-netgear.mk
include ./tiny-netgear.mk include tiny-tp-link.mk
include ./tiny-tp-link.mk
endif endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -43,12 +43,6 @@ define Build/traverse-fit
@mv -f $@.new $@ @mv -f $@.new $@
endef endef
ifeq ($(SUBTARGET),armv8_64b) include $(SUBTARGET).mk
include armv8_64b.mk
endif
ifeq ($(SUBTARGET),armv7)
include armv7.mk
endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -138,16 +138,6 @@ define Device/NAND-512K
PAGESIZE := 4096 PAGESIZE := 4096
endef endef
ifeq ($(SUBTARGET),cortexa9) include $(SUBTARGET).mk
include cortexa9.mk
endif
ifeq ($(SUBTARGET),cortexa53)
include cortexa53.mk
endif
ifeq ($(SUBTARGET),cortexa72)
include cortexa72.mk
endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -4,12 +4,6 @@ include $(INCLUDE_DIR)/image.mk
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
ifeq ($(SUBTARGET),ox810se) include $(SUBTARGET).mk
include ox810se.mk
endif
ifeq ($(SUBTARGET),ox820)
include ox820.mk
endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -56,8 +56,6 @@ define Device/Default
DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1))) DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
endef endef
ifeq ($(SUBTARGET),armv8) include $(SUBTARGET).mk
include armv8.mk
endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -42,16 +42,6 @@ define Device/Default
SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1))) SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
endef endef
ifeq ($(SUBTARGET),cortexa7) include $(SUBTARGET).mk
include cortex-a7.mk
endif
ifeq ($(SUBTARGET),cortexa8)
include cortex-a8.mk
endif
ifeq ($(SUBTARGET),cortexa53)
include cortex-a53.mk
endif
$(eval $(call BuildImage)) $(eval $(call BuildImage))

@ -146,21 +146,7 @@ define Device/Default
ARTIFACTS := $$(ARTIFACTS-y) ARTIFACTS := $$(ARTIFACTS-y)
endef endef
ifeq ($(SUBTARGET),64) include $(SUBTARGET).mk
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
$(eval $(call BuildImage)) $(eval $(call BuildImage))

Loading…
Cancel
Save