aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/lib
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-04-08 11:16:21 +0200
committerMathias Kresin <dev@kresin.me>2017-12-16 23:33:56 +0100
commit63d7f7fc925ebfa3aba7e65837676d2ba85c1c69 (patch)
tree233ee515f7bdbcb0492945a744550f8bf97731ed /target/linux/lantiq/base-files/lib
parentaba421432f261ee4c9dd1fb4c82d08115596fb83 (diff)
downloadupstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.tar.gz
upstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.tar.bz2
upstream-63d7f7fc925ebfa3aba7e65837676d2ba85c1c69.zip
lantiq: use the compatible string as board name
Use the first compatible string as board name in userspace. Add the new board name as well as the former used board name to the image metadata to keep compatibilty with already deployed installations. Don't add the former used boardname for boards which exists only in master or evaluation boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/base-files/lib')
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh2
-rwxr-xr-xtarget/linux/lantiq/base-files/lib/upgrade/platform.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
index aef946036e..bbbac97bae 100755
--- a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
+++ b/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh
@@ -1,7 +1,7 @@
#!/bin/sh
lantiq_board_detect() {
- name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"`
+ name="$(strings /proc/device-tree/compatible | head -1)"
model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"`
[ -z "$name" ] && name="unknown"
[ -z "$model" ] && model="unknown"
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index 9158fa742f..77b3868dc0 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -9,7 +9,7 @@ platform_pre_upgrade() {
local board=$(board_name)
case "$board" in
- BTHOMEHUBV2B|BTHOMEHUBV3A|BTHOMEHUBV5A|P2812HNUF* )
+ bt,homehub-v2b|bt,homehub-v3a|bt,homehub-v5a|zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3)
nand_do_upgrade $1
;;
esac