From 118749271b311413307f0b6be91786d7ac368f8b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 23 Nov 2019 18:20:34 +0100 Subject: [PATCH] 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 --- target/linux/mpc85xx/image/Makefile | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 156f1e6eda1..ee1663018e1 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -37,16 +37,17 @@ endef define Device/Default PROFILES := Default - DEVICE_DTS := $(1) + DEVICE_DTS := $(lastword $(subst _, ,$(1))) KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) KERNEL_ENTRY := 0x00000000 KERNEL_LOADADDR := 0x00000000 KERNEL := kernel-bin + SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) endef ifeq ($(SUBTARGET),generic) -define Device/tl-wdr4900-v1 +define Device/tplink_tl-wdr4900-v1 DEVICE_VENDOR := TP-Link DEVICE_MODEL := TL-WDR4900 DEVICE_VARIANT := v1 @@ -59,33 +60,32 @@ define Device/tl-wdr4900-v1 KERNEL := kernel-bin | uImage none KERNEL_ENTRY := 0x1000000 KERNEL_LOADADDR := 0x1000000 - SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,tl-wdr4900-v1 + SUPPORTED_DEVICES += tl-wdr4900-v1 ARTIFACTS := fdt.bin ARTIFACT/fdt.bin := append-dtb IMAGES := fdt.bin factory.bin sysupgrade.bin IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata IMAGE/factory.bin := append-rootfs | mktplinkfw factory 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_MODEL := RED 15w DEVICE_VARIANT := Rev.1 # Original firmware uses a dedicated DTB-partition. # The bootloader however supports FIT-images. KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb - SUPPORTED_DEVICES := sophos,red-15w-rev1 IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef -TARGET_DEVICES += red-15w-rev1 +TARGET_DEVICES += sophos_red-15w-rev1 endif ifeq ($(SUBTARGET),p1020) -define Device/hiveap-330 +define Device/aerohive_hiveap-330 DEVICE_VENDOR := Aerohive DEVICE_MODEL := HiveAP-330 DEVICE_PACKAGES := kmod-tpm-i2c-atmel @@ -93,7 +93,6 @@ define Device/hiveap-330 KERNEL := kernel-bin | gzip | uImage gzip KERNEL_SIZE := 8m KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs | uImage none - SUPPORTED_DEVICES := aerohive,hiveap-330 IMAGES := fdt.bin sysupgrade.bin IMAGE/fdt.bin := append-dtb 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-kernel | append-metadata endef -TARGET_DEVICES += hiveap-330 +TARGET_DEVICES += aerohive_hiveap-330 -define Device/panda +define Device/ocedo_panda DEVICE_VENDOR := OCEDO DEVICE_MODEL := Panda DEVICE_PACKAGES := kmod-rtc-ds1307 uboot-envtools @@ -111,18 +110,17 @@ define Device/panda PAGESIZE := 2048 SUBPAGESIZE := 512 BLOCKSIZE := 128k - SUPPORTED_DEVICES := ocedo,panda IMAGES := fdt.bin sysupgrade.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/fdt.bin := append-dtb endef -TARGET_DEVICES += panda +TARGET_DEVICES += ocedo_panda endif ifeq ($(SUBTARGET),p2020) -define Device/p2020rdb +define Device/freescale_p2020rdb DEVICE_VENDOR := Freescale DEVICE_MODEL := P2020RDB DEVICE_DTS_DIR := $(DTS_DIR)/fsl @@ -136,7 +134,7 @@ define Device/p2020rdb IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ pad-rootfs $$(BLOCKSIZE) | append-metadata endef -TARGET_DEVICES += p2020rdb +TARGET_DEVICES += freescale_p2020rdb endif