From 7a5ef7b99fa111252cea45cae54d432cc987f27e Mon Sep 17 00:00:00 2001 From: Zoltan Herpai Date: Fri, 30 Jan 2015 00:12:29 +0000 Subject: [PATCH] sunxi: introduce sunxi_board_name() in /lib/sunxi.sh Signed-off-by: Daniel Golle SVN-Revision: 44212 --- target/linux/sunxi/base-files/lib/sunxi.sh | 9 +++++++++ 1 file changed, 9 insertions(+) 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" +} -- 2.30.2