mvebu: use device-tree board detection
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>
This commit is contained in:
committed by
Hauke Mehrtens
parent
a39d2a8053
commit
ee96fa15b1
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
do_sysinfo_mvebu() {
|
||||
. /lib/mvebu.sh
|
||||
|
||||
mvebu_board_detect
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_sysinfo_mvebu
|
||||
@@ -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*)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user