3 # Copyright (C) 2010-2013 OpenWrt.org
9 ramips_board_detect
() {
13 machine
=$
(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc
/cpuinfo
)
19 *"8devices Carambola")
136 *"Hauppauge Broadway")
151 *"MoFi Network MOFI3500-3GN")
178 *"Omnima MiniEMBWiFi")
181 *"Petatel PSR-680W"*)
184 *"Planex MZK-W300NH2"*)
223 *"Skyline SL-R7205"*)
226 *"Sparklan WCR-150GN")
250 *"Sitecom WL-341 v3")
253 *"Sitecom WL-351 v1 002")
275 name
="wli-tx4-ag300n"
280 *"WR512-3GN-like router")
283 *"UR-326N4G Wireless N router")
286 *"UR-336UN Wireless N router")
321 [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME
="$name"
322 [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL
="$machine"
324 [ -e "/tmp/sysinfo/" ] || mkdir
-p "/tmp/sysinfo/"
326 echo "$RAMIPS_BOARD_NAME" > /tmp
/sysinfo
/board_name
327 echo "$RAMIPS_MODEL" > /tmp
/sysinfo
/model
330 ramips_board_name
() {
333 [ -f /tmp
/sysinfo
/board_name
] && name
=$
(cat /tmp
/sysinfo
/board_name
)
334 [ -z "$name" ] && name
="unknown"