mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-21 17:47:00 +00:00
lantiq: detect board in preinit state
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41638
This commit is contained in:
parent
7e0e5110bc
commit
c8bde9da4a
@ -13,7 +13,6 @@ lantiq_board_detect() {
|
|||||||
lantiq_board_model() {
|
lantiq_board_model() {
|
||||||
local model
|
local model
|
||||||
|
|
||||||
[ -f /tmp/sysinfo/model ] || lantiq_board_detect
|
|
||||||
[ -f /tmp/sysinfo/model ] && model=$(cat /tmp/sysinfo/model)
|
[ -f /tmp/sysinfo/model ] && model=$(cat /tmp/sysinfo/model)
|
||||||
[ -z "$model" ] && model="unknown"
|
[ -z "$model" ] && model="unknown"
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ lantiq_board_model() {
|
|||||||
lantiq_board_name() {
|
lantiq_board_name() {
|
||||||
local name
|
local name
|
||||||
|
|
||||||
[ -f /tmp/sysinfo/board_name ] || lantiq_board_detect
|
|
||||||
[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
|
[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
|
||||||
[ -z "$name" ] && name="unknown"
|
[ -z "$name" ] && name="unknown"
|
||||||
|
|
||||||
|
9
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
Executable file
9
target/linux/lantiq/base-files/lib/preinit/03_preinit_board.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
do_lantiq() {
|
||||||
|
. /lib/functions/lantiq.sh
|
||||||
|
|
||||||
|
lantiq_board_detect
|
||||||
|
}
|
||||||
|
|
||||||
|
boot_hook_add preinit_main do_lantiq
|
Loading…
x
Reference in New Issue
Block a user