aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-04-08 11:16:21 +0200
committerMathias Kresin <dev@kresin.me>2017-12-16 23:33:56 +0100
commit63d7f7fc925ebfa3aba7e65837676d2ba85c1c69 (patch)
tree233ee515f7bdbcb0492945a744550f8bf97731ed /target/linux/lantiq/base-files
parentaba421432f261ee4c9dd1fb4c82d08115596fb83 (diff)
downloadupstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.tar.gz
upstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.tar.bz2
upstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.zip
lantiq: use the compatible string as board name
Use the first compatible string as board name in userspace. Add the new board name as well as the former used board name to the image metadata to keep compatibilty with already deployed installations. Don't add the former used boardname for boards which exists only in master or evaluation boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/base-files')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds27
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/02_network64
-rw-r--r--target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata2
-rw-r--r--target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom16
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration25
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh2
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/upgrade/platform.sh2
7 files changed, 71 insertions, 67 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds
index 187ae68a13..0426fb18e6 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -32,40 +32,43 @@ led_dsl="$(get_dt_led dsl)"
board=$(board_name)
case "$board" in
-ALL0333CJ)
+allnet,all0333cj)
ucidef_set_led_netdev "lan" "lan" "all0333cj:green:lan" "eth0.1"
;;
-ARV4525PW)
+arcadyan,arv4525pw)
ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0"
;;
-ARV7506PW11)
+arcadyan,arv7506pw11)
ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio"
;;
-ARV7519RW22)
+arcadyan,arv7519rw22)
ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1"
;;
-ARV752DPW22)
+arcadyan,arv752dpw22)
ucidef_set_led_wlan "wifi" "wifi" "arv752dpw22:red:wifi" "phy0radio"
;;
-BTHOMEHUBV5A)
+bt,homehub-v5a)
ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
;;
-DM200)
+netgear,dm200)
ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0"
;;
-FRITZ7320)
+avm,fritz7320)
ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0"
;;
-P2812HNUF*)
+zyxel,p-2812hnu-f1|\
+zyxel,p-2812hnu-f3)
ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio"
;;
-VGV7510KW22*)
+arcadyan,vgv7510kw22-nor|\
+arcadyan,vgv7510kw22-brn)
ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio"
;;
-VGV7519*)
+arcadyan,vgv7519-nor|\
+arcadyan,vgv7519-brn)
ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio"
;;
-WBMR300)
+buffalo,wbmr-300hpd)
ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08"
ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04"
ucidef_set_led_switch "wan" "WAN" "wbmr300:green:wan" "switch0" "0x10"
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
index 0a52f1cf6f..efe631c99e 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -23,199 +23,199 @@ interface_wan="dsl0"
board=$(board_name)
case "$board" in
-ACMP252)
+audiocodes,mp-252)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0"
;;
-ALL0333CJ)
+allnet,all0333cj)
annex="b"
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_set_interface_lan 'eth0'
;;
-ARV4510PW)
+arcadyan,arv4510pw)
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"0:lan:4" "2:lan:2" "1:lan:3" "3:lan:1" "5t@eth0"
;;
-ARV4519PW|ARV7510PW22|ARV7518PW)
+arcadyan,arv4519pw|arcadyan,arv7510pw22|arcadyan,arv7518pw)
ucidef_add_switch "switch0" \
"0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan"
;;
-ARV4520PW)
+arcadyan,arv4520pw)
annex="b"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0"
;;
-ARV4525PW|ARV452CQW|ARV7525PW|ARV752DPW)
+arcadyan,arv4525pw|arcadyan,arv452cqw|arcadyan,arv7525pw|arcadyan,arv752dpw)
annex="b"
ucidef_set_interface_lan 'eth0'
;;
-ARV7506PW11)
+arcadyan,arv7506pw11)
annex="b"
wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0"
;;
-ARV7519PW)
+arcadyan,arv7519pw)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0"
;;
-ARV7519RW22)
+arcadyan,arv7519rw22)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 22)" 1)
ucidef_add_switch "switch0" \
"0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0"
;;
-ARV752DPW22|ARV8539PW22)
+arcadyan,arv752dpw22|arcadyan,arv8539pw22)
annex="b"
ucidef_add_switch "switch0" \
"0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan"
;;
-ASL56026)
+alphanetworks,asl56026)
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(mtd_get_mac_ascii uboot_env wanmac)
ucidef_add_switch "switch0"\
"2:lan" "3:lan" "6t@eth0"
;;
-BTHOMEHUBV2B)
+bt,homehub-v2b)
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0"
;;
-BTHOMEHUBV3A)
+bt,homehub-v3a)
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_set_interface_lan 'eth0'
;;
-BTHOMEHUBV5A)
+bt,homehub-v5a)
lan_mac=$(mtd_get_mac_binary_ubi caldata 4364)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
;;
-DGN1000B)
+netgear,dgn1000b)
annex="b"
ucidef_set_interface_lan 'eth0'
;;
-DGN3500*)
+netgear,dgn3500|netgear,dgn3500b)
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0"
;;
-DM200)
+netgear,dm200)
lan_mac=$(mtd_get_mac_binary ART 0)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_set_interface_lan 'eth0'
;;
-EASY80920NAND|EASY80920NOR)
+lantiq,easy80920-nand|lantiq,easy80920-nor)
lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
;;
-FRITZ3370)
+avm,fritz3370)
annex="b"
wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2439)" 1)
ucidef_set_interface_lan 'eth0'
;;
-FRITZ7320)
+avm,fritz7320)
annex="b"
wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1)
ucidef_set_interface_lan 'eth0'
;;
-FRITZ7360SL)
+avm,fritz7360sl)
annex="b"
wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
;;
-GIGASX76X)
+siemens,gigaset-sx76x)
annex="b"
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0"
;;
-H201L)
+zte,h201l)
annex="b"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0"
;;
-P2601HNFX)
+zyxel,p-2601hn)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5t@eth0"
;;
-P2812HNUF*)
+zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3)
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0"
;;
-TDW8970|TDW8980)
+tplink,tdw8970|tplink,tdw8980)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 61696)" 1)
ucidef_add_switch "switch0" \
"0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0"
;;
-VG3503J)
+arcadyan,vg3503j)
lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" 1)
ucidef_add_switch "switch0" \
"2:lan:1" "4:lan:2" "6t@eth0"
;;
-VR200v)
+tplink,vr200v)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1)
ucidef_add_switch "switch0" \
"0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
;;
-VGV7510KW22*)
+arcadyan,vgv7510kw22-nor|arcadyan,vgv7510kw22-brn)
annex="b"
wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2)
ucidef_add_switch "switch0" \
"2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0"
;;
-VGV7519*)
+arcadyan,vgv7519-nor|arcadyan,vgv7519-brn)
wan_mac=$(mtd_get_mac_binary board_config 22)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
;;
-WBMR)
+buffalo,wbmr-hp-g300h)
ucidef_add_switch "switch0" \
"0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan"
;;
-WBMR300)
+buffalo,wbmr-300hpd)
lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr)
wan_mac="$lan_mac"
ucidef_add_switch "switch0" \
diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 1c2b8456fc..6b4d09dd33 100644
--- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -38,7 +38,7 @@ case "$FIRMWARE" in
"ath10k/cal-pci-0000:02:00.0.bin")
board=$(board_name)
case $board in
- BTHOMEHUBV5A)
+ bt,homehub-v5a)
ath10k_caldata_extract_ubi "caldata" 20480 2116
ath10k_caldata_set_macaddr $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +3)
;;
diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
index 7144423d43..498a509012 100644
--- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
+++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
@@ -116,32 +116,32 @@ case "$FIRMWARE" in
board=$(board_name)
case "$board" in
- ARV7518PW)
+ arcadyan,arv7518pw)
ath9k_eeprom_extract "boardconfig" 1024 1
;;
- ARV8539PW22)
+ arcadyan,arv8539pw22)
ath9k_eeprom_extract "art" 1024 1
;;
- BTHOMEHUBV2B)
+ bt,homehub-v2b)
ath9k_eeprom_extract "art" 0 1
ath9k_patch_fw_mac_crc "00:00:00:00:00:00" 524
;;
- BTHOMEHUBV3A)
+ bt,homehub-v3a)
ath9k_eeprom_extract "art-copy" 0 1
ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot_env ethaddr) +2) 268
;;
- BTHOMEHUBV5A)
+ bt,homehub-v5a)
ath9k_ubi_eeprom_extract "caldata" 4096 0
ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +2) 268
;;
- DGN3500*)
+ netgear,dgn3500|netgear,dgn3500b)
ath9k_eeprom_extract "calibration" 61440 0
ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 524
;;
- FRITZ3370|FRITZ7320|FRITZ7360SL)
+ avm,fritz3370|avm,fritz7320|avm,fritz7360sl)
ath9k_eeprom_extract "urlader" 2437 0
;;
- TDW8970|TDW8980)
+ tplink,tdw8970|tplink,tdw8980)
ath9k_eeprom_extract "boardconfig" 135168 0
;;
*)
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
index 6ff4355853..dc594e35e9 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
@@ -56,20 +56,21 @@ migrate_leds()
}
case "$(board_name)" in
-ARV452CQW|\
-ARV7510PW22|\
-ARV7519RW22|\
-ARV752DPW|\
-ARV752DPW22|\
-ASL56026|\
-BTHOMEHUBV2B|\
-BTHOMEHUBV3A|\
-BTHOMEHUBV5A|\
-FRTZ7360SL|\
-VG3503J)
+arcadyan,arv452cqw|\
+arcadyan,arv7510pw22|\
+arcadyan,arv7519rw22|\
+arcadyan,arv752dpw|\
+arcadyan,arv752dpw22|\
+alphanetworks,asl56026|\
+bt,homehub-v2b|\
+bt,homehub-v3a|\
+bt,homehub-v5a|\
+avm,fritz7360sl|\
+arcadyan,vg3503j)
do_internet_led_rename
;;
-DGN3500*)
+netgear,dgn3500|\
+netgear,dgn3500b)
migrate_leds "dgn3500:blue:wireless=dgn3500:green:wireless"
;;
*)
diff --git a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
index aef946036e..bbbac97bae 100755
--- a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
+++ b/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
@@ -1,7 +1,7 @@
#!/bin/sh
lantiq_board_detect() {
- name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"`
+ name="$(strings /proc/device-tree/compatible | head -1)"
model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"`
[ -z "$name" ] && name="unknown"
[ -z "$model" ] && model="unknown"
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index 9158fa742f..77b3868dc0 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -9,7 +9,7 @@ platform_pre_upgrade() {
local board=$(board_name)
case "$board" in
- BTHOMEHUBV2B|BTHOMEHUBV3A|BTHOMEHUBV5A|P2812HNUF* )
+ bt,homehub-v2b|bt,homehub-v3a|bt,homehub-v5a|zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3)
nand_do_upgrade $1
;;
esac