lantiq: add missing model names
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / preinit / 01_preinit_board.sh
1 #!/bin/sh
2
3 lantiq_board_detect() {
4 name="$(strings /proc/device-tree/compatible | head -1)"
5 model="$(cat /proc/device-tree/model)"
6 [ -z "$name" ] && name="unknown"
7 [ -z "$model" ] && model="unknown"
8 [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
9 echo $name > /tmp/sysinfo/board_name
10 echo $model > /tmp/sysinfo/model
11 }
12
13 do_lantiq() {
14 . /lib/functions/lantiq.sh
15
16 lantiq_board_detect
17 }
18
19 boot_hook_add preinit_main do_lantiq