mvebu: use device-tree board detection
authorTomasz Maciej Nowak <tomek_n@o2.pl>
Sat, 11 May 2019 17:37:34 +0000 (19:37 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 11 May 2019 21:11:04 +0000 (23:11 +0200)
Convert whole target to Device Tree based board detection instead of
identifying devices by dts file name. With this we can drop mvebu.sh
translation script and rely on common method for model detection.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
18 files changed:
package/boot/uboot-envtools/files/mvebu
target/linux/mvebu/base-files/etc/board.d/01_leds
target/linux/mvebu/base-files/etc/board.d/02_network
target/linux/mvebu/base-files/etc/diag.sh
target/linux/mvebu/base-files/etc/init.d/linksys_recovery
target/linux/mvebu/base-files/etc/uci-defaults/03_wireless
target/linux/mvebu/base-files/etc/uci-defaults/04_mambafan
target/linux/mvebu/base-files/lib/mvebu.sh [deleted file]
target/linux/mvebu/base-files/lib/preinit/01_sysinfo [deleted file]
target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
target/linux/mvebu/base-files/lib/preinit/79_move_config
target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
target/linux/mvebu/base-files/lib/upgrade/platform.sh
target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
target/linux/mvebu/image/Makefile
target/linux/mvebu/image/cortex-a53.mk
target/linux/mvebu/image/cortex-a72.mk
target/linux/mvebu/image/cortex-a9.mk

index 7d16a59666b0b145f9b7f1e4e80fbc9cf8eb7699..cd8789c0e90892480ee247c59d020d3a24fe4e81 100644 (file)
@@ -14,25 +14,25 @@ touch /etc/config/ubootenv
 board=$(board_name)
 
 case "$board" in
-armada-385-linksys-caiman|\
-armada-385-linksys-cobra|\
-armada-385-linksys-shelby)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
-       ;;
-armada-385-linksys-rango|\
-armada-385-linksys-venom)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
-       ;;
-armada-385-turris-omnia)
+cznic,turris-omnia)
        ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
        ;;
-armada-xp-linksys-mamba)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
-       ;;
 globalscale,espressobin|\
 marvell,armada8040-mcbin)
        ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
        ;;
+linksys,caiman|\
+linksys,cobra|\
+linksys,shelby)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
+       ;;
+linksys,mamba)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
+       ;;
+linksys,rango|\
+linksys,venom)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+       ;;
 esac
 
 config_load ubootenv
index ff8d4a21c0df705687c0e2bad33d714587fd3a6f..14313ee664a649c1df46cad91c2bf814ea1e24f0 100755 (executable)
@@ -11,42 +11,42 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
-armada-385-linksys-caiman)
+linksys,caiman)
        ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "eth1"
        ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1"
        ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1"
        ;;
-armada-385-linksys-cobra)
+linksys,cobra)
        ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "eth1"
        ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1"
        ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1"
        ;;
-armada-385-linksys-rango)
+linksys,mamba)
+       ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
+       ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
+       ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
+       ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
+       ;;
+linksys,rango)
        ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "eth1"
        ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1"
        ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1"
        ;;
-armada-385-linksys-shelby)
+linksys,shelby)
        ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "eth1"
        ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1"
        ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1"
        ;;
-armada-385-linksys-venom)
+linksys,venom)
        ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1"
        ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
        ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
        ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"
        ;;
-armada-xp-linksys-mamba)
-       ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
-       ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
-       ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
-       ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
-       ;;
 
 esac
 
index 2c10154925b0270674e681fc909a87f7896f9b4a..f099a078b254d824f655c5c472cf9a33609c1c95 100755 (executable)
@@ -11,24 +11,42 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
-armada-385-db-ap)
-       ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
+cznic,turris-omnia)
+       ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
+       ucidef_set_interface_wan "eth2"
+       ;;
+globalscale,espressobin)
+       ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
        ;;
-armada-385-linksys-caiman|\
-armada-385-linksys-cobra|\
-armada-385-linksys-rango|\
-armada-385-linksys-shelby|\
-armada-385-linksys-venom|\
-armada-xp-linksys-mamba)
+linksys,caiman|\
+linksys,cobra|\
+linksys,mamba|\
+linksys,rango|\
+linksys,shelby|\
+linksys,venom)
        ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
        ucidef_add_switch "switch0" \
                "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
        ;;
