blob: d66618b0cfdaaffc5f410e55cf53f22a2efa797f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
do_sysinfo_octeon() {
local machine
local name
machine=$(grep "^system type" /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g")
case "$machine" in
"UBNT_E100"*)
name="erlite"
;;
"UBNT_E200"*)
name="er"
;;
"UBNT_E220"*)
name="erpro"
;;
"UBNT_E300"*)
# let generic 02_sysinfo handle it since device has its own device tree
return 0
;;
"ITUS_SHIELD"*)
name="itus,shield-router"
;;
*)
name="generic"
;;
esac
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
echo "$name" > /tmp/sysinfo/board_name
echo "$machine" > /tmp/sysinfo/model
}
boot_hook_add preinit_main do_sysinfo_octeon
|