aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files
diff options
context:
space:
mode:
authorLuka Perkov <luka.perkov@sartura.hr>2016-06-23 13:57:21 +0200
committerGitHub <noreply@github.com>2016-06-23 13:57:21 +0200
commit282b917e47d9ae5017e1e426face9b75cb7aabd0 (patch)
tree3284ca2d20d9c8d7a4563c6446675c1ecf3feac2 /target/linux/ar71xx/base-files
parent34d432b05312de6d9575c559db8209809489096d (diff)
parent441a9c879ba6562ea9f431cf33bbb0c0400d5fd0 (diff)
downloadmaster-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.gz
master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.bz2
master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.zip
Merge pull request #11 from wigyori/master
pull req for 4.4.12, ar71xx/mediatek updates, package upgrades
Diffstat (limited to 'target/linux/ar71xx/base-files')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds26
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network17
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/03_gpio_switches5
-rw-r--r--target/linux/ar71xx/base-files/etc/diag.sh12
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata4
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh31
-rw-r--r--target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh75
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh14
8 files changed, 138 insertions, 46 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 39b21ca519..6936b8c873 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -127,6 +127,7 @@ cf-e316n-v2)
ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
;;
+cpe210|\
cpe510)
ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
@@ -322,7 +323,8 @@ mr600)
ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
;;
-mr1750)
+mr1750 | \
+mr1750v2)
ucidef_set_led_netdev "lan" "LAN" "mr1750:blue:wan" "eth0"
ucidef_set_led_wlan "wlan58" "WLAN58" "mr1750:blue:wlan58" "phy0tpt"
ucidef_set_led_wlan "wlan24" "WLAN24" "mr1750:blue:wlan24" "phy1tpt"
@@ -383,6 +385,7 @@ om2p | \
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+om2p-hsv3 | \
om2p-lc)
ucidef_set_led_netdev "port1" "port1" "om2p:blue:wan" "eth0"
ucidef_set_led_netdev "port2" "port2" "om2p:blue:lan" "eth1"
@@ -423,6 +426,14 @@ smart-300)
ucidef_set_led_wlan "wlan" "WLAN" "nc-link:green:wlan" "phy0tpt"
;;
+som9331)
+ ucidef_set_led_netdev "wan" "WAN" "som9331:orange:wan" "eth1"
+ ucidef_set_led_switch "lan1" "LAN1" "som9331:orange:lan1" "switch0" "0x08"
+ ucidef_set_led_switch "lan2" "LAN2" "som9331:orange:lan2" "switch0" "0x02"
+ ucidef_set_led_wlan "wlan" "WLAN" "som9331:red:wlan" "phy0tpt"
+ ucidef_set_led_usbdev "usb" "USB" "som9331:green:system" "1-1"
+ ;;
+
tellstick-znet-lite)
ucidef_set_led_netdev "lan_act" "LANACT" "tellstick:green:lan" "eth0" "tx rx"
ucidef_set_led_netdev "lan_link" "LANLINK" "tellstick:orange:lan" "eth0" "link"
@@ -607,7 +618,8 @@ tl-wa830re-v2)
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
;;
-tl-wr841n-v9)
+tl-wr841n-v9 | \
+tl-wr841n-v11)
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
@@ -626,6 +638,16 @@ tl-wr842n-v2)
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
;;
+tl-wr842n-v3)
+ ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
+ ;;
+
tl-wa801nd-v2 | \
tl-wa901nd-v3)
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 67adf334aa..1ed593cc55 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -72,6 +72,7 @@ bsb)
ucidef_set_interface_wlan
;;
+cpe210|\
cpe510)
ucidef_add_switch "switch0" \
"0@eth0" "5:lan" "4:wan"
@@ -200,7 +201,7 @@ tellstick-znet-lite)
tl-wdr4300|\
tl-wr1041n-v2)
ucidef_add_switch "switch0" \
- "0@eth0" "1:wan" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4"
+ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
;;
tl-wr1043nd)
@@ -335,6 +336,7 @@ eap7660d |\
el-mini |\
loco-m-xw |\
mr1750 |\
+mr1750v2 |\
mr18 |\
mr600 |\
mr600v2 |\
@@ -368,7 +370,7 @@ tl-wa901nd-v3 |\
tl-wa901nd-v4 |\
tl-wr703n |\
tube2h |\
-unifiac |\
+unifiac-lite |\
wndap360 |\
mynet-rext |\
wp543)
@@ -398,7 +400,8 @@ routerstation|\
tl-wr710n |\
tl-wr720n-v3|\
tl-wr810n |\
-wpe72)
+wpe72 |\
+wrtnode2q)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
@@ -418,6 +421,11 @@ wpj344)
"0@eth0" "3:lan" "2:wan"
;;
+unifiac-pro)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan" "3:wan"
+ ;;
+
wpj531)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
@@ -444,6 +452,7 @@ oolite |\
qihoo-c301 |\
rb-750 |\
rb-751 |\
+som9331 |\
tew-632brp |\
tew-712br |\
tew-732br |\
@@ -456,6 +465,8 @@ tl-wr741nd |\
tl-wr741nd-v4 |\
tl-wr841n-v7 |\
tl-wr841n-v9 |\
+tl-wr841n-v11 |\
+tl-wr842n-v3 |\
whr-g301n |\
whr-hp-g300n |\
whr-hp-gn |\
diff --git a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
index 8abcfc0db0..5b95f155cf 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
@@ -17,9 +17,14 @@ nanostation-m)
nanostation-m-xw)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
;;
+cpe210|\
cpe510)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
;;
+rb-912uag-2hpnd|\
+rb-912uag-5hpnd)
+ ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52"
+ ;;
esac
board_config_flush
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index f95a72d295..520fef8097 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -176,7 +176,8 @@ get_status_led() {
mr600v2)
status_led="mr600:blue:power"
;;
- mr1750)
+ mr1750 | \
+ mr1750v2)
status_led="mr1750:blue:power"
;;
mr900 | \
@@ -207,6 +208,7 @@ get_status_led() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+ om2p-hsv3 | \
om2p-lc)
status_led="om2p:blue:power"
;;
@@ -276,6 +278,9 @@ get_status_led() {
tellstick-znet-lite)
status_led="tellstick:white:system"
;;
+ som9331)
+ status_led="som9331:green:system"
+ ;;
tew-632brp)
status_led="tew-632brp:green:status"
;;
@@ -319,8 +324,10 @@ get_status_led() {
tl-wr841n-v1 | \
tl-wr841n-v7 | \
tl-wr841n-v8 | \
+ tl-wr841n-v11 | \
tl-wa830re-v2 | \
tl-wr842n-v2 | \
+ tl-wr842n-v3 | \
tl-wr941nd | \
tl-wr941nd-v5)
status_led="tp-link:green:system"
@@ -355,7 +362,8 @@ get_status_led() {
status_led="ubnt:green:dome"
;;
uap-pro | \
- unifiac)
+ unifiac-lite | \
+ unifiac-pro)
status_led="ubnt:white:dome"
;;
unifi-outdoor-plus)
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 8fc3ab3cd4..0e93feb19c 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -72,11 +72,13 @@ case "$FIRMWARE" in
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
;;
mr1750 | \
+ mr1750v2 | \
om5p-acv2)
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
;;
- unifiac)
+ unifiac-lite | \
+ unifiac-pro)
ath10kcal_extract "EEPROM" 20480 2116
;;
esac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index d71b8ba838..5b81f739f4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -446,7 +446,11 @@ ar71xx_board_detect() {
*"COMFAST CF-E316N v2")
name="cf-e316n-v2"
;;
- *"CPE210/220/510/520")
+ *"CPE210/220")
+ name="cpe210"
+ tplink_pharos_board_detect
+ ;;
+ *"CPE510/520")
name="cpe510"
tplink_pharos_board_detect
;;
@@ -595,6 +599,9 @@ ar71xx_board_detect() {
*MR1750)
name="mr1750"
;;
+ *MR1750v2)
+ name="mr1750v2"
+ ;;
*MR600)
name="mr600"
;;
@@ -640,6 +647,9 @@ ar71xx_board_detect() {
*"OM2P HSv2")
name="om2p-hsv2"
;;
+ *"OM2P HSv3")
+ name="om2p-hsv3"
+ ;;
*"OM2P LC")
name="om2p-lc"
;;
@@ -784,6 +794,9 @@ ar71xx_board_detect() {
*"Telldus TellStick ZNet Lite")
name="tellstick-znet-lite"
;;
+ *SOM9331)
+ name="som9331"
+ ;;
*TEW-632BRP)
name="tew-632brp"
;;
@@ -907,9 +920,15 @@ ar71xx_board_detect() {
*"TL-WR841N/ND v9")
name="tl-wr841n-v9"
;;
+ *"TL-WR841N/ND v11")
+ name="tl-wr841n-v11"
+ ;;
*"TL-WR842N/ND v2")
name="tl-wr842n-v2"
;;
+ *"TL-WR842N/ND v3")
+ name="tl-wr842n-v3"
+ ;;
*TL-WR941ND)
name="tl-wr941nd"
;;
@@ -949,8 +968,11 @@ ar71xx_board_detect() {
*UniFi)
name="unifi"
;;
- *"UniFi-AC")
- name="unifiac"
+ *"UniFi-AC-LITE")
+ name="unifiac-lite"
+ ;;
+ *"UniFi-AC-PRO")
+ name="unifiac-pro"
;;
*"UniFi AP Pro")
name="uap-pro"
@@ -1033,6 +1055,9 @@ ar71xx_board_detect() {
*WRT400N)
name="wrt400n"
;;
+ *"WRTnode2Q board")
+ name="wrtnode2q"
+ ;;
*"WZR-450HP2")
name="wzr-450hp2"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 209cdaaf90..87b65165b4 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -36,62 +36,48 @@ platform_add_ramfs_ubootenv()
}
append sysupgrade_pre_upgrade platform_add_ramfs_ubootenv
-platform_check_image_openmesh()
+platform_check_image_target_openmesh()
{
- local img_magic=$1
- local img_path=$2
- local fw_printenv=/usr/sbin/fw_printenv
- local img_board_target= img_num_files= i=0
- local cfg_name= kernel_name= rootfs_name=
-
- case "$img_magic" in
- # Combined Extended Image v1
- 43453031)
- img_board_target=$(trim $(dd if="$img_path" bs=4 skip=1 count=8 2>/dev/null))
- img_num_files=$(trim $(dd if="$img_path" bs=2 skip=18 count=1 2>/dev/null))
- ;;
- *)
- echo "Invalid image ($img_magic). Use combined extended images on this platform"
- return 1
- ;;
- esac
+ img_board_target="$1"
case "$img_board_target" in
OM2P)
- [ "$board" = "om2p" ] && break
- [ "$board" = "om2pv2" ] && break
- [ "$board" = "om2p-lc" ] && break
- [ "$board" = "om2p-hs" ] && break
- [ "$board" = "om2p-hsv2" ] && break
+ [ "$board" = "om2p" ] && return 0
+ [ "$board" = "om2pv2" ] && return 0
+ [ "$board" = "om2p-lc" ] && return 0
+ [ "$board" = "om2p-hs" ] && return 0
+ [ "$board" = "om2p-hsv2" ] && return 0
+ [ "$board" = "om2p-hsv3" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
OM5P)
- [ "$board" = "om5p" ] && break
- [ "$board" = "om5p-an" ] && break
+ [ "$board" = "om5p" ] && return 0
+ [ "$board" = "om5p-an" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
OM5PAC)
- [ "$board" = "om5p-ac" ] && break
- [ "$board" = "om5p-acv2" ] && break
+ [ "$board" = "om5p-ac" ] && return 0
+ [ "$board" = "om5p-acv2" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
MR1750)
- [ "$board" = "mr1750" ] && break
+ [ "$board" = "mr1750" ] && return 0
+ [ "$board" = "mr1750v2" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
MR600)
- [ "$board" = "mr600" ] && break
- [ "$board" = "mr600v2" ] && break
+ [ "$board" = "mr600" ] && return 0
+ [ "$board" = "mr600v2" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
MR900)
- [ "$board" = "mr900" ] && break
- [ "$board" = "mr900v2" ] && break
+ [ "$board" = "mr900" ] && return 0
+ [ "$board" = "mr900v2" ] && return 0
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
@@ -100,8 +86,31 @@ platform_check_image_openmesh()
return 1
;;
esac
+}
+
+platform_check_image_openmesh()
+{
+ local img_magic=$1
+ local img_path=$2
+ local fw_printenv=/usr/sbin/fw_printenv
+ local img_board_target= img_num_files= i=0
+ local cfg_name= kernel_name= rootfs_name=
+
+ case "$img_magic" in
+ # Combined Extended Image v1
+ 43453031)
+ img_board_target=$(trim $(dd if="$img_path" bs=4 skip=1 count=8 2>/dev/null))
+ img_num_files=$(trim $(dd if="$img_path" bs=2 skip=18 count=1 2>/dev/null))
+ ;;
+ *)
+ echo "Invalid image ($img_magic). Use combined extended images on this platform"
+ return 1
+ ;;
+ esac
+
+ platform_check_image_target_openmesh "$img_board_target" || return 1
- [ $img_num_files -ne 3 ] && {
+ [ $img_num_files -lt 3 ] && {
echo "Invalid number of embedded images ($img_num_files). Use the correct image for this platform"
return 1
}
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 9f8a14b2bc..313e2e639b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -268,10 +268,12 @@ platform_check_image() {
wlae-ag300n | \
nbg460n_550n_550nh | \
unifi | \
- unifiac | \
+ unifiac-lite | \
+ unifiac-pro | \
unifi-outdoor | \
carambola2 | \
- weio )
+ weio | \
+ wrtnode2q)
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1
@@ -279,6 +281,7 @@ platform_check_image() {
return 0
;;
+ cpe210|\
cpe510)
tplink_pharos_check_image "$1" && return 0
return 1
@@ -313,6 +316,7 @@ platform_check_image() {
return 0;
;;
mr1750 | \
+ mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -321,6 +325,7 @@ platform_check_image() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+ om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \
@@ -345,6 +350,7 @@ platform_check_image() {
onion-omega | \
oolite | \
smart-300 | \
+ som9331 | \
tellstick-znet-lite | \
tl-mr10u | \
tl-mr11u | \
@@ -384,7 +390,9 @@ platform_check_image() {
tl-wr841n-v7 | \
tl-wr841n-v8 | \
tl-wr841n-v9 | \
+ tl-wr841n-v11 | \
tl-wr842n-v2 | \
+ tl-wr842n-v3 | \
tl-wr941nd | \
tl-wr941nd-v5 | \
tl-wr941nd-v6 | \
@@ -571,6 +579,7 @@ platform_do_upgrade() {
platform_do_upgrade_dir825b "$ARGV"
;;
mr1750 | \
+ mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -579,6 +588,7 @@ platform_do_upgrade() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+ om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \