mpc85xx: add vendor to Makefile node name, derive SUPPORTED_DEVICES

By adding the vendor to the Makefile device definition node name,
one can derive the standard compatible used in SUPPORTED_DEVICES
instead of having to specify it manually.

Despite, this moves the naming scheme closer to what is used for
other targets (ath79, ramips).

Build-tested on all subtargets.
Run-tested on TP-Link TL-WDR4900 v1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2019-11-23 18:20:34 +01:00
parent c0b87cf10b
commit 118749271b

View File

@ -37,16 +37,17 @@ endef
define Device/Default define Device/Default
PROFILES := Default PROFILES := Default
DEVICE_DTS := $(1) DEVICE_DTS := $(lastword $(subst _, ,$(1)))
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
KERNEL_ENTRY := 0x00000000 KERNEL_ENTRY := 0x00000000
KERNEL_LOADADDR := 0x00000000 KERNEL_LOADADDR := 0x00000000
KERNEL := kernel-bin KERNEL := kernel-bin
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
endef endef
ifeq ($(SUBTARGET),generic) ifeq ($(SUBTARGET),generic)
define Device/tl-wdr4900-v1 define Device/tplink_tl-wdr4900-v1
DEVICE_VENDOR := TP-Link DEVICE_VENDOR := TP-Link
DEVICE_MODEL := TL-WDR4900 DEVICE_MODEL := TL-WDR4900
DEVICE_VARIANT := v1 DEVICE_VARIANT := v1
@ -59,33 +60,32 @@ define Device/tl-wdr4900-v1
KERNEL := kernel-bin | uImage none KERNEL := kernel-bin | uImage none
KERNEL_ENTRY := 0x1000000 KERNEL_ENTRY := 0x1000000
KERNEL_LOADADDR := 0x1000000 KERNEL_LOADADDR := 0x1000000
SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,tl-wdr4900-v1 SUPPORTED_DEVICES += tl-wdr4900-v1
ARTIFACTS := fdt.bin ARTIFACTS := fdt.bin
ARTIFACT/fdt.bin := append-dtb ARTIFACT/fdt.bin := append-dtb
IMAGES := fdt.bin factory.bin sysupgrade.bin IMAGES := fdt.bin factory.bin sysupgrade.bin
IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata
IMAGE/factory.bin := append-rootfs | mktplinkfw factory IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef endef
TARGET_DEVICES += tl-wdr4900-v1 TARGET_DEVICES += tplink_tl-wdr4900-v1
define Device/red-15w-rev1 define Device/sophos_red-15w-rev1
DEVICE_VENDOR := Sophos DEVICE_VENDOR := Sophos
DEVICE_MODEL := RED 15w DEVICE_MODEL := RED 15w
DEVICE_VARIANT := Rev.1 DEVICE_VARIANT := Rev.1
# Original firmware uses a dedicated DTB-partition. # Original firmware uses a dedicated DTB-partition.
# The bootloader however supports FIT-images. # The bootloader however supports FIT-images.
KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
SUPPORTED_DEVICES := sophos,red-15w-rev1
IMAGES := sysupgrade.bin IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef endef
TARGET_DEVICES += red-15w-rev1 TARGET_DEVICES += sophos_red-15w-rev1
endif endif
ifeq ($(SUBTARGET),p1020) ifeq ($(SUBTARGET),p1020)
define Device/hiveap-330 define Device/aerohive_hiveap-330
DEVICE_VENDOR := Aerohive DEVICE_VENDOR := Aerohive
DEVICE_MODEL := HiveAP-330 DEVICE_MODEL := HiveAP-330
DEVICE_PACKAGES := kmod-tpm-i2c-atmel DEVICE_PACKAGES := kmod-tpm-i2c-atmel
@ -93,7 +93,6 @@ define Device/hiveap-330
KERNEL := kernel-bin | gzip | uImage gzip KERNEL := kernel-bin | gzip | uImage gzip
KERNEL_SIZE := 8m KERNEL_SIZE := 8m
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs | uImage none KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs | uImage none
SUPPORTED_DEVICES := aerohive,hiveap-330
IMAGES := fdt.bin sysupgrade.bin IMAGES := fdt.bin sysupgrade.bin
IMAGE/fdt.bin := append-dtb IMAGE/fdt.bin := append-dtb
IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \ IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \
@ -101,9 +100,9 @@ define Device/hiveap-330
append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \ append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \
append-kernel | append-metadata append-kernel | append-metadata
endef endef
TARGET_DEVICES += hiveap-330 TARGET_DEVICES += aerohive_hiveap-330
define Device/panda define Device/ocedo_panda
DEVICE_VENDOR := OCEDO DEVICE_VENDOR := OCEDO
DEVICE_MODEL := Panda DEVICE_MODEL := Panda
DEVICE_PACKAGES := kmod-rtc-ds1307 uboot-envtools DEVICE_PACKAGES := kmod-rtc-ds1307 uboot-envtools
@ -111,18 +110,17 @@ define Device/panda
PAGESIZE := 2048 PAGESIZE := 2048
SUBPAGESIZE := 512 SUBPAGESIZE := 512
BLOCKSIZE := 128k BLOCKSIZE := 128k
SUPPORTED_DEVICES := ocedo,panda
IMAGES := fdt.bin sysupgrade.bin IMAGES := fdt.bin sysupgrade.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/fdt.bin := append-dtb IMAGE/fdt.bin := append-dtb
endef endef
TARGET_DEVICES += panda TARGET_DEVICES += ocedo_panda
endif endif
ifeq ($(SUBTARGET),p2020) ifeq ($(SUBTARGET),p2020)
define Device/p2020rdb define Device/freescale_p2020rdb
DEVICE_VENDOR := Freescale DEVICE_VENDOR := Freescale
DEVICE_MODEL := P2020RDB DEVICE_MODEL := P2020RDB
DEVICE_DTS_DIR := $(DTS_DIR)/fsl DEVICE_DTS_DIR := $(DTS_DIR)/fsl
@ -136,7 +134,7 @@ define Device/p2020rdb
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
pad-rootfs $$(BLOCKSIZE) | append-metadata pad-rootfs $$(BLOCKSIZE) | append-metadata
endef endef
TARGET_DEVICES += p2020rdb TARGET_DEVICES += freescale_p2020rdb
endif endif