3 # Copyright (C) 2010 OpenWrt.org
6 ramips_get_mac_binary
()
14 part
=$
(find_mtd_part
"$mtdname")
15 if [ -z "$part" ]; then
16 echo "ramips_get_mac_binary: partition $mtdname not found!" >&2
20 dd bs
=1 skip
=$seek count
=6 if=$part 2>/dev
/null |
/usr
/sbin
/maccalc bin2mac
23 ramips_get_mac_nvram
()
32 part
=$
(find_mtd_part
"$mtdname")
33 if [ -z "$part" ]; then
34 echo "ramips_get_mac_nvram: partition $mtdname not found!" >&2
38 mac_dirty
=$
(strings "$part" |
sed -n 's/'"$key"'=//p')
40 /usr
/sbin
/maccalc add
"$mac_dirty" 0
47 machine
=$
(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc
/cpuinfo
)
50 *"8devices Carambola")
116 *"MoFi Network MOFI3500-3GN")
128 *"Omnima MiniEMBWiFi")
131 *"Petatel PSR-680W"*)
149 *"Skyline SL-R7205"*)
152 *"Sparklan WCR-150GN")
164 *"Sitecom WL-341 v3")
167 *"Sitecom WL-351 v1 002")
183 name
="wli-tx4-ag300n"
188 *"WR512-3GN-like router")
191 *"UR-336UN Wireless N router")