Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
559
target/linux/ath79/generic/base-files/etc/board.d/01_leds
Normal file
559
target/linux/ath79/generic/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,559 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
8dev,carambola2)
|
||||
ucidef_set_led_netdev "lan" "LAN" "orange:eth0" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "orange:eth1" "switch0" "0x04"
|
||||
;;
|
||||
8dev,carambola3)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" "link"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link"
|
||||
;;
|
||||
alcatel,hh40v)
|
||||
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan" "eth1" "tx rx"
|
||||
ucidef_set_led_netdev "lan_link" "LAN Link" "orange:lan" "eth1" "link"
|
||||
ucidef_set_led_netdev "wan_data" "WAN Data" "green:wan" "eth0" "tx rx"
|
||||
ucidef_set_led_netdev "wan_link" "WAN Link" "orange:wan" "eth0" "link"
|
||||
;;
|
||||
alfa-network,ap121f|\
|
||||
alfa-network,ap121fe|\
|
||||
alfa-network,wifi-camppro-nano-duo|\
|
||||
avm,fritz450e|\
|
||||
glinet,6408|\
|
||||
glinet,6416|\
|
||||
glinet,gl-ar300m-lite|\
|
||||
glinet,gl-ar300m16|\
|
||||
pcs,cap324|\
|
||||
tplink,cpe605-v1|\
|
||||
tplink,cpe610-v1|\
|
||||
tplink,cpe610-v2|\
|
||||
tplink,tl-wa1201-v2|\
|
||||
ubnt,litebeam-m5-xw)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
;;
|
||||
tplink,tl-wdr6500-v2)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10"
|
||||
;;
|
||||
alfa-network,n2q)
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "orange:lan2" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "orange:lan1" "switch0" "0x10"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "33" "100"
|
||||
ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "66" "100"
|
||||
;;
|
||||
alfa-network,n5q)
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "25" "100"
|
||||
ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "50" "100"
|
||||
ucidef_set_led_rssi "signal4" "SIGNAL4" "green:signal4" "wlan0" "75" "100"
|
||||
;;
|
||||
alfa-network,pi-wifi4|\
|
||||
watchguard,ap100|\
|
||||
watchguard,ap200|\
|
||||
watchguard,ap300)
|
||||
ucidef_set_led_netdev "lan_data" "LAN_DATA" "orange:lan_data" "eth0" "tx rx"
|
||||
ucidef_set_led_netdev "lan_link" "LAN_LINK" "green:lan_link" "eth0" "link"
|
||||
;;
|
||||
alfa-network,r36a)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x10"
|
||||
;;
|
||||
alfa-network,tube-2hq)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "25" "100"
|
||||
ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "50" "100"
|
||||
ucidef_set_led_rssi "signal4" "SIGNAL4" "green:signal4" "wlan0" "75" "100"
|
||||
;;
|
||||
asus,pl-ac56)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3e"
|
||||
ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "wlan1" "link"
|
||||
ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan5g" "wlan0" "link"
|
||||
;;
|
||||
asus,rp-ac51)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2G" "wlan1" "link"
|
||||
ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5G" "wlan0" "link"
|
||||
;;
|
||||
asus,rp-ac66)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow-wlan0" "RSSILOW" "blue:rssilow-wlan0" "wlan0" "1" "1"
|
||||
ucidef_set_led_rssi "rssimedium-wlan0" "RSSIMEDIUM" "red:rssimedium-wlan0" "wlan0" "1" "79"
|
||||
ucidef_set_led_rssi "rssihigh-wlan0" "RSSIHIGH" "green:rssihigh-wlan0" "wlan0" "70" "100"
|
||||
ucidef_set_led_rssi "rssilow-wlan1" "RSSILOW" "blue:rssilow-wlan1" "wlan1" "1" "1"
|
||||
ucidef_set_led_rssi "rssimedium-wlan1" "RSSIMEDIUM" "red:rssimedium-wlan1" "wlan1" "1" "79"
|
||||
ucidef_set_led_rssi "rssihigh-wlan1" "RSSIHIGH" "green:rssihigh-wlan1" "wlan1" "70" "100"
|
||||
;;
|
||||
avm,fritz1750e)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan1" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssi1" "wlan1" "20" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssi2" "wlan1" "40" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssi3" "wlan1" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi4" "wlan1" "80" "100"
|
||||
;;
|
||||
avm,fritz300e)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssi1" "wlan0" "20" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssi2" "wlan0" "40" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssi3" "wlan0" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi4" "wlan0" "80" "100"
|
||||
;;
|
||||
avm,fritz4020|\
|
||||
tplink,archer-c58-v1|\
|
||||
tplink,archer-c59-v1|\
|
||||
tplink,archer-c59-v2|\
|
||||
tplink,archer-c60-v1|\
|
||||
tplink,archer-c60-v2|\
|
||||
tplink,archer-c60-v3|\
|
||||
tplink,tl-wr841hp-v3)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
;;
|
||||
avm,fritzdvbc)
|
||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssilow" "wlan1" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssimediumlow" "wlan1" "20" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssimedium" "wlan1" "40" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan1" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "80" "100"
|
||||
;;
|
||||
buffalo,wzr-hp-g300nh-rb|\
|
||||
buffalo,wzr-hp-g300nh-s)
|
||||
ucidef_set_led_netdev "router" "Router" "green:router" "eth1"
|
||||
;;
|
||||
comfast,cf-e110n-v2)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
comfast,cf-e120a-v3)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x04"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
comfast,cf-e130n-v2)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
comfast,cf-e313ac)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x02"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
comfast,cf-e314n-v2)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
comfast,cf-e375ac)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x04"
|
||||
ucidef_set_led_switch "wan" "WAN" "red:wan" "switch0" "0x02"
|
||||
;;
|
||||
comfast,cf-e5)
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi0" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "blue:rssi1" "wlan0" "33" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:rssi2" "wlan0" "66" "100"
|
||||
;;
|
||||
comfast,cf-e560ac)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x10"
|
||||
;;
|
||||
comfast,cf-ew71-v2|\
|
||||
comfast,cf-ew72|\
|
||||
openmesh,om2p-v2|\
|
||||
openmesh,om2p-hs-v1|\
|
||||
openmesh,om2p-hs-v2|\
|
||||
openmesh,om2p-hs-v3|\
|
||||
openmesh,om2p-lc|\
|
||||
openmesh,om5p|\
|
||||
telco,t1)
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
;;
|
||||
comfast,cf-wr752ac-v1|\
|
||||
enterasys,ws-ap3705i|\
|
||||
openmesh,mr900-v1|\
|
||||
openmesh,mr900-v2|\
|
||||
openmesh,mr1750-v1|\
|
||||
openmesh,mr1750-v2|\
|
||||
tplink,cpe710-v1|\
|
||||
tplink,cpe710-v2)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
;;
|
||||
compex,wpj344-16m|\
|
||||
compex,wpj531-16m)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "sig1" "SIG1" "red:sig1" "wlan0" "85" "100"
|
||||
ucidef_set_led_rssi "sig2" "SIG2" "yellow:sig2" "wlan0" "75" "100"
|
||||
ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "65" "100"
|
||||
ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "50" "100"
|
||||
;;
|
||||
dell,apl26-0ae)
|
||||
ucidef_set_led_switch "lan1" "LAN1" "amber:lan-1" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "amber:lan-2" "switch0" "0x08"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_set_led_netdev "plcw" "dLAN" "white:dlan" "eth0.1" "rx"
|
||||
;;
|
||||
dlink,covr-p2500-a1)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x0e" "" "link"
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "25"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssimediumlow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
||||
;;
|
||||
engenius,ens202ext-v1|\
|
||||
engenius,enstationac-v1)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100"
|
||||
;;
|
||||
engenius,ews511ap)
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "blue:lan1" "eth1"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "blue:lan2" "eth0"
|
||||
;;
|
||||
etactica,eg200)
|
||||
ucidef_set_led_netdev "lan" "LAN" "red:eth0" "eth0"
|
||||
ucidef_set_led_oneshot "modbus" "Modbus" "red:modbus" "100" "33"
|
||||
;;
|
||||
glinet,gl-mifi|\
|
||||
qxwlan,e600g-v2-8m|\
|
||||
qxwlan,e600g-v2-16m|\
|
||||
qxwlan,e600gac-v2-8m|\
|
||||
qxwlan,e600gac-v2-16m|\
|
||||
qxwlan,e750a-v4-8m|\
|
||||
qxwlan,e750a-v4-16m)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x02"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
;;
|
||||
glinet,gl-x300b|\
|
||||
glinet,gl-x750)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
;;
|
||||
hak5,lan-turtle)
|
||||
ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
|
||||
;;
|
||||
joyit,jt-or750i|\
|
||||
yuncore,xd3200)
|
||||
ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
|
||||
;;
|
||||
hiwifi,hc6361)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "blue:wlan" "phy0tpt"
|
||||
;;
|
||||
kuwfi,c910)
|
||||
ucidef_set_led_netdev "wan" "WAN" "white:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "white:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "white:lan2" "switch0" "0x02"
|
||||
;;
|
||||
meraki,mr12|\
|
||||
tplink,cpe210-v2|\
|
||||
tplink,cpe210-v3)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100"
|
||||
;;
|
||||
meraki,mr16)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
||||
;;
|
||||
moxa,awk-1137c)
|
||||
ucidef_set_led_switch "wan" "LAN1" "green:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan" "LAN2" "green:lan2" "switch0" "0x04"
|
||||
;;
|
||||
netgear,wnr2200-8m|\
|
||||
netgear,wnr2200-16m)
|
||||
ucidef_set_led_netdev "wan-amber" "WAN (amber)" "amber:wan" "eth0"
|
||||
ucidef_set_led_switch "lan1green" "LAN1 (green)" "green:lan1" "switch0" "0x02" "0x04"
|
||||
ucidef_set_led_switch "lan2green" "LAN2 (green)" "green:lan2" "switch0" "0x04" "0x04"
|
||||
ucidef_set_led_switch "lan3green" "LAN3 (green)" "green:lan3" "switch0" "0x08" "0x04"
|
||||
ucidef_set_led_switch "lan4green" "LAN4 (green)" "green:lan4" "switch0" "0x10" "0x04"
|
||||
ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "amber:lan1" "switch0" "0x02" "0x02"
|
||||
ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "amber:lan2" "switch0" "0x04" "0x02"
|
||||
ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "amber:lan3" "switch0" "0x08" "0x02"
|
||||
ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "amber:lan4" "switch0" "0x10" "0x02"
|
||||
;;
|
||||
openmesh,om2p-v4|\
|
||||
openmesh,om2p-hs-v4)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
||||
;;
|
||||
openmesh,om2p-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x10"
|
||||
;;
|
||||
openmesh,om5p-ac-v1)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
;;
|
||||
openmesh,om5p-an)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
|
||||
;;
|
||||
pcs,cr3000)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x02"
|
||||
;;
|
||||
qca,ap143-8m|\
|
||||
qca,ap143-16m)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10"
|
||||
;;
|
||||
qihoo,c301)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
|
||||
;;
|
||||
ruckus,zf7025)
|
||||
ucidef_set_led_netdev "lan" "LAN5" "green:lan5" "eth0"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
ruckus,zf7372)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:eth1" "switch0" "0x02"
|
||||
;;
|
||||
samsung,wam250)
|
||||
ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth0"
|
||||
;;
|
||||
teltonika,rut230-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x04"
|
||||
;;
|
||||
teltonika,rut300)
|
||||
ucidef_set_led_netdev "wan" "WAN" "yellow:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "yellow:lan1" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "yellow:lan2" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "yellow:lan3" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "yellow:lan4" "switch0" "0x04"
|
||||
;;
|
||||
tplink,archer-a7-v5|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5)
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x20"
|
||||
;;
|
||||
tplink,archer-a9-v6)
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
||||
;;
|
||||
tplink,archer-c2-v3|\
|
||||
tplink,tl-wr1043nd-v4|\
|
||||
tplink,tl-wr1043n-v5)
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
tplink,archer-c6-v2|\
|
||||
tplink,archer-c6-v2-us)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
||||
;;
|
||||
tplink,archer-c25-v1|\
|
||||
tplink,tl-wr842n-v3)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
tplink,archer-d50-v1)
|
||||
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x1c"
|
||||
ucidef_set_led_switch "wan_data" "WAN Data" "white:internet" "switch0" "0x02" "" "tx rx"
|
||||
ucidef_set_led_switch "wan_link" "WAN Link" "white:wan" "switch0" "0x02" "" "link"
|
||||
;;
|
||||
tplink,archer-d7-v1|\
|
||||
tplink,archer-d7b-v1)
|
||||
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x3c"
|
||||
;;
|
||||
tplink,cpe210-v1|\
|
||||
tplink,cpe220-v2|\
|
||||
tplink,cpe220-v3|\
|
||||
tplink,cpe510-v1|\
|
||||
tplink,wbs210-v1|\
|
||||
tplink,wbs210-v2|\
|
||||
tplink,wbs510-v1|\
|
||||
tplink,wbs510-v2)
|
||||
ucidef_set_led_netdev "lan0" "LAN0" "green:lan0" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100"
|
||||
;;
|
||||
tplink,cpe510-v2|\
|
||||
tplink,cpe510-v3)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100" "0" "13"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "26" "100" "-25" "13"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100" "-50" "13"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100" "-75" "13"
|
||||
;;
|
||||
comfast,cf-e380ac-v2|\
|
||||
tplink,tl-wr902ac-v1)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_led_netdev "internet" "Internet" "green:internet" "eth0"
|
||||
;;
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3|\
|
||||
tplink,re455-v1)
|
||||
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
|
||||
ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link"
|
||||
;;
|
||||
tplink,tl-mr6400-v1)
|
||||
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x0e"
|
||||
ucidef_set_led_netdev "wan" "WAN" "white:wan" "eth1"
|
||||
ucidef_set_led_netdev "4g" "4G" "white:4g" "usb0"
|
||||
;;
|
||||
tplink,tl-wpa8630-v1)
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
||||
;;
|
||||
tplink,tl-wr841hp-v2|\
|
||||
tplink,tl-wr842n-v2)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
tplink,tl-wr941hp-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" "link tx rx"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:planet" "eth0"
|
||||
;;
|
||||
ubnt,bullet-ac|\
|
||||
ubnt,nanobeam-ac|\
|
||||
ubnt,nanobeam-ac-gen2|\
|
||||
ubnt,nanobeam-ac-xc|\
|
||||
ubnt,nanostation-ac|\
|
||||
ubnt,powerbeam-5ac-gen2)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi0" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "blue:rssi1" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:rssi2" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:rssi3" "wlan0" "76" "100"
|
||||
;;
|
||||
ubnt,bullet-m-xw|\
|
||||
ubnt,nanostation-loco-m-xw|\
|
||||
ubnt,nanostation-m-xw|\
|
||||
ubnt,powerbeam-m2-xw|\
|
||||
ubnt,powerbeam-m5-xw|\
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:link1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "orange:link2" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100"
|
||||
;;
|
||||
ubnt,uk-ultra)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "white:rssi0" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "white:rssi1" "wlan0" "26" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "white:rssi2" "wlan0" "51" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "white:rssi3" "wlan0" "76" "100"
|
||||
;;
|
||||
wallys,dr531)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x2"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "sig1" "SIG1" "green:sig1" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "sig2" "SIG2" "green:sig2" "wlan0" "25" "100"
|
||||
ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "50" "100"
|
||||
ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "75" "100"
|
||||
;;
|
||||
wd,mynet-wifi-rangeextender)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi-low" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "RSSIMED" "blue:rssi-med" "wlan0" "33" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "RSSIMAX" "blue:rssi-max" "wlan0" "66" "100"
|
||||
;;
|
||||
xiaomi,aiot-ac2350)
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
|
||||
;;
|
||||
yuncore,a770)
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
|
||||
;;
|
||||
zbtlink,zbt-wd323)
|
||||
ucidef_set_led_switch "lan1" "LAN1" "orange:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "orange:lan2" "switch0" "0x08"
|
||||
;;
|
||||
zyxel,nwa1100-nh)
|
||||
ucidef_set_led_netdev "lan_data" "LAN_DATA" "amber:lan" "eth0" "tx rx"
|
||||
ucidef_set_led_netdev "lan_link" "LAN_LINK" "green:lan" "eth0" "link"
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
880
target/linux/ath79/generic/base-files/etc/board.d/02_network
Normal file
880
target/linux/ath79/generic/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,880 @@
|
||||
|
||||
. /lib/functions/system.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
. /lib/functions/k2t.sh
|
||||
|
||||
ath79_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840|\
|
||||
allnet,all-wap02860ac|\
|
||||
alfa-network,ap121f|\
|
||||
alfa-network,pi-wifi4|\
|
||||
alfa-network,tube-2hq|\
|
||||
alfa-network,wifi-camppro-nano-duo|\
|
||||
araknis,an-300-ap-i-n|\
|
||||
araknis,an-500-ap-i-ac|\
|
||||
araknis,an-700-ap-i-ac|\
|
||||
arduino,yun|\
|
||||
aruba,ap-105|\
|
||||
aruba,ap-175|\
|
||||
asus,rp-ac51|\
|
||||
asus,rp-ac66|\
|
||||
avm,fritz1750e|\
|
||||
avm,fritz300e|\
|
||||
avm,fritzdvbc|\
|
||||
comfast,cf-wr752ac-v1|\
|
||||
comfast,cf-e130n-v2|\
|
||||
comfast,cf-e380ac-v2|\
|
||||
devolo,dvl1200i|\
|
||||
devolo,dvl1750c|\
|
||||
devolo,dvl1750i|\
|
||||
devolo,dvl1750x|\
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-2660-a1|\
|
||||
dlink,dap-2680-a1|\
|
||||
dlink,dap-3320-a1|\
|
||||
dlink,dir-505|\
|
||||
engenius,eap1200h|\
|
||||
engenius,eap1750h|\
|
||||
engenius,eap600|\
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750|\
|
||||
engenius,ecb600|\
|
||||
enterasys,ws-ap3705i|\
|
||||
extreme-networks,ws-ap3805i|\
|
||||
fortinet,fap-220-b|\
|
||||
fortinet,fap-221-b|\
|
||||
glinet,gl-ar300m-lite|\
|
||||
glinet,gl-usb150|\
|
||||
hak5,wifi-pineapple-nano|\
|
||||
huawei,ap6010dn|\
|
||||
meraki,mr16|\
|
||||
netgear,ex7300|\
|
||||
netgear,ex7300-v2|\
|
||||
netgear,wndap360|\
|
||||
ocedo,koala|\
|
||||
ocedo,raccoon|\
|
||||
onion,omega|\
|
||||
openmesh,mr600-v1|\
|
||||
openmesh,mr600-v2|\
|
||||
openmesh,mr900-v1|\
|
||||
openmesh,mr900-v2|\
|
||||
openmesh,mr1750-v1|\
|
||||
openmesh,mr1750-v2|\
|
||||
pcs,cap324|\
|
||||
pisen,ts-d084|\
|
||||
pisen,wmb001n|\
|
||||
pisen,wmm003n|\
|
||||
ruckus,zf7321|\
|
||||
ruckus,zf7341|\
|
||||
ruckus,zf7351|\
|
||||
siemens,ws-ap3610|\
|
||||
sophos,ap15|\
|
||||
sophos,ap15c|\
|
||||
sophos,ap55|\
|
||||
sophos,ap55c|\
|
||||
sophos,ap100|\
|
||||
sophos,ap100c|\
|
||||
tplink,cpe210-v2|\
|
||||
tplink,cpe210-v3|\
|
||||
tplink,cpe510-v2|\
|
||||
tplink,cpe510-v3|\
|
||||
tplink,cpe605-v1|\
|
||||
tplink,cpe610-v1|\
|
||||
tplink,cpe610-v2|\
|
||||
tplink,cpe710-v1|\
|
||||
tplink,cpe710-v2|\
|
||||
tplink,eap225-outdoor-v1|\
|
||||
tplink,eap225-outdoor-v3|\
|
||||
tplink,eap225-v1|\
|
||||
tplink,eap225-v3|\
|
||||
tplink,eap225-v4|\
|
||||
tplink,eap245-v1|\
|
||||
tplink,re350k-v1|\
|
||||
tplink,re355-v1|\
|
||||
tplink,re450-v1|\
|
||||
tplink,re450-v2|\
|
||||
tplink,re450-v3|\
|
||||
tplink,re455-v1|\
|
||||
tplink,tl-wa1201-v2|\
|
||||
tplink,tl-wr902ac-v1|\
|
||||
ubnt,bullet-ac|\
|
||||
ubnt,bullet-m-xw|\
|
||||
ubnt,lap-120|\
|
||||
ubnt,litebeam-ac-gen2|\
|
||||
ubnt,litebeam-m5-xw|\
|
||||
ubnt,nanobeam-ac|\
|
||||
ubnt,nanobeam-ac-xc|\
|
||||
ubnt,nanostation-ac-loco|\
|
||||
ubnt,nanostation-loco-m-xw|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,powerbeam-m2-xw|\
|
||||
ubnt,powerbeam-m5-xw|\
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-5ac-lite|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,uk-ultra|\
|
||||
ubnt,unifiac-lite|\
|
||||
ubnt,unifiac-lr|\
|
||||
ubnt,unifiac-mesh|\
|
||||
ubnt,unifi|\
|
||||
watchguard,ap100|\
|
||||
watchguard,ap200|\
|
||||
watchguard,ap300|\
|
||||
wd,mynet-wifi-rangeextender|\
|
||||
winchannel,wb2000|\
|
||||
zyxel,nwa1100-nh|\
|
||||
zyxel,nwa1121-ni|\
|
||||
zyxel,nwa1123-ac|\
|
||||
zyxel,nwa1123-ni)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
;;
|
||||
airtight,c-75)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:wan" "3:lan" "6@eth1"
|
||||
;;
|
||||
alfa-network,ap121fe)
|
||||
ucidef_set_interface_lan "eth0 usb0"
|
||||
;;
|
||||
alfa-network,n2q|\
|
||||
alfa-network,n5q|\
|
||||
devolo,dvl1200e|\
|
||||
devolo,dvl1750e|\
|
||||
elecom,wab-i1750-ps|\
|
||||
elecom,wab-s1167-ps|\
|
||||
elecom,wab-s600-ps|\
|
||||
engenius,ens1750|\
|
||||
engenius,enstationac-v1|\
|
||||
engenius,ews511ap|\
|
||||
engenius,ews660ap|\
|
||||
huawei,ap5030dn|\
|
||||
ocedo,ursus|\
|
||||
ruckus,zf7363|\
|
||||
ruckus,zf7372|\
|
||||
ubnt,unifi-ap-outdoor-plus)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
asus,pl-ac56)
|
||||
# port 6 (internal) is the power-line port
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "6:lan:4"
|
||||
;;
|
||||
asus,zenwifi-cd6n)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "4:lan:2"
|
||||
;;
|
||||
asus,zenwifi-cd6r)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:2" "3:lan:1" "4:lan:3" "2:wan"
|
||||
;;
|
||||
atheros,db120)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
||||
ucidef_add_switch "switch1" \
|
||||
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
|
||||
;;
|
||||
avm,fritz4020|\
|
||||
pcs,cr3000|\
|
||||
tplink,archer-c58-v1|\
|
||||
tplink,archer-c59-v1|\
|
||||
tplink,archer-c59-v2|\
|
||||
wd,mynet-n600)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
|
||||
;;
|
||||
belkin,f9j1108-v2|\
|
||||
belkin,f9k1115-v2|\
|
||||
nec,wg1400hp|\
|
||||
nec,wg1800hp|\
|
||||
nec,wg1800hp2|\
|
||||
tplink,archer-c5-v1|\
|
||||
tplink,archer-c7-v1|\
|
||||
tplink,archer-c7-v2|\
|
||||
tplink,tl-wdr4900-v2|\
|
||||
tplink,tl-wdr7500-v3)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
|
||||
;;
|
||||
buffalo,bhr-4grv|\
|
||||
buffalo,wzr-hp-g450h)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
||||
;;
|
||||
buffalo,bhr-4grv2|\
|
||||
trendnet,tew-823dru)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
|
||||
;;
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h|\
|
||||
tplink,archer-c25-v1|\
|
||||
tplink,archer-c60-v1|\
|
||||
tplink,archer-c60-v2|\
|
||||
tplink,archer-c60-v3|\
|
||||
tplink,tl-wdr3500-v1|\
|
||||
tplink,tl-wr842n-v1|\
|
||||
tplink,tl-wr842n-v3)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
teltonika,rut300)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
|
||||
;;
|
||||
buffalo,wzr-hp-g300nh-rb|\
|
||||
buffalo,wzr-hp-g300nh-s|\
|
||||
dlink,dir-825-b1|\
|
||||
trendnet,tew-673gru)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
|
||||
;;
|
||||
buffalo,wzr-hp-g302h-a1a0)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan"
|
||||
;;
|
||||
alcatel,hh40v|\
|
||||
comfast,cf-e110n-v2|\
|
||||
comfast,cf-e120a-v3|\
|
||||
comfast,cf-e314n-v2|\
|
||||
compex,wpj531-16m|\
|
||||
openmesh,a40|\
|
||||
openmesh,a60|\
|
||||
openmesh,om2p-v1|\
|
||||
openmesh,om2p-v4|\
|
||||
openmesh,om2p-hs-v4|\
|
||||
plasmacloud,pa300|\
|
||||
plasmacloud,pa300e|\
|
||||
tplink,cpe210-v1|\
|
||||
tplink,cpe220-v2|\
|
||||
tplink,cpe220-v3|\
|
||||
tplink,cpe510-v1|\
|
||||
tplink,wbs210-v1|\
|
||||
tplink,wbs210-v2|\
|
||||
tplink,wbs510-v1|\
|
||||
tplink,wbs510-v2|\
|
||||
ubnt,routerstation)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
comfast,cf-e375ac|\
|
||||
moxa,awk-1137c)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:wan" "2:lan"
|
||||
;;
|
||||
comfast,cf-e560ac|\
|
||||
qca,ap143-8m|\
|
||||
qca,ap143-16m|\
|
||||
tplink,tl-wr841hp-v3|\
|
||||
tplink,tl-wdr6500-v2)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
comfast,cf-wr650ac-v1|\
|
||||
comfast,cf-wr650ac-v2|\
|
||||
zyxel,nbg6616)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
|
||||
;;
|
||||
compex,wpj344-16m|\
|
||||
compex,wpj563)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "3:lan" "2:wan"
|
||||
;;
|
||||
compex,wpj558-16m)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:wan" "5:lan" "6@eth0"
|
||||
;;
|
||||
dell,apl26-0ae)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2" "6@eth1"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:wan" "3:lan" "4:lan"
|
||||
;;
|
||||
dlink,covr-c1200-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:wan" "2:lan"
|
||||
;;
|
||||
dlink,covr-p2500-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:wan" "4:plc"
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:wan" "6@eth1"
|
||||
;;
|
||||
dlink,dap-3662-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:2" "2:lan:1" "6@eth1"
|
||||
;;
|
||||
dlink,dch-g020-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:2" "2:lan:1"
|
||||
;;
|
||||
dlink,dir-629-a1|\
|
||||
dlink,dir-825-c1|\
|
||||
dlink,dir-835-a1|\
|
||||
dlink,dir-842-c1|\
|
||||
dlink,dir-842-c2|\
|
||||
dlink,dir-842-c3|\
|
||||
engenius,epg5000|\
|
||||
engenius,esr1200|\
|
||||
engenius,esr1750|\
|
||||
engenius,esr900|\
|
||||
sitecom,wlr-7100|\
|
||||
tplink,archer-c2-v3|\
|
||||
tplink,tl-wr1043nd-v4|\
|
||||
tplink,tl-wr1043n-v5)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
|
||||
;;
|
||||
elecom,wrc-1750ghbk2-i|\
|
||||
elecom,wrc-300ghbk2-i|\
|
||||
sitecom,wlr-8100)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan"
|
||||
;;
|
||||
embeddedwireless,balin)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "5:lan:1" "4:lan:2" "3:wan"
|
||||
;;
|
||||
embeddedwireless,dorin)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:wan" "2:lan:3" "3:lan:2"
|
||||
;;
|
||||
engenius,eap300-v2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan"
|
||||
;;
|
||||
engenius,ens202ext-v1)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan"
|
||||
;;
|
||||
etactica,eg200)
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
glinet,gl-ar750)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan"
|
||||
;;
|
||||
glinet,gl-x300b)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "4:lan"
|
||||
;;
|
||||
iodata,etg3-r|\
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
iodata,wn-ag300dgr|\
|
||||
pcs,cr5000|\
|
||||
wd,mynet-n750)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
;;
|
||||
jjplus,jwap230)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "5:wan:1" "1:lan:2" "6@eth1"
|
||||
;;
|
||||
joyit,jt-or750i)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
kuwfi,c910)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:2" "4:lan:1"
|
||||
;;
|
||||
kuwfi,n650)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2"
|
||||
;;
|
||||
letv,lba-047-ch)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
librerouter,librerouter-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "5:wan" "6@eth1" "4:lan"
|
||||
;;
|
||||
meraki,mr12)
|
||||
ucidef_set_interface_lan "eth0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan"
|
||||
;;
|
||||
asus,rt-ac59u|\
|
||||
asus,rt-ac59u-v2|\
|
||||
mercury,mw4530r-v1|\
|
||||
tplink,archer-a7-v5|\
|
||||
tplink,archer-a9-v6|\
|
||||
tplink,archer-c6-v2|\
|
||||
tplink,archer-c6-v2-us|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il|\
|
||||
tplink,tl-wdr4310-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
|
||||
;;
|
||||
nec,wf1200cr)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan"
|
||||
;;
|
||||
nec,wg1200cr|\
|
||||
qxwlan,e1700ac-v2-8m|\
|
||||
qxwlan,e1700ac-v2-16m|\
|
||||
qxwlan,e750g-v8-8m|\
|
||||
qxwlan,e750g-v8-16m|\
|
||||
ubnt,nanobeam-ac-gen2|\
|
||||
ubnt,nanostation-ac|\
|
||||
yuncore,a782|\
|
||||
yuncore,xd3200|\
|
||||
yuncore,xd4200)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:wan"
|
||||
;;
|
||||
nec,wg800hp|\
|
||||
xiaomi,aiot-ac2350)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:lan" "4:lan" "1:wan"
|
||||
;;
|
||||
netgear,wndr3700|\
|
||||
netgear,wndr3700-v2|\
|
||||
netgear,wndr3800|\
|
||||
netgear,wndr3800ch|\
|
||||
netgear,wndrmac-v1|\
|
||||
netgear,wndrmac-v2)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
|
||||
ucidef_add_switch_attr "switch0" "blinkrate" 2
|
||||
ucidef_add_switch_port_attr "switch0" 1 led 6
|
||||
ucidef_add_switch_port_attr "switch0" 2 led 9
|
||||
ucidef_add_switch_port_attr "switch0" 5 led 2
|
||||
;;
|
||||
netgear,wnr2200-8m|\
|
||||
netgear,wnr2200-16m)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
phicomm,k2t)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "3:lan:1" "5:lan:2" "4:wan"
|
||||
;;
|
||||
qihoo,c301)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan" "3:lan"
|
||||
;;
|
||||
qxwlan,e558-v2-8m|\
|
||||
qxwlan,e558-v2-16m)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "4:lan" "5:lan" "6@eth0" "3:wan"
|
||||
;;
|
||||
rosinson,wr818)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:wan"
|
||||
;;
|
||||
ruckus,zf7025)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth1" "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4"
|
||||
;;
|
||||
teltonika,rut955|\
|
||||
teltonika,rut955-h7v3c0)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
tplink,archer-d50-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "1:wan"
|
||||
;;
|
||||
tplink,archer-d7-v1|\
|
||||
tplink,archer-d7b-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
|
||||
;;
|
||||
tplink,deco-m4r-v1|\
|
||||
tplink,deco-s4-v2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "3:lan:1" "5:lan:2"
|
||||
;;
|
||||
tplink,eap225-wall-v2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
tplink,eap245-v3)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "5:lan:2"
|
||||
;;
|
||||
tplink,tl-mr6400-v1)
|
||||
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:1" "2:lan:3" "3:lan:2"
|
||||
;;
|
||||
tplink,tl-wpa8630-v1)
|
||||
# port 5 (internal) is the power-line port
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
|
||||
;;
|
||||
tplink,tl-wr841hp-v2|\
|
||||
tplink,tl-wr842n-v2|\
|
||||
tplink,tl-wr941hp-v1)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
|
||||
;;
|
||||
tplink,tl-wr1043nd-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
|
||||
;;
|
||||
tplink,tl-wr1043nd-v2|\
|
||||
tplink,tl-wr1043nd-v3|\
|
||||
tplink,tl-wr1045nd-v2)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
|
||||
;;
|
||||
tplink,tl-wr2543-v1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
|
||||
;;
|
||||
ubnt,aircube-ac)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2" "5:lan:3" "4:wan"
|
||||
;;
|
||||
ubnt,aircube-isp)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:3" "4:lan:2"
|
||||
;;
|
||||
ubnt,amplifi-router-hd)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:3" "4:lan:2" "5:lan:4" "1:wan"
|
||||
;;
|
||||
ubnt,edgeswitch-5xp)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
|
||||
;;
|
||||
ubnt,edgeswitch-8xp)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8" "eth1"
|
||||
;;
|
||||
ubnt,routerstation-pro)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
ubnt,nanostation-m-xw)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "5:lan" "1:wan"
|
||||
;;
|
||||
ubnt,unifiac-mesh-pro|\
|
||||
ubnt,unifiac-pro)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:lan:1" "3:lan:2"
|
||||
;;
|
||||
ubnt,unifi-ap-pro)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "1:lan" "2:lan"
|
||||
;;
|
||||
hiwifi,hc6361|\
|
||||
xiaomi,mi-router-4q|\
|
||||
zbtlink,zbt-wd323)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "3:lan:1" "4:lan:2"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ath79_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840)
|
||||
lan_mac=$(mtd_get_mac_binary "Board data" 2)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
alfa-network,ap121f|\
|
||||
alfa-network,ap121fe|\
|
||||
alfa-network,n2q|\
|
||||
alfa-network,n5q|\
|
||||
alfa-network,pi-wifi4|\
|
||||
alfa-network,r36a|\
|
||||
alfa-network,tube-2hq|\
|
||||
alfa-network,wifi-camppro-nano-duo|\
|
||||
engenius,eap300-v2|\
|
||||
engenius,ens202ext-v1)
|
||||
label_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
;;
|
||||
arduino,yun)
|
||||
base_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
lan_mac=$(macaddr_setbit $base_mac 29)
|
||||
[ $lan_mac = $base_mac ] && lan_mac=$(macaddr_unsetbit $base_mac 29)
|
||||
;;
|
||||
avm,fritz1750e|\
|
||||
avm,fritz450e|\
|
||||
avm,fritzdvbc)
|
||||
label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
avm,fritz300e)
|
||||
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
avm,fritz4020)
|
||||
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
comfast,cf-e375ac)
|
||||
wan_mac=$(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
|
||||
;;
|
||||
compex,wpj344-16m|\
|
||||
compex,wpj558-16m|\
|
||||
compex,wpj563)
|
||||
wan_mac=$(mtd_get_mac_binary u-boot 0x2e018)
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
devolo,magic-2-wifi)
|
||||
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
|
||||
;;
|
||||
dlink,covr-c1200-a1)
|
||||
lan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
|
||||
wan_mac=$(mtd_get_mac_ascii art "protest_wan_mac")
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
dlink,covr-p2500-a1)
|
||||
lan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
|
||||
wan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
|
||||
label_mac=$(mtd_get_mac_ascii art "protest_plc_mac")
|
||||
plc_mac=$(mtd_get_mac_ascii art "protest_plc_mac")
|
||||
[ -n "$plc_mac" ] && ucidef_set_interface_macaddr "plc" $plc_mac
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
lan_mac=$(mtd_get_mac_text "mp" 0x1)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-2660-a1|\
|
||||
dlink,dap-2680-a1|\
|
||||
dlink,dap-3320-a1)
|
||||
lan_mac=$(mtd_get_mac_ascii bdcfg "lanmac")
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
dlink,dap-2695-a1|\
|
||||
dlink,dap-3662-a1)
|
||||
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
|
||||
;;
|
||||
dlink,dir-629-a1)
|
||||
wan_mac=$(mtd_get_mac_text "mfcdata" 0x6a)
|
||||
;;
|
||||
trendnet,tew-673gru)
|
||||
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
|
||||
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
dlink,dir-505)
|
||||
lan_mac=$(mtd_get_mac_text "mac" 0x4)
|
||||
;;
|
||||
dlink,dir-825-c1|\
|
||||
dlink,dir-835-a1)
|
||||
wan_mac=$(mtd_get_mac_text "mac" 0x18)
|
||||
;;
|
||||
dlink,dir-842-c1|\
|
||||
dlink,dir-842-c2|\
|
||||
dlink,dir-842-c3)
|
||||
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
||||
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
qihoo,c301|\
|
||||
wd,mynet-n600|\
|
||||
wd,mynet-n750)
|
||||
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
||||
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
||||
;;
|
||||
elecom,wab-i1750-ps|\
|
||||
elecom,wab-s1167-ps|\
|
||||
elecom,wab-s600-ps|\
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
elecom,wrc-1750ghbk2-i|\
|
||||
elecom,wrc-300ghbk2-i)
|
||||
wan_mac=$(mtd_get_mac_ascii hwconfig "HW.WAN.MAC.Address")
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
engenius,epg5000|\
|
||||
engenius,esr1200|\
|
||||
engenius,esr1750|\
|
||||
engenius,esr900)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
;;
|
||||
engenius,ews511ap)
|
||||
lan_mac=$(mtd_get_mac_text "u-boot-env" 0xe9)
|
||||
eth1_mac=$(macaddr_add "$lan_mac" 1)
|
||||
ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
|
||||
ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
label_mac=$(mtd_get_mac_ascii u-boot-env0 ethaddr)
|
||||
;;
|
||||
hak5,lan-turtle|\
|
||||
hak5,packet-squirrel)
|
||||
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
;;
|
||||
iodata,etg3-r)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(macaddr_add "$lan_mac" -1)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
iodata,wn-ag300dgr)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
mercury,mw4530r-v1|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il)
|
||||
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
tplink,deco-s4-v2)
|
||||
lan_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
moxa,awk-1137c)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
nec,wf1200cr|\
|
||||
nec,wg1200cr)
|
||||
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
||||
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
nec,wg800hp)
|
||||
wan_mac=$(mtd_get_mac_text board_data 0x480)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
comfast,cf-e380ac-v2|\
|
||||
netgear,wndr3700|\
|
||||
netgear,wndr3700-v2|\
|
||||
netgear,wndr3800|\
|
||||
netgear,wndrmac-v1|\
|
||||
netgear,wndrmac-v2)
|
||||
lan_mac=$(macaddr_setbit_la "$(mtd_get_mac_binary art 0x0)")
|
||||
;;
|
||||
phicomm,k2t)
|
||||
lan_mac=$(k2t_get_mac "lan_mac")
|
||||
wan_mac=$(k2t_get_mac "wan_mac")
|
||||
;;
|
||||
rosinson,wr818)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0x0)
|
||||
lan_mac=$(macaddr_setbit_la "$wan_mac")
|
||||
;;
|
||||
ruckus,zf7025|\
|
||||
ruckus,zf7321|\
|
||||
ruckus,zf7341|\
|
||||
ruckus,zf7351|\
|
||||
ruckus,zf7363|\
|
||||
ruckus,zf7372)
|
||||
lan_mac=$(mtd_get_mac_binary board-data 0x807E)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
tplink,archer-a7-v5|\
|
||||
tplink,archer-a9-v6|\
|
||||
tplink,archer-c7-v4|\
|
||||
tplink,archer-c7-v5|\
|
||||
tplink,tl-wr1043nd-v4|\
|
||||
tplink,tl-wr1043n-v5)
|
||||
base_mac=$(mtd_get_mac_binary info 0x8)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
lan_mac=$(mtd_get_mac_text mac 0x4)
|
||||
wan_mac=$(mtd_get_mac_text mac 0x18)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifi)
|
||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||
;;
|
||||
ubnt,litebeam-ac-gen2|\
|
||||
ubnt,nanobeam-ac-gen2|\
|
||||
ubnt,nanobeam-ac-xc|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2)
|
||||
label_mac=$(mtd_get_mac_binary art 0x5006)
|
||||
;;
|
||||
ubnt,routerstation|\
|
||||
ubnt,routerstation-pro)
|
||||
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
wd,mynet-wifi-rangeextender)
|
||||
lan_mac=$(nvram get et0macaddr)
|
||||
;;
|
||||
xiaomi,aiot-ac2350)
|
||||
lan_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
;;
|
||||
zyxel,nbg6616)
|
||||
label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
ath79_setup_interfaces $board
|
||||
ath79_setup_macs $board
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Copyright (C) 2018 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840)
|
||||
ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "534" "1"
|
||||
ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "535"
|
||||
ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "536" "1"
|
||||
ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "537"
|
||||
ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "538" "1"
|
||||
ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "539"
|
||||
ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "527" "1"
|
||||
ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "528"
|
||||
ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "529" "1"
|
||||
ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "530"
|
||||
ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "531" "1"
|
||||
ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "532"
|
||||
;;
|
||||
asus,pl-ac56)
|
||||
ucidef_add_gpio_switch "plc_enable" "PLC enable" "526" "1"
|
||||
;;
|
||||
comfast,cf-e5|\
|
||||
telco,t1)
|
||||
ucidef_add_gpio_switch "lte_power" "LTE Power" "526" "1"
|
||||
ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "523" "1"
|
||||
ucidef_add_gpio_switch "lte_poweroff" "LTE Poweroff" "513" "1"
|
||||
ucidef_add_gpio_switch "lte_reset" "LTE Reset" "524" "1"
|
||||
;;
|
||||
devolo,dlan-pro-1200plus-ac)
|
||||
ucidef_add_gpio_switch "plc_enable" "PLC enable" "525" "0"
|
||||
;;
|
||||
devolo,magic-2-wifi)
|
||||
ucidef_add_gpio_switch "plc_pairing" "PLC pairing" "523" "1"
|
||||
ucidef_add_gpio_switch "plc_enable" "PLC enable" "525" "1"
|
||||
;;
|
||||
dlink,dir-825-c1|\
|
||||
dlink,dir-835-a1)
|
||||
ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "532" "0"
|
||||
;;
|
||||
librerouter,librerouter-v1)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "513" "0"
|
||||
;;
|
||||
teltonika,rut955)
|
||||
ucidef_add_gpio_switch "sim_sel" "SIM select" "542" "1"
|
||||
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "543" "0"
|
||||
ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "544" "0"
|
||||
ucidef_add_gpio_switch "modem_vbus" "Modem enable" "545" "1"
|
||||
ucidef_add_gpio_switch "modem_rst" "Modem reset" "546" "0"
|
||||
ucidef_add_gpio_switch "DOUT3" "DOUT3" "547" "0"
|
||||
;;
|
||||
teltonika,rut955-h7v3c0)
|
||||
ucidef_add_gpio_switch "sim_sel" "SIM select" "542" "1"
|
||||
ucidef_add_gpio_switch "DOUT1" "DOUT1 (OC)" "543" "0"
|
||||
ucidef_add_gpio_switch "DOUT2" "DOUT2 (Relay)" "544" "0"
|
||||
ucidef_add_gpio_switch "modem_vbus" "Modem enable" "547" "1"
|
||||
ucidef_add_gpio_switch "modem_rst" "Modem reset" "548" "0"
|
||||
;;
|
||||
|
||||
tplink,archer-c25-v1)
|
||||
ucidef_add_gpio_switch "led_control" "LED control" "533" "0"
|
||||
ucidef_add_gpio_switch "led_reset" "LED reset" "531" "1"
|
||||
;;
|
||||
tplink,cpe210-v1|\
|
||||
tplink,cpe220-v2|\
|
||||
tplink,cpe220-v3|\
|
||||
tplink,cpe510-v1|\
|
||||
tplink,wbs210-v1|\
|
||||
tplink,wbs210-v2|\
|
||||
tplink,wbs510-v1|\
|
||||
tplink,wbs510-v2)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "532"
|
||||
;;
|
||||
ubnt,aircube-ac|\
|
||||
ubnt,nanobeam-ac-gen2|\
|
||||
ubnt,nanostation-ac)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "515"
|
||||
;;
|
||||
ubnt,aircube-isp)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "523"
|
||||
;;
|
||||
ubnt,nanostation-m)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "520"
|
||||
;;
|
||||
ubnt,nanostation-m-xw)
|
||||
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "514"
|
||||
;;
|
||||
ubnt,uk-ultra)
|
||||
ucidef_add_gpio_switch "ant0_internal" "ANT0 Internal" "517" "1"
|
||||
ucidef_add_gpio_switch "ant1_internal" "ANT1 Internal" "518" "1"
|
||||
;;
|
||||
zbtlink,zbt-wd323)
|
||||
ucidef_add_gpio_switch "io0" "IO#0" "512"
|
||||
ucidef_add_gpio_switch "io1" "IO#1" "513"
|
||||
ucidef_add_gpio_switch "io2" "IO#2" "514"
|
||||
ucidef_add_gpio_switch "io14" "IO#14" "526"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,145 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions/caldata.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
||||
case $board in
|
||||
asus,pl-ac56|\
|
||||
asus,rp-ac51|\
|
||||
asus,rp-ac66)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
;;
|
||||
avm,fritz1750e|\
|
||||
avm,fritz4020|\
|
||||
avm,fritz450e|\
|
||||
avm,fritzdvbc)
|
||||
caldata_extract_reverse "urlader" 0x1541 0x440
|
||||
;;
|
||||
dlink,dir-505)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4)
|
||||
;;
|
||||
dlink,dir-842-c1|\
|
||||
dlink,dir-842-c2|\
|
||||
dlink,dir-842-c3|\
|
||||
wd,mynet-n600|\
|
||||
wd,mynet-n750)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
||||
;;
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
caldata_extract "calibrate" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1)
|
||||
;;
|
||||
extreme-networks,ws-ap3805i)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
|
||||
;;
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
iodata,wn-ag300dgr|\
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
;;
|
||||
moxa,awk-1137c)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
avm,fritz300e)
|
||||
caldata_extract_reverse "urloader" 0x1541 0x440
|
||||
;;
|
||||
buffalo,wzr-hp-g450h)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
;;
|
||||
dlink,dir-825-c1|\
|
||||
dlink,dir-835-a1)
|
||||
caldata_extract "art" 0x5000 0x440
|
||||
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1)
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
caldata_extract "calibrate" 0x5000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0)
|
||||
;;
|
||||
meraki,mr12)
|
||||
caldata_extract "art" 0x11000 0xeb8
|
||||
;;
|
||||
netgear,wnr2200-8m|\
|
||||
netgear,wnr2200-16m|\
|
||||
tplink,tl-wr842n-v1)
|
||||
caldata_extract "art" 0x1000 0x3e0
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m)
|
||||
caldata_extract "art" 0x1000 0x1000
|
||||
;;
|
||||
wd,mynet-n600|\
|
||||
wd,mynet-n750)
|
||||
caldata_extract "art" 0x5000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
|
||||
;;
|
||||
wd,mynet-wifi-rangeextender)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(nvram get wl0_hwaddr)
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:11.0.bin")
|
||||
case $board in
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h)
|
||||
caldata_extract "art" 0x1000 0xeb8
|
||||
;;
|
||||
trendnet,tew-673gru)
|
||||
caldata_extract "caldata" 0x1000 0xeb8
|
||||
ath9k_patch_mac_crc $(mtd_get_mac_text "caldata" 0xffa0) 0x20c
|
||||
;;
|
||||
meraki,mr16)
|
||||
caldata_extract "art" 0x11000 0xeb8
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:12.0.bin")
|
||||
case $board in
|
||||
buffalo,wzr-600dhp|\
|
||||
buffalo,wzr-hp-ag300h)
|
||||
caldata_extract "art" 0x5000 0xeb8
|
||||
;;
|
||||
trendnet,tew-673gru)
|
||||
caldata_extract "caldata" 0x5000 0xeb8
|
||||
ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_text "caldata" 0xffb4) 1) 0x20c
|
||||
;;
|
||||
meraki,mr16)
|
||||
caldata_extract "art" 0x15000 0xeb8
|
||||
;;
|
||||
*)
|
||||
caldata_die "board $board is not supported yet"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions/caldata.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath10k/pre-cal-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
dlink,dir-842-c1|\
|
||||
dlink,dir-842-c2|\
|
||||
dlink,dir-842-c3)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
caldata_valid "202f" || caldata_extract "reserved" 0x15000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
|
||||
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
||||
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,137 @@
|
||||
#!/bin/ash
|
||||
|
||||
[ "$ACTION" = "add" ] || exit 0
|
||||
|
||||
PHYNBR=${DEVPATH##*/phy}
|
||||
|
||||
[ -n $PHYNBR ] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
. /lib/functions/k2t.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840)
|
||||
macaddr_add "$(mtd_get_mac_binary 'Board data' 2)" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,covr-c1200-a1|\
|
||||
dlink,covr-p2500-a1)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii art "protest_ath1_mac" > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii art "protest_ath0_mac" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
mtd_get_mac_text "mp" 0x13 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-3320-a1)
|
||||
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-2660-a1|\
|
||||
dlink,dap-2680-a1|\
|
||||
dlink,dap-2695-a1|\
|
||||
dlink,dap-3662-a1)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
elecom,wab-i1750-ps|\
|
||||
elecom,wab-s1167-ps|\
|
||||
elecom,wab-s600-ps)
|
||||
# set the 5G MAC address (= ethaddr + 1)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||
# set the 2.4G MAC address (= ethaddr)
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii u-boot-env "ethaddr" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii u-boot-env athaddr > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
engenius,epg5000|\
|
||||
engenius,esr1200|\
|
||||
engenius,esr1750|\
|
||||
engenius,esr900)
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
engenius,ews511ap)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add $(cat /sys/class/net/eth0/address) 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
extreme-networks,ws-ap3805i)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
iodata,wn-ac1167dgr|\
|
||||
iodata,wn-ac1600dgr|\
|
||||
iodata,wn-ac1600dgr2|\
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100|\
|
||||
zyxel,nbg6616)
|
||||
# There is no eeprom data for 5 GHz wlan in "art" partition
|
||||
# which would allow to patch the macaddress
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
iodata,wn-ag300dgr)
|
||||
# There is no eeprom data for 5 GHz wlan in "art" partition
|
||||
# which would allow to patch the macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
nec,wf1200cr|\
|
||||
nec,wg1200cr|\
|
||||
qihoo,c301)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
phicomm,k2t)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
k2t_get_mac "5g_mac" > /sys${DEVPATH}/macaddress
|
||||
# The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
siemens,ws-ap3610)
|
||||
mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
tplink,deco-s4-v2)
|
||||
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add $base_mac 2 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
# set the 2.4G interface mac address to LAN MAC
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress
|
||||
# set the 5G interface mac address to WAN MAC + 1
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_text mac 0x18)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nbg6616)
|
||||
# Set mac address for 2.4g device
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ac)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ni)
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
inittab_add_console() {
|
||||
local console
|
||||
|
||||
case $(board_name) in
|
||||
elecom,wab-i1750-ps)
|
||||
console="ttyATH1"
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
[ "$DEVNAME" != "$console" ] && \
|
||||
return
|
||||
|
||||
# check existing (commented out) entry
|
||||
grep -q "^#\{0,1\}${console}::askfirst" "/etc/inittab" && \
|
||||
return
|
||||
|
||||
# append entry
|
||||
echo -e "\n${console}::askfirst:/usr/libexec/login.sh" \
|
||||
>> /etc/inittab
|
||||
}
|
||||
|
||||
[ "${ACTION}" = "add" ] && inittab_add_console
|
||||
19
target/linux/ath79/generic/base-files/etc/init.d/bootcount
Executable file
19
target/linux/ath79/generic/base-files/etc/init.d/bootcount
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840)
|
||||
fconfig -s -w -d $(find_mtd_part "RedBoot config") -n boot_cntb -x 0
|
||||
;;
|
||||
moxa,awk-1137c)
|
||||
fw_setenv fwr_verify 0
|
||||
;;
|
||||
qihoo,c301)
|
||||
local n=$(fw_printenv activeregion | cut -d = -f 2)
|
||||
fw_setenv "image${n}trynum" 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/migrations.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dlink,dap-1330-a1)
|
||||
migrate_leds "red:power=red:status" \
|
||||
"red:wifi=red:rssilow" \
|
||||
"green:wifi=green:rssimediumlow" \
|
||||
"green:signal1=green:rssimediumhigh" \
|
||||
"green:signal2=green:rssihigh"
|
||||
;;
|
||||
engenius,epg5000)
|
||||
migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
|
||||
;;
|
||||
glinet,gl-mifi)
|
||||
migrate_leds ":net=:3g4g"
|
||||
;;
|
||||
meraki,mr12)
|
||||
migrate_leds ":wifi=:link" ":wan=:lan"
|
||||
;;
|
||||
openmesh,mr600-v1)
|
||||
migrate_leds ":wlan58=:wifi5g"
|
||||
;;
|
||||
openmesh,mr600-v2)
|
||||
migrate_leds ":wlan24=:wifi2g" ":wlan58=:wifi5g"
|
||||
;;
|
||||
openmesh,mr900-v1|\
|
||||
openmesh,mr900-v2|\
|
||||
openmesh,mr1750-v1|\
|
||||
openmesh,mr1750-v2)
|
||||
migrate_leds ":wlan24=:wifi2g" ":wlan58=:wifi5g" ":wan=:lan"
|
||||
;;
|
||||
pcs,cap324)
|
||||
migrate_leds "lan:amber=amber:lan" "lan:green=green:lan"
|
||||
;;
|
||||
qxwlan,e558-v2-16m|\
|
||||
qxwlan,e558-v2-8m)
|
||||
migrate_leds ":qss=:sig2"
|
||||
;;
|
||||
qxwlan,e600g-v2-16m|\
|
||||
qxwlan,e600g-v2-8m)
|
||||
migrate_leds "blue:wan=blue:wlan"
|
||||
;;
|
||||
qxwlan,e600gac-v2-16m|\
|
||||
qxwlan,e600gac-v2-8m)
|
||||
migrate_leds "orange:wan=orange:wlan2g" "green:system=blue:system"
|
||||
;;
|
||||
qxwlan,e750a-v4-16m|\
|
||||
qxwlan,e750a-v4-8m|\
|
||||
qxwlan,e750g-v8-16m|\
|
||||
qxwlan,e750g-v8-8m)
|
||||
migrate_leds ":ds10=:sig1" ":ds20=:sig2"
|
||||
;;
|
||||
mercury,mw4530r-v1|\
|
||||
tplink,archer-c7-v2|\
|
||||
tplink,tl-wdr3600-v1|\
|
||||
tplink,tl-wdr4300-v1|\
|
||||
tplink,tl-wdr4300-v1-il|\
|
||||
tplink,tl-wdr4310-v1)
|
||||
migrate_leds "blue:=green:"
|
||||
;;
|
||||
tplink,tl-wpa8630-v1)
|
||||
migrate_leds ':wlan$=:wifi2g' ':wlan5$=:wifi5g'
|
||||
;;
|
||||
esac
|
||||
|
||||
remove_devicename_leds
|
||||
|
||||
migrations_apply system
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,14 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
jjplus,ja76pf2|\
|
||||
meraki,mr12|\
|
||||
meraki,mr16|\
|
||||
ubnt,routerstation|\
|
||||
ubnt,routerstation-pro)
|
||||
uci set system.@system[0].compat_version="2.0"
|
||||
uci commit system
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,28 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
fix_seama_header() {
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
||||
}
|
||||
|
||||
fixwrgg() {
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-2660-a1|\
|
||||
dlink,dap-2680-a1|\
|
||||
dlink,dap-2695-a1|\
|
||||
dlink,dap-3320-a1|\
|
||||
dlink,dap-3662-a1)
|
||||
fixwrgg
|
||||
;;
|
||||
dlink,dir-629-a1|\
|
||||
qihoo,c301)
|
||||
fix_seama_header
|
||||
;;
|
||||
esac
|
||||
54
target/linux/ath79/generic/base-files/lib/functions/k2t.sh
Normal file
54
target/linux/ath79/generic/base-files/lib/functions/k2t.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2018 Weijie Gao <hackpascal@gmail.com>
|
||||
#
|
||||
# Helper function to extract mac addresses from mtd part for Phicomm K2T
|
||||
#
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
k2t_config_load() {
|
||||
local mtd_blk=$(find_mtd_part config)
|
||||
|
||||
if [ -z "$mtd_blk" ]; then
|
||||
echo "k2t_config_load: no mtd part named config" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local json_size=$(dd if=$mtd_blk bs=1 count=8 2>/dev/null)
|
||||
|
||||
json_size="0x$json_size"
|
||||
json_size=$((json_size))
|
||||
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "k2t_config_load: invalid json data size" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$json_size" -eq 0 ]; then
|
||||
echo "k2t_config_load: empty json data" >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
local json_data=$(dd if=$mtd_blk bs=1 skip=8 count=$json_size 2>/dev/null)
|
||||
|
||||
json_load "$json_data"
|
||||
}
|
||||
|
||||
k2t_get_mac() {
|
||||
local old_ns
|
||||
|
||||
json_set_namespace "k2t" old_ns
|
||||
|
||||
if k2t_config_load; then
|
||||
json_select "this_dev_info"
|
||||
json_get_var val "$1"
|
||||
json_select ..
|
||||
fi
|
||||
|
||||
json_set_namespace old_ns
|
||||
|
||||
echo $val
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
do_sysinfo_ath79_fixup() {
|
||||
local model=""
|
||||
|
||||
case $(board_name) in
|
||||
netgear,ex7300)
|
||||
local part=$(find_mtd_part caldata)
|
||||
local board_hw_id=$(dd if=$part bs=1 skip=67 count=10 2>/dev/null)
|
||||
case "$board_hw_id" in
|
||||
5508013406)
|
||||
model="Netgear EX6400"
|
||||
;;
|
||||
5508013271)
|
||||
model="Netgear EX7300"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netgear,ex7300-v2)
|
||||
local part=$(find_mtd_part artmtd)
|
||||
local antenna_cfg=$(dd if=$part bs=1 skip=59 count=7 2>/dev/null)
|
||||
local board_hw_id=$(dd if=$part bs=1 skip=67 count=6 2>/dev/null)
|
||||
case "$antenna_cfg" in
|
||||
3X3+3X3)
|
||||
model="Netgear EX6250"
|
||||
;;
|
||||
3X3+4X4)
|
||||
# EX6400 v2, EX6410, EX6420
|
||||
model="Netgear ${board_hw_id:-EX6400 v2}"
|
||||
;;
|
||||
4X4+4X4)
|
||||
# EX7300 v2, EX7320
|
||||
model="Netgear ${board_hw_id:-EX7300 v2}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$model" ] && echo "$model" > /tmp/sysinfo/model
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_sysinfo_ath79_fixup
|
||||
@@ -0,0 +1,43 @@
|
||||
. /lib/functions/system.sh
|
||||
|
||||
preinit_set_mac_address() {
|
||||
case $(board_name) in
|
||||
avm,fritz1750e|\
|
||||
avm,fritz450e|\
|
||||
avm,fritzdvbc)
|
||||
ip link set dev eth0 address $(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
dlink,dap-2695-a1|\
|
||||
dlink,dap-3662-a1)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii bdcfg "lanmac")
|
||||
ip link set dev eth1 address $(mtd_get_mac_ascii bdcfg "wanmac")
|
||||
;;
|
||||
engenius,epg5000|\
|
||||
engenius,esr1200|\
|
||||
engenius,esr1750|\
|
||||
engenius,esr900)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env0 ethaddr)
|
||||
;;
|
||||
extreme-networks,ws-ap3805i|\
|
||||
siemens,ws-ap3610)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
|
||||
;;
|
||||
moxa,awk-1137c)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env mac_addr)
|
||||
;;
|
||||
tplink,deco-s4-v2)
|
||||
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
||||
ip link set dev eth0 address $base_mac
|
||||
;;
|
||||
zyxel,nbg6616)
|
||||
ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
ip link set dev eth0 address $(macaddr_add $ethaddr 2)
|
||||
ip link set dev eth1 address $(macaddr_add $ethaddr 3)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
||||
@@ -0,0 +1,105 @@
|
||||
# The U-Boot loader with the datachk patchset for dualbooting requires image
|
||||
# sizes and checksums to be provided in the U-Boot environment.
|
||||
# The devices come with 2 main partitions - while one is active
|
||||
# sysupgrade will flash the other. The boot order is changed to boot the
|
||||
# newly flashed partition. If the new partition can't be booted due to
|
||||
# upgrade failures the previously used partition is loaded.
|
||||
|
||||
platform_do_upgrade_dualboot_datachk() {
|
||||
local tar_file="$1"
|
||||
local restore_backup
|
||||
local primary_kernel_mtd
|
||||
|
||||
local setenv_script="/tmp/fw_env_upgrade"
|
||||
|
||||
local inactive_mtd="$(find_mtd_index $PART_NAME)"
|
||||
local inactive_offset="$(cat /sys/class/mtd/mtd${inactive_mtd}/offset)"
|
||||
local total_size="$(cat /sys/class/mtd/mtd${inactive_mtd}/size)"
|
||||
local flash_start_mem=0x9f000000
|
||||
|
||||
# detect to which flash region the new image is written to.
|
||||
#
|
||||
# 1. check what is the mtd index for the first flash region on this
|
||||
# device
|
||||
# 2. check if the target partition ("inactive") has the mtd index of
|
||||
# the first flash region
|
||||
#
|
||||
# - when it is: the new bootseq will be 1,2 and the first region is
|
||||
# modified
|
||||
# - when it isnt: bootseq will be 2,1 and the second region is
|
||||
# modified
|
||||
#
|
||||
# The detection has to be done via the hardcoded mtd partition because
|
||||
# the current boot might be done with the fallback region. Let us
|
||||
# assume that the current bootseq is 1,2. The bootloader detected that
|
||||
# the image in flash region 1 is corrupt and thus switches to flash
|
||||
# region 2. The bootseq in the u-boot-env is now still the same and
|
||||
# the sysupgrade code can now only rely on the actual mtd indexes and
|
||||
# not the bootseq variable to detect the currently booted flash
|
||||
# region/image.
|
||||
#
|
||||
# In the above example, an implementation which uses bootseq ("1,2") to
|
||||
# detect the currently booted image would assume that region 1 is booted
|
||||
# and then overwrite the variables for the wrong flash region (aka the
|
||||
# one which isn't modified). This could result in a device which doesn't
|
||||
# boot anymore to Linux until it was reflashed with ap51-flash.
|
||||
local next_boot_part="1"
|
||||
case "$(board_name)" in
|
||||
plasmacloud,pa300|\
|
||||
plasmacloud,pa300e)
|
||||
primary_kernel_mtd=3
|
||||
;;
|
||||
*)
|
||||
echo "failed to detect primary kernel mtd partition for board"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
[ "$inactive_mtd" = "$primary_kernel_mtd" ] || next_boot_part="2"
|
||||
|
||||
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
board_dir=${board_dir%/}
|
||||
|
||||
local kernel_length=$(tar xf $tar_file ${board_dir}/kernel -O | wc -c)
|
||||
local rootfs_length=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
|
||||
# rootfs without EOF marker
|
||||
rootfs_length=$((rootfs_length-4))
|
||||
|
||||
local kernel_md5=$(tar xf $tar_file ${board_dir}/kernel -O | md5sum); kernel_md5="${kernel_md5%% *}"
|
||||
# md5 checksum of rootfs with EOF marker
|
||||
local rootfs_md5=$(tar xf $tar_file ${board_dir}/root -O | dd bs=1 count=$rootfs_length | md5sum); rootfs_md5="${rootfs_md5%% *}"
|
||||
|
||||
#
|
||||
# add tar support to get_image() to use default_do_upgrade() instead?
|
||||
#
|
||||
|
||||
# take care of restoring a saved config
|
||||
[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
|
||||
mtd -q erase inactive
|
||||
tar xf $tar_file ${board_dir}/root -O | mtd -n -p $kernel_length $restore_backup write - $PART_NAME
|
||||
tar xf $tar_file ${board_dir}/kernel -O | mtd -n write - $PART_NAME
|
||||
|
||||
# prepare new u-boot env
|
||||
if [ "$next_boot_part" = "1" ]; then
|
||||
echo "bootseq 1,2" > $setenv_script
|
||||
else
|
||||
echo "bootseq 2,1" > $setenv_script
|
||||
fi
|
||||
|
||||
printf "kernel_size_%i %i\n" $next_boot_part $((kernel_length / 1024)) >> $setenv_script
|
||||
printf "vmlinux_start_addr 0x%08x\n" $((flash_start_mem + inactive_offset)) >> $setenv_script
|
||||
printf "vmlinux_size 0x%08x\n" ${kernel_length} >> $setenv_script
|
||||
printf "vmlinux_checksum %s\n" ${kernel_md5} >> $setenv_script
|
||||
|
||||
printf "rootfs_size_%i %i\n" $next_boot_part $(((total_size-kernel_length) / 1024)) >> $setenv_script
|
||||
printf "rootfs_start_addr 0x%08x\n" $((flash_start_mem+inactive_offset+kernel_length)) >> $setenv_script
|
||||
printf "rootfs_size 0x%08x\n" ${rootfs_length} >> $setenv_script
|
||||
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $setenv_script
|
||||
|
||||
# store u-boot env changes
|
||||
mkdir -p /var/lock
|
||||
fw_setenv -s $setenv_script || {
|
||||
echo "failed to update U-Boot environment"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
# U-Boot with the datachk patchset requires image sizes, offsets,
|
||||
# and checksums to be provided in the U-Boot environment.
|
||||
# This script is based on the dualboot version for devices that come with 2 OS partitions.
|
||||
# For Senao boards with a "failsafe" partition image, the process is almost the same.
|
||||
# Instead of booting a secondary instalation on checksum failure,
|
||||
# the failsafe image is booted instead.
|
||||
# These boards also use the OKLI lzma kernel loader and mtd-concat
|
||||
# So the kernel check is for the loader, the rootfs check is for kernel + rootfs
|
||||
|
||||
platform_do_upgrade_failsafe_datachk() {
|
||||
local flash_base=0x9f000000
|
||||
|
||||
local kernel_mtd=$(find_mtd_index ${KERNEL_PART:-kernel})
|
||||
local rootfs_mtd=$(find_mtd_index ${ROOTFS_PART:-rootfs})
|
||||
|
||||
local kernel_offset=$(cat /sys/class/mtd/mtd${kernel_mtd}/offset)
|
||||
local rootfs_offset=$(cat /sys/class/mtd/mtd${rootfs_mtd}/offset)
|
||||
|
||||
if [ -n "$IMAGE_LIST" ]; then
|
||||
KERNEL_FILE=$($IMAGE_LIST | grep $KERNEL_FILE)
|
||||
ROOTFS_FILE=$($IMAGE_LIST | grep $ROOTFS_FILE)
|
||||
fi
|
||||
|
||||
local kernel_size=$($IMAGE_CMD $KERNEL_FILE | wc -c)
|
||||
local rootfs_size=$($IMAGE_CMD $ROOTFS_FILE | wc -c)
|
||||
|
||||
# rootfs without JFFS2
|
||||
local rootfs_blocks=$((rootfs_size / 4096))
|
||||
rootfs_size=$((rootfs_blocks * 4096))
|
||||
|
||||
local kernel_md5=$($IMAGE_CMD $KERNEL_FILE | md5sum | cut -d ' ' -f1)
|
||||
local rootfs_md5=$($IMAGE_CMD $ROOTFS_FILE | dd bs=4k count=$rootfs_blocks iflag=fullblock | md5sum | cut -d ' ' -f1)
|
||||
|
||||
# prepare new u-boot-env vars
|
||||
printf "vmlinux_start_addr 0x%08x\n" $((flash_base + kernel_offset)) >> $ENV_SCRIPT
|
||||
printf "vmlinux_size 0x%08x\n" ${kernel_size} >> $ENV_SCRIPT
|
||||
printf "vmlinux_checksum %s\n" ${kernel_md5} >> $ENV_SCRIPT
|
||||
|
||||
printf "rootfs_start_addr 0x%08x\n" $((flash_base + rootfs_offset)) >> $ENV_SCRIPT
|
||||
printf "rootfs_size 0x%08x\n" ${rootfs_size} >> $ENV_SCRIPT
|
||||
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $ENV_SCRIPT
|
||||
|
||||
# store u-boot-env
|
||||
mkdir -p /var/lock
|
||||
[ -n "$SKIP_HASH" ] || fw_setenv -s $ENV_SCRIPT || {
|
||||
echo 'failed to update U-Boot environment'
|
||||
exit 1
|
||||
}
|
||||
|
||||
# sysupgrade
|
||||
sleep 2 && sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
|
||||
$IMAGE_CMD $KERNEL_FILE | mtd $MTD_ARGS write - ${KERNEL_PART:-kernel}
|
||||
|
||||
sleep 2 && sync && echo 3 > /proc/sys/vm/drop_caches
|
||||
|
||||
if [ -n "$UPGRADE_BACKUP" ]; then
|
||||
$IMAGE_CMD $ROOTFS_FILE | mtd $MTD_ARGS $MTD_CONFIG_ARGS -j $UPGRADE_BACKUP write - ${ROOTFS_PART:-rootfs}
|
||||
else
|
||||
$IMAGE_CMD $ROOTFS_FILE | mtd $MTD_ARGS write - ${ROOTFS_PART:-rootfs}
|
||||
fi
|
||||
|
||||
sync
|
||||
}
|
||||
114
target/linux/ath79/generic/base-files/lib/upgrade/openmesh.sh
Normal file
114
target/linux/ath79/generic/base-files/lib/upgrade/openmesh.sh
Normal file
@@ -0,0 +1,114 @@
|
||||
# The U-Boot loader of the OpenMesh devices requires image sizes and
|
||||
# checksums to be provided in the U-Boot environment.
|
||||
# The OpenMesh devices come with 2 main partitions - while one is active
|
||||
# sysupgrade will flash the other. The boot order is changed to boot the
|
||||
# newly flashed partition. If the new partition can't be booted due to
|
||||
# upgrade failures the previously used partition is loaded.
|
||||
|
||||
cfg_value_get()
|
||||
{
|
||||
local cfg=$1 cfg_opt
|
||||
local section=$2 our_section=0
|
||||
local param=$3 our_param=
|
||||
|
||||
for cfg_opt in $cfg; do
|
||||
[ "$cfg_opt" = "[$section]" ] && our_section=1 && continue
|
||||
[ "$our_section" = "1" ] || continue
|
||||
|
||||
our_param=${cfg_opt%%=*}
|
||||
[ "$param" = "$our_param" ] && echo ${cfg_opt##*=} && break
|
||||
done
|
||||
}
|
||||
|
||||
platform_do_upgrade_openmesh()
|
||||
{
|
||||
local img_path="$1"
|
||||
local restore_backup
|
||||
|
||||
local setenv_script="/tmp/fw_env_upgrade"
|
||||
|
||||
local inactive_mtd="$(find_mtd_index $PART_NAME)"
|
||||
local inactive_offset="$(cat /sys/class/mtd/mtd${inactive_mtd}/offset)"
|
||||
local total_size="$(cat /sys/class/mtd/mtd${inactive_mtd}/size)"
|
||||
local total_kbs=$((total_size / 1024))
|
||||
local flash_start_mem=0x9f000000
|
||||
local data_offset=$((64 * 1024))
|
||||
|
||||
# detect to which flash region the new image is written to.
|
||||
#
|
||||
# 1. check what is the mtd index for the first flash region on this
|
||||
# device
|
||||
# 2. check if the target partition ("inactive") has the mtd index of
|
||||
# the first flash region
|
||||
#
|
||||
# - when it is: the new bootseq will be 1,2 and the first region is
|
||||
# modified
|
||||
# - when it isn't: bootseq will be 2,1 and the second region is
|
||||
# modified
|
||||
#
|
||||
# The detection has to be done via the hardcoded mtd partition because
|
||||
# the current boot might be done with the fallback region. Let us
|
||||
# assume that the current bootseq is 1,2. The bootloader detected that
|
||||
# the image in flash region 1 is corrupt and thus switches to flash
|
||||
# region 2. The bootseq in the u-boot-env is now still the same and
|
||||
# the sysupgrade code can now only rely on the actual mtd indexes and
|
||||
# not the bootseq variable to detect the currently booted flash
|
||||
# region/image.
|
||||
#
|
||||
# In the above example, an implementation which uses bootseq ("1,2") to
|
||||
# detect the currently booted image would assume that region 1 is booted
|
||||
# and then overwrite the variables for the wrong flash region (aka the
|
||||
# one which isn't modified). This could result in a device which doesn't
|
||||
# boot anymore to Linux until it was reflashed with ap51-flash.
|
||||
local next_boot_part="1"
|
||||
local primary_kernel_mtd="3"
|
||||
[ "$inactive_mtd" = "$primary_kernel_mtd" ] || next_boot_part="2"
|
||||
|
||||
local cfg_size=$(dd if="$img_path" bs=8 skip=70 count=1 iflag=skip_bytes 2>/dev/null)
|
||||
local cfg_length=$((0x$cfg_size))
|
||||
local cfg_content=$(dd if="$img_path" bs=$cfg_length skip=$data_offset count=1 iflag=skip_bytes 2>/dev/null)
|
||||
|
||||
local kernel_size=$(dd if="$img_path" bs=8 skip=142 count=1 iflag=skip_bytes 2>/dev/null)
|
||||
local kernel_length=$((0x$kernel_size))
|
||||
local kernel_kbs=$((kernel_length / 1024))
|
||||
local kernel_md5=$(cfg_value_get "$cfg_content" "vmlinux" "md5sum")
|
||||
|
||||
local rootfs_size=$(dd if="$img_path" bs=8 skip=214 count=1 iflag=skip_bytes 2>/dev/null)
|
||||
local rootfs_length=$((0x$rootfs_size))
|
||||
local rootfs_md5=$(cfg_value_get "$cfg_content" "rootfs" "md5sum")
|
||||
local rootfs_checksize=$(cfg_value_get "$cfg_content" "rootfs" "checksize")
|
||||
|
||||
# take care of restoring a saved config
|
||||
[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
|
||||
# write image parts
|
||||
mtd -q erase inactive
|
||||
dd if="$img_path" bs=1 skip=$((data_offset + cfg_length + kernel_length)) count=$rootfs_length 2>&- | \
|
||||
mtd -n -p $kernel_length $restore_backup write - $PART_NAME
|
||||
dd if="$img_path" bs=1024 skip=$((data_offset + cfg_length)) count=$kernel_kbs iflag=skip_bytes 2>&- | \
|
||||
mtd -n write - $PART_NAME
|
||||
|
||||
# prepare new u-boot env
|
||||
if [ "$next_boot_part" = "1" ]; then
|
||||
echo "bootseq 1,2" > $setenv_script
|
||||
else
|
||||
echo "bootseq 2,1" > $setenv_script
|
||||
fi
|
||||
|
||||
printf "kernel_size_%i %i\n" $next_boot_part $kernel_kbs >> $setenv_script
|
||||
printf "vmlinux_start_addr 0x%08x\n" $((flash_start_mem + inactive_offset)) >> $setenv_script
|
||||
printf "vmlinux_size 0x%08x\n" ${kernel_length} >> $setenv_script
|
||||
printf "vmlinux_checksum %s\n" ${kernel_md5} >> $setenv_script
|
||||
|
||||
printf "rootfs_size_%i %i\n" $next_boot_part $((total_kbs - kernel_kbs)) >> $setenv_script
|
||||
printf "rootfs_start_addr 0x%08x\n" $((flash_start_mem+inactive_offset+kernel_length)) >> $setenv_script
|
||||
printf "rootfs_size %s\n" $rootfs_checksize >> $setenv_script
|
||||
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $setenv_script
|
||||
|
||||
# store u-boot env changes
|
||||
mkdir -p /var/lock
|
||||
fw_setenv -s $setenv_script || {
|
||||
echo "failed to update U-Boot environment"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
130
target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
Normal file
130
target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,130 @@
|
||||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
|
||||
PART_NAME=firmware
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
|
||||
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
||||
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
jjplus,ja76pf2|\
|
||||
ubnt,routerstation|\
|
||||
ubnt,routerstation-pro)
|
||||
platform_check_image_redboot_fis "$1"
|
||||
;;
|
||||
nec,wg1400hp|\
|
||||
nec,wg1800hp|\
|
||||
nec,wg1800hp2)
|
||||
local uboot_mtd=$(find_mtd_part "bootloader")
|
||||
|
||||
# check "U-Boot <year>.<month>" string in the "bootloader" partition
|
||||
if ! grep -q "U-Boot [0-9]\{4\}\.[0-9]\{2\}" $uboot_mtd; then
|
||||
v "The bootloader doesn't seem to be replaced to U-Boot!"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
adtran,bsap1800-v2|\
|
||||
adtran,bsap1840)
|
||||
platform_do_upgrade_redboot_fis "$1" vmlinux_2
|
||||
;;
|
||||
allnet,all-wap02860ac|\
|
||||
araknis,an-300-ap-i-n|\
|
||||
araknis,an-500-ap-i-ac|\
|
||||
araknis,an-700-ap-i-ac|\
|
||||
engenius,eap1200h|\
|
||||
engenius,eap1750h|\
|
||||
engenius,eap300-v2|\
|
||||
engenius,eap600|\
|
||||
engenius,ecb600|\
|
||||
engenius,ens1750|\
|
||||
engenius,ens202ext-v1|\
|
||||
engenius,enstationac-v1|\
|
||||
engenius,ews660ap|\
|
||||
watchguard,ap100|\
|
||||
watchguard,ap200|\
|
||||
watchguard,ap300)
|
||||
ENV_SCRIPT="/tmp/fw_env"
|
||||
IMAGE_LIST="tar tzf $1"
|
||||
IMAGE_CMD="tar xzOf $1"
|
||||
KERNEL_PART="loader"
|
||||
ROOTFS_PART="fwconcat0"
|
||||
KERNEL_FILE="uImage-lzma.bin"
|
||||
ROOTFS_FILE="root.squashfs"
|
||||
platform_do_upgrade_failsafe_datachk "$1"
|
||||
;;
|
||||
fortinet,fap-220-b|\
|
||||
fortinet,fap-221-b)
|
||||
SKIP_HASH="1"
|
||||
ENV_SCRIPT="/dev/null"
|
||||
IMAGE_LIST="tar tzf $1"
|
||||
IMAGE_CMD="tar xzOf $1"
|
||||
KERNEL_PART="loader"
|
||||
ROOTFS_PART="fwconcat0"
|
||||
KERNEL_FILE="uImage-lzma.bin"
|
||||
ROOTFS_FILE="root.squashfs"
|
||||
platform_do_upgrade_failsafe_datachk "$1"
|
||||
;;
|
||||
huawei,ap5030dn|\
|
||||
huawei,ap6010dn)
|
||||
# Store beginning address of the "firmware" partition
|
||||
# as KernelA address and KernelB address, each to BootupA & BootupB
|
||||
# This is the address from which the bootloader will try to load the kernel.
|
||||
echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" | dd of=$(find_mtd_part BootupA) bs=1 seek=$((0x254)) conv=notrunc
|
||||
echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" | dd of=$(find_mtd_part BootupB) bs=1 seek=$((0x254)) conv=notrunc
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
jjplus,ja76pf2)
|
||||
platform_do_upgrade_redboot_fis "$1" linux
|
||||
;;
|
||||
openmesh,a40|\
|
||||
openmesh,a60|\
|
||||
openmesh,mr600-v1|\
|
||||
openmesh,mr600-v2|\
|
||||
openmesh,mr900-v1|\
|
||||
openmesh,mr900-v2|\
|
||||
openmesh,mr1750-v1|\
|
||||
openmesh,mr1750-v2|\
|
||||
openmesh,om2p-v1|\
|
||||
openmesh,om2p-v2|\
|
||||
openmesh,om2p-v4|\
|
||||
openmesh,om2p-hs-v1|\
|
||||
openmesh,om2p-hs-v2|\
|
||||
openmesh,om2p-hs-v3|\
|
||||
openmesh,om2p-hs-v4|\
|
||||
openmesh,om2p-lc|\
|
||||
openmesh,om5p|\
|
||||
openmesh,om5p-ac-v1|\
|
||||
openmesh,om5p-ac-v2|\
|
||||
openmesh,om5p-an)
|
||||
PART_NAME="inactive"
|
||||
platform_do_upgrade_openmesh "$1"
|
||||
;;
|
||||
plasmacloud,pa300|\
|
||||
plasmacloud,pa300e)
|
||||
PART_NAME="inactive"
|
||||
platform_do_upgrade_dualboot_datachk "$1"
|
||||
;;
|
||||
ubnt,routerstation|\
|
||||
ubnt,routerstation-pro)
|
||||
platform_do_upgrade_redboot_fis "$1" kernel
|
||||
;;
|
||||
*)
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
platform_check_image_redboot_fis() {
|
||||
if [ "$(get_magic_word "$1")" != "7379" ]; then
|
||||
v "Unknown image format, aborting!"
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
platform_do_upgrade_redboot_fis() {
|
||||
local append
|
||||
local sysup_file="$1"
|
||||
local kern_part="$2"
|
||||
|
||||
if [ "$(get_magic_word "$sysup_file")" = "7379" ]; then
|
||||
local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
|
||||
[ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP"
|
||||
|
||||
if grep -q "mtd1.*loader" /proc/mtd; then
|
||||
tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \
|
||||
mtd -r $append write - loader:firmware
|
||||
|
||||
else
|
||||
local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c)
|
||||
|
||||
tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \
|
||||
mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs
|
||||
fi
|
||||
fi
|
||||
}
|
||||
27
target/linux/ath79/generic/config-default
Normal file
27
target/linux/ath79/generic/config-default
Normal file
@@ -0,0 +1,27 @@
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GPIO_WATCHDOG=y
|
||||
CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_GPIO=y
|
||||
CONFIG_INTEL_XWAY_PHY=y
|
||||
CONFIG_IP17XX_PHY=y
|
||||
CONFIG_MARVELL_PHY=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MTD_SPI_NOR_SWP_DISABLE=y
|
||||
# CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE is not set
|
||||
CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
|
||||
CONFIG_MTD_SPLIT_EVA_FW=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_NVMEM_U_BOOT_ENV=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_VITESSE_PHY=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
7
target/linux/ath79/generic/target.mk
Normal file
7
target/linux/ath79/generic/target.mk
Normal file
@@ -0,0 +1,7 @@
|
||||
BOARDNAME:=Generic
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-mbedtls
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards.
|
||||
endef
|
||||
Reference in New Issue
Block a user