diff options
author | Paul Spooren <mail@aparcar.org> | 2020-04-10 00:14:21 -1000 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-06-05 21:54:43 +0200 |
commit | df6f3090c48e3bafa0ace7450488b0a20a8074fb (patch) | |
tree | b0f3285075a3b7544a588253d7c984e083bf6af8 /target/linux/mvebu/cortexa9/base-files | |
parent | 8c31afb978016ef71fa3bf0d4db583cf6970042b (diff) | |
download | upstream-df6f3090c48e3bafa0ace7450488b0a20a8074fb.tar.gz upstream-df6f3090c48e3bafa0ace7450488b0a20a8074fb.tar.bz2 upstream-df6f3090c48e3bafa0ace7450488b0a20a8074fb.zip |
mvebu: rename Linksys devices based on their common names
The Linksys devices in mvebu target feature a mixed naming,
where parts are based on the official product name (device
node, image; e.g. WRT3200ACM) and parts are based on the
internal code name (DTS file name, compatible, LED labels;
e.g. rango). This inconsistent naming has been perceived
as quite confusing.
A recent attempt by Paul Spooren to harmonize this naming
in kernel has been declined there. However, for us it still
makes sense to apply at least a part of these changes
locally.
Primarily, this patch changes the compatible in DTS and thus
the board name used in various scripts to have them in line
with the device, model and image names. Due to the recent
switch from swconfig to DSA, this allows us to drop
SUPPORTED_DEVICES and thus prevent seamless upgrade between
these incompatible setups.
However, this does not include the LED label rename from
Paul's initial patch: I don't think it's worth keeping the
enormous diff locally for this case, as we can implement
this much easier in 01_leds if we have to live with the
inconsistency anyway.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, extend to all devices, drop DT LED changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/mvebu/cortexa9/base-files')
7 files changed, 68 insertions, 44 deletions
diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds index 450bc1f32a..c62de013d4 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds @@ -12,22 +12,37 @@ board=$(board_name) boardname="${board##*,}" case "$board" in -linksys,caiman|\ -linksys,cobra|\ -linksys,rango|\ -linksys,shelby) - ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "wan" - ucidef_set_led_usbport "usb1" "USB 1" "pca963x:$boardname:white:usb2" "usb1-port1" - ucidef_set_led_usbport "usb2" "USB 2" "pca963x:$boardname:white:usb3_1" "usb2-port1" "usb3-port1" - ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:$boardname:white:usb3_2" "usb3-port1" +linksys,wrt1200ac) + ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "wan" + 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" ;; -linksys,mamba) +linksys,wrt1900ac-v1) ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "wan" 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,venom) +linksys,wrt1900ac-v2) + ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "wan" + 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" + ;; +linksys,wrt1900acs) + ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "wan" + 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" + ;; +linksys,wrt3200acm) + ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "wan" + 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" + ;; +linksys,wrt32x) ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "wan" 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" diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network index 89ccedae3f..44188c5fa7 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network @@ -16,12 +16,12 @@ mvebu_setup_interfaces() cznic,turris-omnia) ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2" ;; - linksys,caiman|\ - linksys,cobra|\ - linksys,mamba|\ - linksys,rango|\ - linksys,shelby|\ - linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; marvell,a385-db-ap) @@ -60,15 +60,15 @@ mvebu_setup_macs() buffalo,ls421de) lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr) ;; - linksys,caiman|\ - linksys,cobra|\ - linksys,rango|\ - linksys,shelby|\ - linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) wan_mac=$(macaddr_setbit_la $label_mac) ;; - linksys,mamba) + linksys,wrt1900ac-v1) label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) lan_mac=$label_mac wan_mac=$label_mac diff --git a/target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount b/target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount index dd2266bdc8..f1bfb4a001 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount +++ b/target/linux/mvebu/cortexa9/base-files/etc/init.d/bootcount @@ -4,12 +4,12 @@ START=99 boot() { case $(board_name) in - linksys,caiman |\ - linksys,cobra |\ - linksys,mamba |\ - linksys,rango |\ - linksys,shelby |\ - linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) mtd resetbc s_env || true ;; esac diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless index 3c345ff148..79c74626f5 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless @@ -11,7 +11,11 @@ board=$(board_name) case "$board" in -linksys,caiman|linksys,cobra|linksys,mamba|linksys,shelby|linksys,venom) +linksys,wrt1200ac|\ +linksys,wrt1900ac-v1|\ +linksys,wrt1900ac-v2|\ +linksys,wrt1900acs|\ +linksys,wrt32x) 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 +38,7 @@ linksys,caiman|linksys,cobra|linksys,mamba|linksys,shelby|linksys,venom) esac case "$board" in - linksys,mamba) + linksys,wrt1900ac-v1) WIFIMAC0=$WIFIMAC2G WIFIMAC1=$WIFIMAC5G ;; diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan index ec25aedad6..29c447d840 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan @@ -8,7 +8,7 @@ board=$(board_name) case "$board" in -linksys,mamba) +linksys,wrt1900ac-v1) # Set fan script execution in crontab grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0 diff --git a/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg index 83448e5ace..6ebd727556 100644 --- a/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg +++ b/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg @@ -8,7 +8,12 @@ preinit_mount_syscfg() { . /lib/upgrade/common.sh case $(board_name) in - linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) needs_recovery=0 syscfg_part=$(grep syscfg /proc/mtd |cut -c4) ubiattach -m $syscfg_part || needs_recovery=1 diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh index 63042b1535..6dccb491ba 100755 --- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh @@ -30,12 +30,12 @@ platform_do_upgrade() { solidrun,clearfog-pro-a1) platform_do_upgrade_sdcard "$1" ;; - linksys,caiman|\ - linksys,cobra|\ - linksys,mamba|\ - linksys,rango|\ - linksys,shelby|\ - linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) platform_do_upgrade_linksys "$1" ;; *) @@ -50,12 +50,12 @@ platform_copy_config() { solidrun,clearfog-pro-a1) platform_copy_config_sdcard ;; - linksys,caiman|\ - linksys,cobra|\ - linksys,mamba|\ - linksys,rango|\ - linksys,shelby|\ - linksys,venom) + linksys,wrt1200ac|\ + linksys,wrt1900ac-v1|\ + linksys,wrt1900ac-v2|\ + linksys,wrt1900acs|\ + linksys,wrt3200acm|\ + linksys,wrt32x) platform_copy_config_linksys ;; esac |