-armada-385-turris-omnia)
-       ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
-       ucidef_set_interface_wan "eth2"
+marvell,a385-db-ap)
+       ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
+       ;;
+marvell,armada8040-mcbin)
+       ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
+       ;;
+marvell,armada8040-db)
+       ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
+       ;;
+marvell,armada7040-db)
+       ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
+       ;;
+marvell,armada-3720-db)
+       ucidef_set_interfaces_lan_wan "eth1" "eth0"
+       ;;
+marvell,axp-gp)
+       ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
        ;;
-armada-388-clearfog-*)
+solidrun,clearfog*a1)
        # eth0 is standalone ethernet
        # eth1 is switch (-pro) or standalone ethernet (-base)
        # eth2 is SFP
@@ -40,24 +58,6 @@ armada-388-clearfog-*)
                ucidef_add_switch "switch0" \
                        "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6"
        ;;
-armada-xp-gp)
-       ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
-       ;;
-globalscale,espressobin)
-       ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
-       ;;
-marvell,armada-3720-db)
-       ucidef_set_interfaces_lan_wan "eth1" "eth0"
-       ;;
-marvell,armada8040-mcbin)
-       ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
-       ;;
-marvell,armada8040-db)
-       ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
-       ;;
-marvell,armada7040-db)
-       ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
-       ;;
 *)
        ucidef_set_interface_lan "eth0"
        ;;
index 327a82df93136348c69ec8deb04979914da40a9f..be825379f9f18d3671180275915f516740800ec6 100644 (file)
@@ -7,24 +7,24 @@
 
 get_status_led() {
        case $(board_name) in
-       armada-385-linksys-caiman)
+       linksys,caiman)
                status_led="caiman:white:power"
                ;;
-       armada-385-linksys-cobra)
+       linksys,cobra)
                status_led="cobra:white:power"
                ;;
-       armada-385-linksys-rango)
+       linksys,mamba)
+               status_led="mamba:white:power"
+               ;;
+       linksys,rango)
                status_led="rango:white:power"
                ;;
-       armada-385-linksys-shelby)
+       linksys,shelby)
                status_led="shelby:white:power"
                ;;
-       armada-385-linksys-venom)
+       linksys,venom)
                status_led="venom:blue:power"
                ;;
-       armada-xp-linksys-mamba)
-               status_led="mamba:white:power"
-               ;;
        esac
 }
 
index 520b8aac54bffab8dc3719801d87aaccdd1eedd5..b4f375ec993e0d9f61aec248ddb4bf2500df9c85 100755 (executable)
@@ -7,7 +7,7 @@ boot() {
 . /lib/functions.sh
 
 case $(board_name) in
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
+       linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
                # make sure auto_recovery in uboot is always on
                AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
                if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then
index 6fb24c8d4f606eb3b0f56e32924027e5063a8b50..3c345ff1487e3ba87f76244603f28634a8b8035f 100644 (file)
@@ -11,7 +11,7 @@
 board=$(board_name)
 
 case "$board" in
-armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
+linksys,caiman|linksys,cobra|linksys,mamba|linksys,shelby|linksys,venom)
        SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
        WIFIMAC2G=$(macaddr_add $(cat /sys/class/net/eth0/address) +1)
        WIFIMAC5G=$(macaddr_add $WIFIMAC2G +1)
@@ -34,7 +34,7 @@ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|arm
        esac
 
        case "$board" in
-               armada-xp-linksys-mamba)
+               linksys,mamba)
                        WIFIMAC0=$WIFIMAC2G
                        WIFIMAC1=$WIFIMAC5G
                ;;
index e15ce616c789a3de9848fd7b375148c7c2baf599..ec25aedad69c7743894383962c4fe47ab8c517d2 100644 (file)
@@ -8,7 +8,7 @@
 board=$(board_name)
 
 case "$board" in
