Browse Source

treewide: provide global default for SUPPORTED_DEVICES

The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:

  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))

At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:

  device/image name:  vendor_model
  compatible:         vendor,model

The equal redundant definitions are a symptom of this process.

Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.

This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)

Signed-off-by: Adrian Schmutzler <[email protected]>
Adrian Schmutzler 4 years ago
parent
commit
f52081bcf9

+ 1 - 1
include/image.mk

@@ -404,7 +404,7 @@ define Device/Init
   UIMAGE_NAME :=
   DEVICE_COMPAT_VERSION := 1.0
   DEVICE_COMPAT_MESSAGE :=
-  SUPPORTED_DEVICES :=
+  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   IMAGE_METADATA :=
 
   FILESYSTEMS := $(TARGET_FILESYSTEMS)

+ 0 - 1
target/linux/apm821xx/image/Makefile

@@ -88,7 +88,6 @@ define Device/Default
   KERNEL_LOADADDR := 0x00000000
   DEVICE_DTS_DIR := ../dts
   DEVICE_DTS = $(subst _,-,$(1))
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
 endef
 
 include $(SUBTARGET).mk

+ 0 - 1
target/linux/at91/image/Makefile

@@ -25,7 +25,6 @@ define Device/Default
   PROFILES := Default
   FILESYSTEMS := squashfs ubifs ext4
   DEVICE_DTS = $(lastword $(subst _, ,$(1)))
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   KERNEL_NAME := zImage
   KERNEL_SIZE := 4096k
   KERNEL := kernel-bin | append-dtb | lzma | uImage lzma

+ 0 - 1
target/linux/ath79/image/Makefile

@@ -65,7 +65,6 @@ define Device/Default
   KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
   COMPILE :=
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
 	append-rootfs | pad-rootfs | append-metadata | check-size

+ 0 - 1
target/linux/bcm63xx/image/bcm63xx_nand.mk

@@ -34,7 +34,6 @@ define Device/bcm63xx-nand
   CFE_WFI_FLAGS :=
   UBINIZE_OPTS := -E 5
   DEVICE_PACKAGES += nand-utils
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 define Device/sercomm-nand

+ 0 - 1
target/linux/gemini/image/Makefile

@@ -130,7 +130,6 @@ define Device/Default
 	KERNEL_NAME := zImage
 	KERNEL := kernel-bin | append-dtb
 	BLOCKSIZE := 128k
-	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 # A reasonable set of default packages handling the NAS type

+ 0 - 1
target/linux/ipq40xx/image/Makefile

@@ -8,7 +8,6 @@ define Device/Default
 	KERNEL_PREFIX := $$(IMAGE_PREFIX)
 	KERNEL_LOADADDR := 0x80208000
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
-	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 	IMAGES := sysupgrade.bin
 	IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
 	IMAGE/sysupgrade.bin/squashfs :=

+ 0 - 1
target/linux/ipq806x/image/Makefile

@@ -30,7 +30,6 @@ define Device/Default
 	KERNEL_PREFIX := $$(IMAGE_PREFIX)
 	KERNEL_LOADADDR = 0x42208000
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
-	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 	IMAGES := sysupgrade.bin
 	IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
 	IMAGE/sysupgrade.bin/squashfs :=

+ 0 - 1
target/linux/kirkwood/image/Makefile

@@ -30,7 +30,6 @@ define Device/Default
   IMAGES := sysupgrade.bin factory.bin
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
   IMAGE/factory.bin := append-ubi
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
 endef
 
 define Device/checkpoint_l-50

+ 0 - 1
target/linux/lantiq/image/Makefile

@@ -65,7 +65,6 @@ define Device/Default
   FILESYSTEMS := squashfs
   SOC := $(DEFAULT_SOC)
   DEVICE_DTS = $$(SOC)_$(1)
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
 endef

+ 0 - 1
target/linux/layerscape/image/armv7.mk

