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")
88 *"Buffalo WSR-600DHP")
91 *"Buffalo WSR-1166DHP")
142 *"EASYACC WI-STOR WIZARD 8800")
157 *"Hauppauge Broadway")
172 *"MoFi Network MOFI3500-3GN")
196 *"Planex MZK-750DHP")
220 *"Omnima MiniEMBWiFi")
226 *"Petatel PSR-680W"*)
229 *"Planex MZK-W300NH2"*)
253 *"Ralink MT7620a + MT7530 evaluation board")
254 name
="mt7620a_mt7530"
271 *"Skyline SL-R7205"*)
274 *"Sparklan WCR-150GN")
301 *"Sitecom WL-341 v3")
304 *"Sitecom WL-351 v1 002")
326 name
="wli-tx4-ag300n"
331 *"WR512-3GN-like router")
334 *"UR-326N4G Wireless N router")
337 *"UR-336UN Wireless N router")
373 *"Mediatek MT7621 evaluation board")
376 *"Mediatek MT7628AN evaluation board")
384 [ -z "$RAMIPS_BOARD_NAME" ] && RAMIPS_BOARD_NAME
="$name"
385 [ -z "$RAMIPS_MODEL" ] && RAMIPS_MODEL
="$machine"
387 [ -e "/tmp/sysinfo/" ] || mkdir
-p "/tmp/sysinfo/"
389 echo "$RAMIPS_BOARD_NAME" > /tmp
/sysinfo
/board_name
390 echo "$RAMIPS_MODEL" > /tmp
/sysinfo
/model
393 ramips_board_name
() {
396 [ -f /tmp
/sysinfo
/board_name
] && name
=$
(cat /tmp
/sysinfo
/board_name
)
397 [ -z "$name" ] && name
="unknown"