-armada-xp-linksys-mamba)
+linksys,mamba)
        # Set fan script execution in crontab
        grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0
 
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh
deleted file mode 100755 (executable)
index cfe880b..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013-2015 OpenWrt.org
-# Copyright (C) 2016 LEDE-Project.org
-#
-
-MVEBU_BOARD_NAME=
-MVEBU_MODEL=
-
-mvebu_board_detect() {
-       local machine
-       local name
-
-       machine=$(cat /proc/device-tree/model)
-
-       case "$machine" in
-       *"Marvell Armada 370 Evaluation Board")
-               name="armada-370-db"
-               ;;
-       *"Globalscale Marvell ESPRESSOBin Board")
-               name="globalscale,espressobin"
-               ;;
-       *"Marvell Armada 3720 Development Board DB-88F3720-DDR3")
-               name="marvell,armada-3720-db"
-               ;;
-       *"Marvell 8040 MACCHIATOBin")
-               name="marvell,armada8040-mcbin"
-               ;;
-       *"Marvell Armada 8040 DB board")
-               name="marvell,armada8040-db"
-               ;;
-       *"Marvell Armada 7040 DB board")
-               name="marvell,armada7040-db"
-               ;;
-       *"Globalscale Mirabox")
-               name="mirabox"
-               ;;
-       *"Marvell Armada 370 Reference Design")
-               name="armada-370-rd"
-               ;;
-       *"Marvell Armada XP Evaluation Board")
-               name="armada-xp-db"
-               ;;
-       *"PlatHome OpenBlocks AX3-4 board")
-               name="openblocks-ax3-4"
-               ;;
-       *"Marvell Armada XP GP Board")
-               name="armada-xp-gp"
-               ;;
-       *"Linksys WRT1200AC")
-               name="armada-385-linksys-caiman"
-               ;;
-       *"Linksys WRT1900AC")
-               name="armada-xp-linksys-mamba"
-               ;;
-       *"Linksys WRT1900ACv2")
-               name="armada-385-linksys-cobra"
-               ;;
-       *"Linksys WRT1900ACS")
-               name="armada-385-linksys-shelby"
-               ;;
-       *"Linksys WRT3200ACM")
-               name="armada-385-linksys-rango"
-               ;;
-       *"Linksys WRT32X")
-               name="armada-385-linksys-venom"
-               ;;
-       *"Marvell Armada 385 Access Point Development Board")
-               name="armada-385-db-ap"
-               ;;
-       *"Marvell Armada XP Development Board DB-MV784MP-GP")
-               name="armada-xp-gp"
-               ;;
-       *"SolidRun Clearfog Pro A1")
-               name="armada-388-clearfog-pro"
-               ;;
-       *"SolidRun Clearfog Base A1")
-               name="armada-388-clearfog-base"
-               ;;
-       *"Turris Omnia")
-               name="armada-385-turris-omnia"
-               ;;
-       esac
-
-       [ -z "$name" ] && name="unknown"
-
-       [ -z "$MVEBU_BOARD_NAME" ] && MVEBU_BOARD_NAME="$name"
-       [ -z "$MVEBU_MODEL" ] && MVEBU_MODEL="$machine"
-
-       [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
-       echo "$MVEBU_BOARD_NAME" > /tmp/sysinfo/board_name
-       echo "$MVEBU_MODEL" > /tmp/sysinfo/model
-}
diff --git a/target/linux/mvebu/base-files/lib/preinit/01_sysinfo b/target/linux/mvebu/base-files/lib/preinit/01_sysinfo
deleted file mode 100644 (file)
index 6f473cf..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-do_sysinfo_mvebu() {
-       . /lib/mvebu.sh
-
-       mvebu_board_detect
-}
-
-boot_hook_add preinit_main do_sysinfo_mvebu
index 534a271efbfbbe02abdb485ffad0f57588b4f393..aba8da239ed420779e6d21bdd247be9dcbdbd179 100644 (file)
@@ -9,12 +9,7 @@ preinit_set_mac_address() {
        . /lib/functions.sh
 
        case $(board_name) in
-       armada-xp-linksys-mamba)
-               mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
-               ip link set dev eth0 address $mac 2>/dev/null
-               ip link set dev eth1 address $mac 2>/dev/null
-               ;;
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom)
+       linksys,caiman|linksys,cobra|linksys,rango|linksys,shelby|linksys,venom)
                # rename interfaces back to the way they were with 4.4
                case "$(readlink /sys/class/net/eth0)" in
                        *f1070000*)
