mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-22 04:18:10 +00:00
8fe5ad5d33
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
17 lines
467 B
Bash
17 lines
467 B
Bash
#!/bin/sh
|
|
|
|
do_sysinfo_bcm47xx() {
|
|
local boardtype="$(nvram get boardtype)"
|
|
local boardnum="$(nvram get boardnum)"
|
|
local model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
|
|
|
|
[ -z "$model" ] && model="unknown"
|
|
[ -z "$boardtype" ] && boardtype="unknown"
|
|
|
|
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
|
echo "$boardtype${boardnum:+:$boardnum}" > /tmp/sysinfo/board_name
|
|
echo "$model" > /tmp/sysinfo/model
|
|
}
|
|
|
|
boot_hook_add preinit_main do_sysinfo_bcm47xx
|