From c8bde9da4af4b66ce613d37a04bbd601d8b0329d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 14 Jul 2014 07:38:52 +0000 Subject: [PATCH] lantiq: detect board in preinit state Signed-off-by: John Crispin SVN-Revision: 41638 --- target/linux/lantiq/base-files/lib/functions/lantiq.sh | 2 -- .../lantiq/base-files/lib/preinit/03_preinit_board.sh | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh index f02edbcbb101..88da794ca9df 100644 --- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh @@ -13,7 +13,6 @@ lantiq_board_detect() { lantiq_board_model() { local model - [ -f /tmp/sysinfo/model ] || lantiq_board_detect [ -f /tmp/sysinfo/model ] && model=$(cat /tmp/sysinfo/model) [ -z "$model" ] && model="unknown" @@ -23,7 +22,6 @@ lantiq_board_model() { lantiq_board_name() { local name - [ -f /tmp/sysinfo/board_name ] || lantiq_board_detect [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name) [ -z "$name" ] && name="unknown" diff --git a/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh new file mode 100755 index 000000000000..6d4bd67af531 --- /dev/null +++ b/target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +do_lantiq() { + . /lib/functions/lantiq.sh + + lantiq_board_detect +} + +boot_hook_add preinit_main do_lantiq -- 2.30.2