aa95d6cd20
It is only used there Signed-off-by: Felix Fietkau <nbd@nbd.name>
19 lines
533 B
Bash
Executable file
19 lines
533 B
Bash
Executable file
#!/bin/sh
|
|
|
|
lantiq_board_detect() {
|
|
name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"`
|
|
model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"`
|
|
[ -z "$name" ] && name="unknown"
|
|
[ -z "$model" ] && model="unknown"
|
|
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
|
echo $name > /tmp/sysinfo/board_name
|
|
echo $model > /tmp/sysinfo/model
|
|
}
|
|
|
|
do_lantiq() {
|
|
. /lib/functions/lantiq.sh
|
|
|
|
lantiq_board_detect
|
|
}
|
|
|
|
boot_hook_add preinit_main do_lantiq
|