3 # Copyright (C) 2010-2013 OpenWrt.org
9 ramips_board_detect
() {
13 machine
=$
(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc
/cpuinfo
)
16 *"8devices Carambola")
121 *"Hauppauge Broadway")
133 *"MoFi Network MOFI3500-3GN")
157 *"Omnima MiniEMBWiFi")
160 *"Petatel PSR-680W"*)
163 *"Planex MZK-W300NH2"*)
199 *"Skyline SL-R7205"*)
202 *"Sparklan WCR-150GN")
214 *"Sitecom WL-341 v3")
217 *"Sitecom WL-351 v1 002")
239 name
="wli-tx4-ag300n"
244 *"WR512-3GN-like router")
247 *"UR-326N4G Wireless N router")
250 *"UR-336UN Wireless N router")
267 [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME
="$name"
268 [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL
="$machine"
270 [ -e "/tmp/sysinfo/" ] || mkdir
-p "/tmp/sysinfo/"
272 echo "$RAMIPS_BOARD_NAME" > /tmp
/sysinfo
/board_name
273 echo "$RAMIPS_MODEL" > /tmp
/sysinfo
/model
276 ramips_board_name
() {
279 [ -f /tmp
/sysinfo
/board_name
] && name
=$
(cat /tmp
/sysinfo
/board_name
)
280 [ -z "$name" ] && name
="unknown"