|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
|
|
# Copyright (C) 2016 LEDE-Project.org
|
|
|
|
#
|
|
|
|
|
|
|
|
. /lib/functions.sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
. /lib/functions/system.sh
|
|
|
|
|
|
|
|
mvebu_setup_interfaces()
|
|
|
|
{
|
|
|
|
local board="$1"
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
cznic,turris-omnia)
|
|
|
|
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2"
|
|
|
|
;;
|
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>
4 years ago
|
|
|
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)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
|
|
|
|
;;
|
|
|
|
marvell,axp-gp)
|
|
|
|
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
|
|
|
|
;;
|
|
|
|
solidrun,clearfog-base-a1)
|
|
|
|
# eth0 is standalone ethernet
|
|
|
|
# eth1 is standalone ethernet
|
|
|
|
# eth2 is SFP
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
|
|
|
|
;;
|
|
|
|
solidrun,clearfog-pro-a1)
|
|
|
|
# eth0 is standalone ethernet
|
|
|
|
# eth1 is switch
|
|
|
|
# eth2 is SFP
|
|
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
mvebu_setup_macs()
|
|
|
|
{
|
|
|
|
local board="$1"
|
|
|
|
local lan_mac=""
|
|
|
|
local wan_mac=""
|
|
|
|
local label_mac=""
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
buffalo,ls421de)
|
|
|
|
lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
|
|
|
|
;;
|
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>
4 years ago
|
|
|
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)
|
|
|
|
;;
|
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>
4 years ago
|
|
|
linksys,wrt1900ac-v1)
|
|
|
|
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
|
|
lan_mac=$label_mac
|
|
|
|
wan_mac=$label_mac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
|
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
|
|
|
}
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
mvebu_setup_interfaces $board
|
|
|
|
mvebu_setup_macs $board
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|