Skip to content

Commit

Permalink
Revert "ramips: sync with upsteam target"
Browse files Browse the repository at this point in the history
This reverts commit 9cd0dc0.
  • Loading branch information
coolsnowwolf committed Apr 15, 2019
1 parent 281b7eb commit 1933bc8
Show file tree
Hide file tree
Showing 315 changed files with 1,345 additions and 3,478 deletions.
55 changes: 17 additions & 38 deletions target/linux/ramips/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ alfa-network,ac1200rm)
alfa-network,awusfree1)
set_wifi_led "$boardname:blue:wlan"
;;
alfa-network,tube-e4g)
ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0"
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" "eth0"
;;
all0256n-4M|\
all0256n-8M)
ucidef_set_rssimon "wlan0" "200000" "1"
Expand All @@ -64,10 +60,6 @@ bdcom,wap2100-sk|\
hiwifi,hc5861b)
set_wifi_led "$boardname:green:wlan2g"
;;
belkin,f9k1109v1)
set_usb_led "$boardname:green:usb1"
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0"
;;
broadway)
set_wifi_led "$boardname:red:wps_active"
;;
Expand Down Expand Up @@ -196,11 +188,6 @@ ht-tm02)
ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0"
set_wifi_led "$boardname:blue:wlan"
;;
iodata,wn-ac1167gr|\
iodata,wn-ac733gr3)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$boardname:green:wlan5g" "phy0radio"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$boardname:green:wlan2g" "phy1radio"
;;
kimax,u35wf)
set_wifi_led "$boardname:blue:wifi"
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
Expand Down Expand Up @@ -236,6 +223,16 @@ mikrotik,rbm11g)
miniembplug)
set_wifi_led "$boardname:red:wlan"
;;
mir3g)
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08"
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08"
ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
;;
mir4)
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x08" "0x08"
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x01" "0x08"
ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x02" "0x08"
;;
mlw221|\
mlwg2)
set_wifi_led "$boardname:blue:wifi"
Expand All @@ -256,8 +253,8 @@ mzk-ex750np)
;;
netgear,r6120)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "phy1tpt"
;;
oy-0001)
set_wifi_led "$boardname:green:wifi"
Expand All @@ -283,9 +280,6 @@ netgear,r6350)
ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
set_wifi_led "$boardname:green:wifi"
;;
rakwireless,rak633)
set_wifi_led "$boardname:blue:wifi"
;;
re350-v1)
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0"
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1"
Expand Down Expand Up @@ -347,8 +341,7 @@ tplink,c20-v4)
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0"
;;
tplink,c50-v3|\
tplink,c50-v4)
tplink,c50-v3)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan2g" "phy0tpt"
Expand Down Expand Up @@ -399,31 +392,20 @@ wavlink,wl-wn570ha1)
ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan0" "85" "100"
set_wifi_led "$boardname:green:wifi"
;;
wavlink,wl-wn575a3)
we1026-5g-16m)
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
set_wifi_led "we1026-5g:green:wifi"
;;
wl-wn575a3)
ucidef_set_rssimon "wlan1" "200000" "1"
ucidef_set_led_rssi "wifi-low" "wifi-low" "$boardname:green:wifi-low" "wlan1" "1" "49"
ucidef_set_led_rssi "wifi-med" "wifi-med" "$boardname:green:wifi-med" "wlan1" "50" "84"
ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan1" "85" "100"
;;
we1026-5g-16m)
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
set_wifi_led "we1026-5g:green:wifi"
;;
wrh-300cr)
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0"
;;
xiaomi,mir3g)
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08"
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08"
ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
;;
xiaomi,mir3p)
ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x10" "0x08"
ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x02" "0x08"
ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08"
ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08"
;;
xzwifi,creativebox-v1)
ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
;;
Expand Down Expand Up @@ -471,9 +453,6 @@ zyxel,keenetic-extra-ii)
set_wifi_led "$boardname:green:wifi"
ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01"
;;
zyxel,keenetic-start)
set_wifi_led "rt2800pci-phy0::radio"
;;
youku-yk1)
set_wifi_led "$boardname:blue:air"
ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
Expand Down
72 changes: 21 additions & 51 deletions target/linux/ramips/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ramips_setup_interfaces()
case $board in
11acnas|\
d-team,newifi-d2|\
dir-615-h1|\
w2914nsv2|\
zbt-we2026)
ucidef_add_switch "switch0" \
Expand Down Expand Up @@ -108,6 +107,7 @@ ramips_setup_interfaces()
mtc,wr1201|\
mzk-750dhp|\
mzk-w300nh2|\
netgear,r6120|\
nixcore-x1-8M|\
nixcore-x1-16M|\
oy-0001|\
Expand All @@ -123,14 +123,13 @@ ramips_setup_interfaces()
unielec,u7621-06-512m-64m|\
vr500|\
wavlink,wl-wn570ha1|\
wavlink,wl-wn575a3|\
wf-2881|\
whr-g300n|\
mqmaker,witi-256m|\
mqmaker,witi-512m|\
wl-wn575a3|\
wndr3700v5|\
youku-yk1|\
youku,yk-l2|\
zbt-ape522ii|\
zbt-we1326|\
zbtlink,zbt-we3526|\
Expand All @@ -148,7 +147,6 @@ ramips_setup_interfaces()
"0:lan" "1:lan" "2:lan" "4:wan" "6@eth0"
;;
alfa-network,awusfree1|\
alfa-network,tube-e4g|\
cs-qr10|\
d105|\
dlink,dap-1522-a1|\
Expand All @@ -163,7 +161,6 @@ ramips_setup_interfaces()
ravpower,wd03|\
tama,w06|\
tplink,tl-mr3020-v3|\
tplink,tl-wr802n-v4|\
u25awf-h1|\
wli-tx4-ag300n|\
wmdr-143n|\
Expand All @@ -180,6 +177,14 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0"
;;
mir3g)
ucidef_add_switch "switch0" \
"2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
;;
mir4)
ucidef_add_switch "switch0" \
"1:lan:1" "2:lan:2" "4:wan" "6t@eth0"
;;
psg1218b)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
Expand All @@ -193,12 +198,10 @@ ramips_setup_interfaces()
;;
ar670w|\
ar725w|\
rakwireless,rak633|\
rt-ac51u)
ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0"
;;
belkin,f9k1109v1|\
rt-n15|\
wl-351)
ucidef_add_switch "switch0" \
Expand All @@ -223,14 +226,13 @@ ramips_setup_interfaces()
jhr-n805r|\
jhr-n825r|\
jhr-n926r|\
mikrotik,rb750gr3|\
mikrotik,rbm33g|\
mzk-wdpr|\
rb750gr3|\
rt-n14u|\
skylab,skw92a|\
tplink,c20-v4|\
tplink,c50-v3|\
tplink,c50-v4|\
tplink,tl-mr3420-v5|\
tplink,tl-wr842n-v5|\
tl-wr840n-v4|\
Expand Down Expand Up @@ -322,11 +324,6 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "5:wan" "6@eth0"
;;
iodata,wn-ac1167gr|\
iodata,wn-ac733gr3)
ucidef_add_switch "switch1" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0"
;;
kn_rf)
ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0"
Expand All @@ -345,10 +342,6 @@ ramips_setup_interfaces()
"0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
ucidef_set_interface_wan "usb0"
;;
netgear,r6120)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
;;
hc5761)
ucidef_add_switch "switch0" \
"1:lan" "4:lan" "0:wan" "6@eth0"
Expand All @@ -367,9 +360,6 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0"
;;
dlink,dir-510l|\
glinet,vixmini|\
netgear,ex6150|\
re350-v1)
ucidef_add_switch "switch0" \
"0:lan" "6@eth0"
Expand Down Expand Up @@ -433,32 +423,20 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:wan" "6@eth0"
;;
wiznet,wizfi630s)
ucidef_add_switch "switch0" \
"0:wan" "3:lan" "4:lan" "6@eth0"
;;
wt3020-4M|\
wt3020-8M)
ucidef_add_switch "switch0" \
"4:lan" "0:wan" "6@eth0"
;;
xiaomi,mir3g)
ucidef_add_switch "switch0" \
"2:lan:2" "3:lan:1" "1:wan" "6t@eth0"
;;
xiaomi,mir3p)
xiaomi,miwifi-r3)
ucidef_add_switch "switch0" \
"1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
"1:lan" "4:lan" "0:wan" "6@eth0"
;;
zbtlink,zbt-we1226|\
y1)
ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"
;;
zyxel,keenetic-start)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0"
;;
*)
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
if [ -n "${RT3X5X}" ]; then
Expand Down Expand Up @@ -506,10 +484,6 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
belkin,f9k1109v1)
wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
;;
br-6475nd)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(mtd_get_mac_binary devdata 7)
Expand All @@ -526,7 +500,6 @@ ramips_setup_macs()
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
;;
dlink,dir-510l|\
dlink,dwr-116-a1|\
dlink,dwr-118-a1|\
dlink,dwr-118-a2|\
Expand Down Expand Up @@ -561,10 +534,6 @@ ramips_setup_macs()
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
iodata,wn-ac1167gr|\
iodata,wn-ac733gr3)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" -1)
;;
iodata,wn-ax1167gr|\
iodata,wn-gx300gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" 1)
Expand All @@ -582,6 +551,14 @@ ramips_setup_macs()
lan_mac=$(mtd_get_mac_binary factory_info 13)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
mir3g)
lan_mac=$(mtd_get_mac_binary Factory 0xe006)
;;
mir4)
lan_mac=$(mtd_get_mac_binary Factory 0xe006)
wan_mac=$(mtd_get_mac_binary Factory 0xe000)
;;
xiaomi,miwifi-r3|\
miwifi-mini)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$wan_mac")
Expand Down Expand Up @@ -663,13 +640,6 @@ ramips_setup_macs()
wlr-6000)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2)
;;
xiaomi,mir3g|\
xiaomi,mir3p)
lan_mac=$(mtd_get_mac_binary Factory 0xe006)
;;
zyxel,keenetic-start)
wan_mac=$(mtd_get_mac_binary factory 40)
;;
*)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
Expand Down
7 changes: 0 additions & 7 deletions target/linux/ramips/base-files/etc/board.d/03_gpio_switches
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ board_config_update
board=$(board_name)