@@ -29,7 +24,12 @@ preinit_set_mac_address() {
                ip link set dev eth1 address $mac 2>/dev/null
                ip link set dev eth0 address $mac_wan 2>/dev/null
                ;;
-       armada-385-db-ap|armada-388-clearfog)
+       linksys,mamba)
+               mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+               ip link set dev eth0 address $mac 2>/dev/null
+               ip link set dev eth1 address $mac 2>/dev/null
+               ;;
+       marvell,a385-db-ap|solidrun,clearfog*a1)
                # rename interfaces back to the way they were with 4.4
                case "$(readlink /sys/class/net/eth0)" in
                        *f1070000*)
index f7e23cc324babf30c9f634012292d7ad33a63ad1..640fb5cdad01c17876e79ba26eeeb83f1a374011 100644 (file)
@@ -9,7 +9,7 @@ move_config() {
 
        if export_bootdevice && export_partdevice partdev 1; then
                case $(board_name) in
-                       armada-385-turris-omnia)
+                       cznic,turris-omnia)
                        insmod nls_cp437
                        insmod nls_iso8859-1
                        insmod fat
index cf7a22c4f6ea60c76caf12e0b560f2858e28dffc..b107eacb1146c588c14171187b804287ecf02e71 100644 (file)
@@ -8,7 +8,7 @@ preinit_mount_syscfg() {
        . /lib/functions.sh
 
        case $(board_name) in
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
+       linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
                needs_recovery=0
                syscfg_part=$(grep syscfg /proc/mtd |cut -c4)
                ubiattach -m $syscfg_part || needs_recovery=1
index 57b2f00a4c11751fa60e0f2c4ef29106534805b9..c3c31ea06fb69beed2d026f9f6ed5c8e9227f9a1 100755 (executable)
@@ -9,7 +9,7 @@ REQUIRE_IMAGE_METADATA=1
 
 platform_check_image() {
        case "$(board_name)" in
-       armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+       cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
                platform_check_image_sdcard "$ARGV"
                ;;
        *)
@@ -20,10 +20,10 @@ platform_check_image() {
 
 platform_do_upgrade() {
        case "$(board_name)" in
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
+       linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
                platform_do_upgrade_linksys "$ARGV"
                ;;
-       armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+       cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
                platform_do_upgrade_sdcard "$ARGV"
                ;;
        *)
@@ -33,10 +33,10 @@ platform_do_upgrade() {
 }
 platform_copy_config() {
        case "$(board_name)" in
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
+       linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom)
                platform_copy_config_linksys
                ;;
-       armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+       cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
                platform_copy_config_sdcard "$ARGV"
                ;;
        esac
index 28fad317571c83a7bf348afc30e1f9e114abb581..43fc2504fc795968bd5d2786bdd733b71575dd38 100644 (file)
@@ -91,7 +91,7 @@ platform_do_upgrade_sdcard() {
        get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
 
        case "$board" in
-       armada-385-turris-omnia)
+       cznic,turris-omnia)
                fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait'
                fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs cfg80211.freg=$regdomain"; fatload mmc 0 0x01000000 zImage; fatload mmc 0 0x02000000 armada-385-turris-omnia.dtb'
                fw_setenv factory_mmcload 'setenv bootargs "$bootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/zImage @; btrload mmc 0 0x02000000 boot/dtb @'
index f432a37911983db3d12e4f5554cdb92f56322353..57e5a30491ee5eee15ebaf45684c27a7ce6f7b76 100644 (file)
@@ -76,7 +76,7 @@ define Device/Default
   IMAGES := sysupgrade.bin
   IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE)
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-  SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS))
+  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
   UBINIZE_OPTS := -E 5
   UBOOT :=
   BOOT_SCRIPT :=
