aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/base-files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/base-files/lib')
-rwxr-xr-xtarget/linux/mvebu/base-files/lib/mvebu.sh94
-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
-rwxr-xr-xtarget/linux/mvebu/base-files/lib/upgrade/platform.sh10
-rw-r--r--target/linux/mvebu/base-files/lib/upgrade/sdcard.sh2
7 files changed, 15 insertions, 118 deletions
diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh
deleted file mode 100755
index cfe880bb3c..0000000000
--- a/target/linux/mvebu/base-files/lib/mvebu.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013-2015 OpenWrt.org
-# Copyright (C) 2016 LEDE-Project.org
-#
-
-MVEBU_BOARD_NAME=
-MVEBU_MODEL=
-
-mvebu_board_detect() {
- local machine
- local name
-
- machine=$(cat /proc/device-tree/model)
-
- case "$machine" in
- *"Marvell Armada 370 Evaluation Board")
- name="armada-370-db"
- ;;
- *"Globalscale Marvell ESPRESSOBin Board")
- name="globalscale,espressobin"
- ;;
- *"Marvell Armada 3720 Development Board DB-88F3720-DDR3")
- name="marvell,armada-3720-db"
- ;;
- *"Marvell 8040 MACCHIATOBin")
- name="marvell,armada8040-mcbin"
- ;;
- *"Marvell Armada 8040 DB board")
- name="marvell,armada8040-db"
- ;;
- *"Marvell Armada 7040 DB board")
- name="marvell,armada7040-db"
- ;;
- *"Globalscale Mirabox")
- name="mirabox"
- ;;
- *"Marvell Armada 370 Reference Design")
- name="armada-370-rd"
- ;;
- *"Marvell Armada XP Evaluation Board")
- name="armada-xp-db"
- ;;
- *"PlatHome OpenBlocks AX3-4 board")
- name="openblocks-ax3-4"
- ;;
- *"Marvell Armada XP GP Board")
- name="armada-xp-gp"
- ;;
- *"Linksys WRT1200AC")
- name="armada-385-linksys-caiman"
- ;;
- *"Linksys WRT1900AC")
- name="armada-xp-linksys-mamba"
- ;;
- *"Linksys WRT1900ACv2")
- name="armada-385-linksys-cobra"
- ;;
- *"Linksys WRT1900ACS")
- name="armada-385-linksys-shelby"
- ;;
- *"Linksys WRT3200ACM")
- name="armada-385-linksys-rango"
- ;;
- *"Linksys WRT32X")
- name="armada-385-linksys-venom"
- ;;
- *"Marvell Armada 385 Access Point Development Board")
- name="armada-385-db-ap"
- ;;
- *"Marvell Armada XP Development Board DB-MV784MP-GP")
- name="armada-xp-gp"
- ;;
- *"SolidRun Clearfog Pro A1")
- name="armada-388-clearfog-pro"
- ;;
- *"SolidRun Clearfog Base A1")
- name="armada-388-clearfog-base"
- ;;
- *"Turris Omnia")
- name="armada-385-turris-omnia"
- ;;
- esac
-
- [ -z "$name" ] && name="unknown"
-
- [ -z "$MVEBU_BOARD_NAME" ] && MVEBU_BOARD_NAME="$name"
- [ -z "$MVEBU_MODEL" ] && MVEBU_MODEL="$machine"
-
- [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
- echo "$MVEBU_BOARD_NAME" > /tmp/sysinfo/board_name
- echo "$MVEBU_MODEL" > /tmp/sysinfo/model
-}
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
diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
index 57b2f00a4c..c3c31ea06f 100755
--- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh
@@ -9,7 +9,7 @@ REQUIRE_IMAGE_METADATA=1
platform_check_image() {
case "$(board_name)" in
- armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+ cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
platform_check_image_sdcard "$ARGV"
;;
*)
@@ -20,10 +20,10 @@ platform_check_image() {
platform_do_upgrade() {
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)
platform_do_upgrade_linksys "$ARGV"
;;
- armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+ cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
platform_do_upgrade_sdcard "$ARGV"
;;
*)
@@ -33,10 +33,10 @@ platform_do_upgrade() {
}
platform_copy_config() {
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)
platform_copy_config_linksys
;;
- armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin)
+ cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1)
platform_copy_config_sdcard "$ARGV"
;;
esac
diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
index 28fad31757..43fc2504fc 100644
--- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
@@ -91,7 +91,7 @@ platform_do_upgrade_sdcard() {
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
case "$board" in
- armada-385-turris-omnia)
+ cznic,turris-omnia)
fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait'
fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs cfg80211.freg=$regdomain"; fatload mmc 0 0x01000000 zImage; fatload mmc 0 0x02000000 armada-385-turris-omnia.dtb'
fw_setenv factory_mmcload 'setenv bootargs "$bootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/zImage @; btrload mmc 0 0x02000000 boot/dtb @'