case "$board" in
dlink,dir-510l)
ucidef_add_gpio_switch "usb_enable1" "USB 1A enable" "12" "0"
ucidef_add_gpio_switch "usb_enable05" "USB 0.5A enable" "13" "1"
;;
mikrotik,rb750gr3)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "17"
;;
ubnt-erx)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rt2x00_eeprom_extract() {
[ -n "$mtd" ] || \
rt2x00_eeprom_die "no mtd device found for partition $part"

dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
rt2x00_eeprom_die "failed to extract from $mtd"
}

Expand All @@ -39,7 +39,7 @@ rt2x00_eeprom_set_macaddr() {
rt2x00_eeprom_die "invalid wlan mac address"

macaddr_2bin $macaddr | dd of=/lib/firmware/$FIRMWARE \
conv=notrunc oflag=seek_bytes bs=6 seek=4 count=1 2>/dev/null || \
conv=notrunc bs=1 seek=4 count=6 2>/dev/null || \
rt2x00_eeprom_die "failed to write mac address to eeprom file"
}

Expand All @@ -54,7 +54,6 @@ board=$(board_name)
case "$FIRMWARE" in
"soc_wmac.eeprom")
case $board in
dlink,dir-510l|\
dlink,dwr-116-a1|\
dlink,dwr-118-a1|\
dlink,dwr-118-a2|\
Expand Down
Loading

0 comments on commit 1933bc8

Please sign in to comment.