index 5a3e9b4d077a736298096ba11788dd9445fbcff3..de9c2164b1c185180e2d04e989134145fa50d734 100644 (file)
@@ -4,7 +4,6 @@ define Device/globalscale_espressobin
   $(call Device/Default-arm64)
   DEVICE_TITLE := ESPRESSObin (Marvell Armada 3700 Community Board)
   DEVICE_DTS := armada-3720-espressobin
-  SUPPORTED_DEVICES := globalscale,espressobin
 endef
 TARGET_DEVICES += globalscale_espressobin
 
@@ -12,7 +11,6 @@ define Device/marvell_armada-3720-db
   $(call Device/Default-arm64)
   DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3
   DEVICE_DTS := armada-3720-db
-  SUPPORTED_DEVICES := marvell,armada-3720-db
 endef
 TARGET_DEVICES += marvell_armada-3720-db
 
index b1069b1f0b5ac6683d5120742c21e083855f1d3e..73dc67b60a8504b3fdd0ba8389e61d46ebdd6946 100644 (file)
@@ -14,7 +14,6 @@ define Device/marvell_armada8040-db
   DEVICE_TITLE := Marvell Armada 8040 DB board
   DEVICE_DTS := armada-8040-db
   IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
-  SUPPORTED_DEVICES := marvell,armada8040-db
 endef
 TARGET_DEVICES += marvell_armada8040-db
 
@@ -23,7 +22,6 @@ define Device/marvell_armada7040-db
   DEVICE_TITLE := Marvell Armada 7040 DB board
   DEVICE_DTS := armada-7040-db
   IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
-  SUPPORTED_DEVICES := marvell,armada7040-db
 endef
 TARGET_DEVICES += marvell_armada7040-db
 
index baaeb8ddb6af48f76f2e33401092b8daed49d2e3..401da3afaf372bdb4ca6d82e3a6aaa347fc76ca1 100644 (file)
@@ -20,6 +20,7 @@ define Device/linksys_wrt1200ac
   $(call Device/linksys,WRT1200AC (Caiman))
   DEVICE_DTS := armada-385-linksys-caiman
   DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+  SUPPORTED_DEVICES := armada-385-linksys-caiman linksys,caiman
 endef
 TARGET_DEVICES += linksys_wrt1200ac
 
@@ -27,6 +28,7 @@ define Device/linksys_wrt1900acv2
   $(call Device/linksys,WRT1900ACv2 (Cobra))
   DEVICE_DTS := armada-385-linksys-cobra
   DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+  SUPPORTED_DEVICES := armada-385-linksys-cobra linksys,cobra
 endef
 TARGET_DEVICES += linksys_wrt1900acv2
 
@@ -34,6 +36,7 @@ define Device/linksys_wrt3200acm
   $(call Device/linksys,WRT3200ACM (Rango))
   DEVICE_DTS := armada-385-linksys-rango
   DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
+  SUPPORTED_DEVICES := armada-385-linksys-rango linksys,rango
 endef
 TARGET_DEVICES += linksys_wrt3200acm
 
@@ -41,6 +44,7 @@ define Device/linksys_wrt1900acs
   $(call Device/linksys,WRT1900ACS (Shelby))
   DEVICE_DTS := armada-385-linksys-shelby
   DEVICE_PACKAGES += mwlwifi-firmware-88w8864
+  SUPPORTED_DEVICES := armada-385-linksys-shelby linksys,shelby
 endef
 TARGET_DEVICES += linksys_wrt1900acs
 
@@ -50,6 +54,7 @@ define Device/linksys_wrt32x
   DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
   KERNEL_SIZE := 3072k
   KERNEL := kernel-bin | append-dtb
+  SUPPORTED_DEVICES := armada-385-linksys-venom linksys,venom
 endef
 TARGET_DEVICES += linksys_wrt32x
 
@@ -58,12 +63,13 @@ define Device/linksys_wrt1900ac
   DEVICE_DTS := armada-xp-linksys-mamba
   DEVICE_PACKAGES += mwlwifi-firmware-88w8864
   KERNEL_SIZE := 3072k
