mirror of
https://github.com/immortalwrt/immortalwrt
synced 2025-01-09 04:29:03 +08:00
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 <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
b2bab95116
commit
f52081bcf9
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 :=
|
||||
|
@ -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 :=
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 | \
|
||||
|
@ -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 | \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 :=
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user