@@ -15,7 +15,6 @@ define Device/Default
   KERNEL_LOADADDR := 0x80008000
   KERNEL_ENTRY_POINT := 0x80008000
   DEVICE_DTS = $(lastword $(subst _, ,$(1)))
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
   IMAGE_SIZE := 64m
   IMAGE/sysupgrade.bin = \
     ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \

+ 0 - 1
target/linux/layerscape/image/armv8_64b.mk

@@ -14,7 +14,6 @@ define Device/Default
   KERNEL_LOADADDR := 0x80080000
   KERNEL_ENTRY_POINT := 0x80080000
   DEVICE_DTS = freescale/$(subst _,-,$(1))
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
   IMAGE_SIZE := 64m
   IMAGE/sysupgrade.bin = \
     ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \

+ 0 - 1
target/linux/mediatek/image/Makefile

@@ -31,7 +31,6 @@ define Device/Default
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | \
 	pad-rootfs | append-metadata
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 include $(SUBTARGET).mk

+ 0 - 1
target/linux/mpc85xx/image/Makefile

@@ -16,7 +16,6 @@ define Device/Default
   KERNEL_ENTRY := 0x00000000
   KERNEL_LOADADDR := 0x00000000
   KERNEL := kernel-bin
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 include $(SUBTARGET).mk

+ 0 - 1
target/linux/mvebu/image/Makefile

@@ -105,7 +105,6 @@ define Device/Default
   KERNEL := kernel-bin | append-dtb | uImage none
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
   UBINIZE_OPTS := -E 5
   UBOOT :=
   BOOT_SCRIPT :=

+ 0 - 1
target/linux/omap/image/Makefile

@@ -38,7 +38,6 @@ define Device/Default
   DEVICE_DTS = $(lastword $(subst _, ,$(1)))
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := omap-sdcard | append-metadata | gzip
-  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
 endef
 
 #uboot-omap-am335x_evm uboot-omap-omap3_beagle uboot-omap-omap3_overo uboot-omap-omap4_panda

+ 0 - 1
target/linux/oxnas/image/ox810se.mk

@@ -6,7 +6,6 @@ define Device/Default
   KERNEL_INSTALL := 1
   FILESYSTEMS := squashfs ext4
   PROFILES := Default
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   DEVICE_DTS := ox810se-$(subst _,-,$(1))
   IMAGES := sysupgrade.tar
   IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata

+ 0 - 1
target/linux/oxnas/image/ox820.mk

@@ -10,7 +10,6 @@ define Device/Default
   SUBPAGESIZE := 512
   FILESYSTEMS := squashfs ubifs
   PROFILES := Default
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   DEVICE_DTS := ox820-$(subst _,-,$(1))
   KERNEL := kernel-bin | append-dtb | uImage none
   IMAGES := ubinized.bin sysupgrade.tar

+ 0 - 1
target/linux/ramips/image/Makefile

@@ -187,7 +187,6 @@ define Device/Default
   DEVICE_DTS = $$(SOC)_$(1)
   IMAGES := sysupgrade.bin
   COMPILE :=
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
 endef

+ 0 - 1
target/linux/realtek/image/Makefile

@@ -13,7 +13,6 @@ define Device/Default
   KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip
   DEVICE_DTS_DIR := ../dts
   DEVICE_DTS = $$(SOC)_$(1)
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \
 	append-metadata | check-size

+ 0 - 1
target/linux/rockchip/image/Makefile

@@ -52,7 +52,6 @@ define Device/Default
   PROFILES := Default
   KERNEL := kernel-bin
   IMAGES := sysupgrade.img.gz
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 

+ 0 - 1
target/linux/sunxi/image/Makefile

@@ -37,7 +37,6 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   SUNXI_DTS_DIR :=
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef

+ 0 - 1
target/linux/tegra/image/Makefile

@@ -38,7 +38,6 @@ define Device/Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin
   PROFILES := Default
-  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 define Device/compulab_trimslice