From f75f6ead6497b59b405548c446eab9824d01dd22 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Fri, 30 Jan 2015 00:12:29 +0000 Subject: sunxi: introduce sunxi_board_name() in /lib/sunxi.sh Signed-off-by: Daniel Golle git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44212 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/sunxi/base-files/lib/sunxi.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'target/linux') diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh index b0a38740a4..d4dd9fedc4 100644 --- a/target/linux/sunxi/base-files/lib/sunxi.sh +++ b/target/linux/sunxi/base-files/lib/sunxi.sh @@ -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" +} -- cgit v1.2.3