From: Adrian Schmutzler Date: Tue, 19 Jan 2021 19:05:35 +0000 (+0100) Subject: treewide: provide global default for SUPPORTED_DEVICES X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f52081bcf938efcd910832f3c3713ab9f3ca0738;p=openwrt%2Fstaging%2Frmilecki.git 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 --- diff --git a/include/image.mk b/include/image.mk index 8f46c75ffe5..6843b935f72 100644 --- a/include/image.mk +++ b/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) diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 2331947e332..c1cb2bcfdd4 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/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 diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile index 05f0b58af70..25fc34eba02 100644 --- a/target/linux/at91/image/Makefile +++ b/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 diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index 9bec159cf0c..4a51cf1fbfa 100644 --- a/target/linux/ath79/image/Makefile +++ b/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 diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk index 81c328b712e..5903d03632d 100644 --- a/target/linux/bcm63xx/image/bcm63xx_nand.mk +++ b/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 diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index 83f3d222d98..0eae4c6bd85 100644 --- a/target/linux/gemini/image/Makefile +++ b/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 diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index a764cb60af7..2be262936f7 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/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 := diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index bc917d4fa48..bab1da0090b 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/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 := diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index a9aad01f7f6..9d2d60e55f2 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/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 diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index b169d93859c..a4ba22dfc4b 100644 --- a/target/linux/lantiq/image/Makefile +++ b/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 diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 08ef6cb9a1d..62921a5ef96 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/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 | \ diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 264f7dfd84d..a3f44282995 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/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 | \ diff --git a/target/linux/mediatek/image/Makefile b/target/linux/mediatek/image/Makefile index 724bf430ef8..36ecdd5a9b1 100644 --- a/target/linux/mediatek/image/Makefile +++ b/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 diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index eb70db04db7..618b8c71358 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/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 diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 502e081ec39..77548d683ee 100644 --- a/target/linux/mvebu/image/Makefile +++ b/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 := diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index ce6377f29b4..24c22165c29 100644 --- a/target/linux/omap/image/Makefile +++ b/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 diff --git a/target/linux/oxnas/image/ox810se.mk b/target/linux/oxnas/image/ox810se.mk index b9bb5e7117c..77bdcc77160 100644 --- a/target/linux/oxnas/image/ox810se.mk +++ b/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 diff --git a/target/linux/oxnas/image/ox820.mk b/target/linux/oxnas/image/ox820.mk index a52e09786b8..8dea8425035 100644 --- a/target/linux/oxnas/image/ox820.mk +++ b/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 diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 4274c24884a..2fb13dcf08d 100644 --- a/target/linux/ramips/image/Makefile +++ b/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 diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 1251b47c933..87c616c3f20 100644 --- a/target/linux/realtek/image/Makefile +++ b/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 diff --git a/target/linux/rockchip/image/Makefile b/target/linux/rockchip/image/Makefile index 3c17e963beb..022661623a9 100644 --- a/target/linux/rockchip/image/Makefile +++ b/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 diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 01e9742b460..572c0597e8c 100644 --- a/target/linux/sunxi/image/Makefile +++ b/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 diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile index 71a5fc581d8..97f97e3cc2e 100644 --- a/target/linux/tegra/image/Makefile +++ b/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