2015-11-02 10:18:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2016-03-21 20:42:51 +00:00
|
|
|
# Copyright (C) 2016 OpenWrt.org
|
2015-11-02 10:18:50 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
mediatek_board_detect() {
|
|
|
|
local machine
|
|
|
|
local name
|
|
|
|
|
|
|
|
machine=$(cat /proc/device-tree/model)
|
|
|
|
|
|
|
|
case "$machine" in
|
2016-03-21 20:42:51 +00:00
|
|
|
"MediaTek MT7623 evaluation board")
|
2015-11-02 10:18:50 +00:00
|
|
|
name="mt7623_evb"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ -z "$name" ] && name="unknown"
|
|
|
|
|
|
|
|
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
|
|
|
|
|
|
|
|
echo "$name" > /tmp/sysinfo/board_name
|
|
|
|
echo "$machine" > /tmp/sysinfo/model
|
|
|
|
}
|
|
|
|
|
|
|
|
mediatek_board_name() {
|
|
|
|
local name
|
|
|
|
|
|
|
|
[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
|
|
|
|
[ -z "$name" ] && name="unknown"
|
|
|
|
|
|
|
|
echo "$name"
|
|
|
|
}
|