aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/base-files/lib/preinit
diff options
context:
space:
mode:
authorTomasz Maciej Nowak <tomek_n@o2.pl>2019-05-11 19:37:34 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-05-11 23:11:04 +0200
commitee96fa15b1866d802a9a74dba2d6b1f81084e5f1 (patch)
tree1c7d2e64a149699b7923f26fcd1e6ff35c820a46 /target/linux/mvebu/base-files/lib/preinit
parenta39d2a8053a656f75ffdd914d433e33fef86ee3e (diff)
downloadupstream-ee96fa15b1866d802a9a74dba2d6b1f81084e5f1.tar.gz
upstream-ee96fa15b1866d802a9a74dba2d6b1f81084e5f1.tar.bz2
upstream-ee96fa15b1866d802a9a74dba2d6b1f81084e5f1.zip
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>
Diffstat (limited to 'target/linux/mvebu/base-files/lib/preinit')
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/01_sysinfo9
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac14
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/79_move_config2
-rw-r--r--target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg2
4 files changed, 9 insertions, 18 deletions
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
index 6f473cfa13..0000000000
--- a/target/linux/mvebu/base-files/lib/preinit/01_sysinfo
+++ /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
diff --git a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
index 534a271efb..aba8da239e 100644
--- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
@@ -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*)
diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config
index f7e23cc324..640fb5cdad 100644
--- a/target/linux/mvebu/base-files/lib/preinit/79_move_config
+++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config
@@ -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
diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
index cf7a22c4f6..b107eacb11 100644
--- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
+++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg
@@ -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