aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-12-01 08:10:24 +0100
committerMathias Kresin <dev@kresin.me>2017-12-21 01:05:16 +0100
commit7d3ec5f8332859be4c5da6275df1cbdfad6e73b5 (patch)
treec03f3ca7b16a0cc418172c08f9c9990491a40e96 /target/linux/ramips/base-files
parent224d4a96dd403b9e23d30c185031c17aa00cbf5a (diff)
downloadupstream-7d3ec5f8332859be4c5da6275df1cbdfad6e73b5.tar.gz
upstream-7d3ec5f8332859be4c5da6275df1cbdfad6e73b5.tar.bz2
upstream-7d3ec5f8332859be4c5da6275df1cbdfad6e73b5.zip
ramips: fallback to generic board detect
Fallback to the generic board detection if no case for the current board exists. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network2
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh16
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh2
3 files changed, 6 insertions, 14 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 0cbc4eb5b1..e47a43eca0 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -114,7 +114,7 @@ ramips_setup_interfaces()
youku-yk1|\
zbt-ape522ii|\
zbt-we1326|\
- zbt-we3526|\
+ zbtlink,zbt-we3526|\
zbt-we826-16M|\
zbt-we826-32M|\
zbt-wg2626|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index a08f233170..e85b293610 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -3,9 +3,6 @@
# Copyright (C) 2010-2013 OpenWrt.org
#
-RAMIPS_BOARD_NAME=
-RAMIPS_MODEL=
-
ramips_board_detect() {
local machine
local name
@@ -733,18 +730,13 @@ ramips_board_detect() {
*"YK1")
name="youku-yk1"
;;
- *)
- name="$(strings /proc/device-tree/compatible | head -1)"
- name="${name##*,}"
- name="${name:-generic}"
- ;;
esac
- [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME="$name"
- [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL="$machine"
+ # use generic board detect if no name is set
+ [ -z "$name" ] && return
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
- echo "$RAMIPS_BOARD_NAME" > /tmp/sysinfo/board_name
- echo "$RAMIPS_MODEL" > /tmp/sysinfo/model
+ echo "$name" > /tmp/sysinfo/board_name
+ echo "$machine" > /tmp/sysinfo/model
}
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 2d4a13f531..5f2c4a043a 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -202,7 +202,7 @@ platform_check_image() {
zbt-wa05|\
zbt-we1326|\
zbt-we2026|\
- zbt-we3526|\
+ zbtlink,zbt-we3526|\
zbt-we826-16M|\
zbt-we826-32M|\
zbt-wg2626|\