3 # Copyright (C) 2010-2013 OpenWrt.org
9 ramips_board_detect
() {
13 machine
=$
(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc
/cpuinfo
)
211 *"MediaTek LinkIt Smart 7688")
212 linkit
="$(dd bs=1 skip=1024 count=12 if=/dev/mtd2 2> /dev/null)"
213 if [ "${linkit}" = "LINKITS7688D" ]; then
215 RAMIPS_MODEL
="${machine} DUO"
253 *"MT7620a + MT7530 evaluation"*)
254 name
="mt7620a_mt7530"
259 *"MT7621 evaluation"*)
262 *"MT7628AN evaluation"*)
265 *"MT7688 evaluation"*)
319 *"RT5350F-OLinuXino")
320 name
="rt5350f-olinuxino"
322 *"RT5350F-OLinuXino-EVB")
323 name
="rt5350f-olinuxino-evb"
425 name
="wli-tx4-ag300n"
492 [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME
="$name"
493 [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL
="$machine"
495 [ -e "/tmp/sysinfo/" ] || mkdir
-p "/tmp/sysinfo/"
497 echo "$RAMIPS_BOARD_NAME" > /tmp
/sysinfo
/board_name
498 echo "$RAMIPS_MODEL" > /tmp
/sysinfo
/model
501 ramips_board_name
() {
504 [ -f /tmp
/sysinfo
/board_name
] && name
=$
(cat /tmp
/sysinfo
/board_name
)
505 [ -z "$name" ] && name
="unknown"