bsp: make board config dynamic
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
ec81a2e441
commit
c8ef1aa724
3 changed files with 7 additions and 5 deletions
1
bsp/default/root_file_system/etc/config/board
Normal file
1
bsp/default/root_file_system/etc/config/board
Normal file
|
@ -0,0 +1 @@
|
||||||
|
config model 'model'
|
|
@ -1,12 +1,15 @@
|
||||||
# Put your custom commands here that should be executed once
|
# Put your custom commands here that should be executed once
|
||||||
# the system init finished. By default this file does nothing.
|
# the system init finished. By default this file does nothing.
|
||||||
|
|
||||||
|
BOARD=$(cat /var/sysinfo/board_name)
|
||||||
|
if ! uci get board.model.name; then
|
||||||
|
uci set board.model.name=BOARD
|
||||||
|
fi
|
||||||
|
. /etc/rc.local.$BOARD
|
||||||
|
|
||||||
# collect environment info and write to dot-script
|
# collect environment info and write to dot-script
|
||||||
/etc/environment.sh > /tmp/environment
|
/etc/environment.sh > /tmp/environment
|
||||||
|
|
||||||
BOARD=$(cat /var/sysinfo/board_name)
|
|
||||||
. /etc/rc.local.$BOARD
|
|
||||||
|
|
||||||
# Starting NTP-Client Daemon
|
# Starting NTP-Client Daemon
|
||||||
ntpd -p ${NTPD_IP}
|
ntpd -p ${NTPD_IP}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
config model 'model'
|
|
||||||
option name 'tl-wr841n-v9'
|
|
Loading…
Add table
Reference in a new issue