sunxi: introduce sunxi_board_name() in /lib/sunxi.sh

Signed-off-by: Daniel Golle <daniel@makrotopia.org>



git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44212 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Zoltan HERPAI 2015-01-30 00:12:29 +00:00
parent 523564cf44
commit f75f6ead64
1 changed files with 9 additions and 0 deletions

View File

@ -135,3 +135,12 @@ sunxi_board_detect() {
echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
}
sunxi_board_name() {
local name
[ -f /tmp/sysinfo/board_name ] && name="$(cat /tmp/sysinfo/board_name)"
[ -z "$name" ] && name="unknown"
echo "$name"
}