+  SUPPORTED_DEVICES := armada-xp-linksys-mamba linksys,mamba
 endef
 TARGET_DEVICES += linksys_wrt1900ac
 
 define Device/plathome_openblocks-ax3-4
   DEVICE_DTS := armada-xp-openblocks-ax3-4
-  SUPPORTED_DEVICES := openblocks-ax3-4
+  SUPPORTED_DEVICES += openblocks-ax3-4
   BLOCKSIZE := 128k
   PAGESIZE := 1
   IMAGES += factory.img
@@ -78,6 +84,7 @@ define Device/marvell_a385-db-ap
   IMAGES += factory.img
   KERNEL_SIZE := 8192k
   DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP)
+  SUPPORTED_DEVICES += armada-385-db-ap
 endef
 TARGET_DEVICES += marvell_a385-db-ap
 
@@ -85,6 +92,7 @@ define Device/marvell_a370-db
   $(Device/NAND-512K)
   DEVICE_TITLE := Marvell Armada 370 DB (DB-88F6710-BP-DDR3)
   DEVICE_DTS := armada-370-db
+  SUPPORTED_DEVICES += armada-370-db
 endef
 TARGET_DEVICES += marvell_a370-db
 
@@ -92,6 +100,7 @@ define Device/marvell_a370-rd
   $(Device/NAND-512K)
   DEVICE_TITLE := Marvell Armada 370 RD (RD-88F6710-A1)
   DEVICE_DTS := armada-370-rd
+  SUPPORTED_DEVICES += armada-370-rd
 endef
 TARGET_DEVICES += marvell_a370-rd
 
@@ -99,6 +108,7 @@ define Device/marvell_axp-db
   $(Device/NAND-512K)
   DEVICE_TITLE := Marvell Armada XP DB (DB-78460-BP)
   DEVICE_DTS := armada-xp-db
+  SUPPORTED_DEVICES += armada-xp-db
 endef
 TARGET_DEVICES += marvell_axp-db
 
@@ -106,6 +116,7 @@ define Device/marvell_axp-gp
   $(Device/NAND-512K)
   DEVICE_TITLE := Marvell Armada XP GP (DB-MV784MP-GP)
   DEVICE_DTS := armada-xp-gp
+  SUPPORTED_DEVICES += armada-xp-gp
 endef
 TARGET_DEVICES += marvell_axp-gp
 
@@ -114,6 +125,7 @@ define Device/marvell_a388-rd
   DEVICE_DTS := armada-388-rd
   IMAGES := firmware.bin
   IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs
+  SUPPORTED_DEVICES := armada-388-rd marvell,a385-rd
 endef
 TARGET_DEVICES += marvell_a388-rd
 
@@ -125,7 +137,7 @@ define Device/solidrun_clearfog-pro-a1
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
-  SUPPORTED_DEVICES := armada-388-clearfog-pro armada-388-clearfog
+  SUPPORTED_DEVICES += armada-388-clearfog armada-388-clearfog-pro
   UBOOT := clearfog-u-boot-spl.kwb
   BOOT_SCRIPT := clearfog
 endef
@@ -139,6 +151,7 @@ define Device/solidrun_clearfog-base-a1
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-base armada-388-clearfog-pro
+  SUPPORTED_DEVICES += armada-388-clearfog-base
   UBOOT := clearfog-u-boot-spl.kwb
   BOOT_SCRIPT := clearfog
 endef
@@ -147,7 +160,7 @@ TARGET_DEVICES += solidrun_clearfog-base-a1
 define Device/globalscale_mirabox
   $(Device/NAND-512K)
   DEVICE_DTS := armada-370-mirabox
-  SUPPORTED_DEVICES := mirabox
+  SUPPORTED_DEVICES += mirabox
   DEVICE_TITLE := Globalscale Mirabox
 endef
 TARGET_DEVICES += globalscale_mirabox
@@ -166,6 +179,7 @@ define Device/cznic_turris-omnia
   IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip
   IMAGE_NAME = $$(2)
   DEVICE_DTS := armada-385-turris-omnia
+  SUPPORTED_DEVICES += armada-385-turris-omnia
 endef
 TARGET_DEVICES += cznic_turris-omnia