From 63d7f7fc925ebfa3aba7e65837676d2ba85c1c69 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Sat, 8 Apr 2017 11:16:21 +0200 Subject: 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 --- target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh | 2 +- target/linux/lantiq/base-files/lib/upgrade/platform.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'target/linux/lantiq/base-files/lib') 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 -- cgit v1.2.3