aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2016-06-22 14:12:09 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-22 14:12:09 +0200
commit299c437ccd1fd605eef2e15f07397866864cf896 (patch)
tree13f424074215d071d37938c40af9e89a3b8ace2c /target/linux/ar71xx/base-files
parent906ce8b22a737a5f880f5f21214580e9f04305b8 (diff)
downloadmaster-187ad058-299c437ccd1fd605eef2e15f07397866864cf896.tar.gz
master-187ad058-299c437ccd1fd605eef2e15f07397866864cf896.tar.bz2
master-187ad058-299c437ccd1fd605eef2e15f07397866864cf896.zip
ar71xx: update bomb
ar71xx: split tp-link image building code into a separate file ar71xx: split legacy image building code into a separate file ar71xx: split ubnt image building code into a separate file ar71xx: move generic device image definitions to a separate file ar71xx: move nand device image definitions to a separate file ar71xx: Add support for initramfs images for OpenMesh devices ar71xx: Generate sysupgrade images for OpenMesh devices ar71xx: Move OpenMesh image target validation into subfunction ar71xx: Allow OpenMesh CE images with more than 3 files ar71xx: add kernel support for the OpenMesh OM2P-HSv3 ar71xx: add user-space support for the OpenMesh OM2P-HSv3 ar71xx: enable sysupgrade for the OpenMesh OM2P-HSv3 package/om-watchdog: add OpenMesh OM2P-HSv3 support package/uboot-envtools: add OpenMesh OM2P-HSv3 support ar71xx: add OM2P-HSv3 to the OM2P profile ar71xx: add kernel support for the OpenMesh MR1750v2 ar71xx: add user-space support for the OpenMesh MR1750v2 ar71xx: enable sysupgrade for the OpenMesh MR1750v2 package/om-watchdog: add OpenMesh MR1750v2 support package/uboot-envtools: add OpenMesh MR1750v2 support ar71xx: extract ath10k wifi board.bin for the OpenMesh MR1750v2 board ar71xx: add MR1750v2 to the MR1750 profile ar71xx/cpe510: split profile into 2 profiles cpe210 and cpe510 ar71xx/cpe510: use second wifi calibration table ar71xx: add GPIO pin for usb power switch for RouterBOARD 912 ar71xx: switch ordering and template to improve readability ar71xx: Fix TL-WR841N v11 LEDs, use separate machine Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'target/linux/ar71xx/base-files')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/01_leds8
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network3
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/03_gpio_switches5
-rw-r--r--target/linux/ar71xx/base-files/etc/diag.sh5
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata1
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh15
-rw-r--r--target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh75
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh6
8 files changed, 81 insertions, 37 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 f6ea9a8501..fc2bffe497 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"
@@ -607,7 +610,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"
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 e7da0653e2..8de29317e3 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"
@@ -335,6 +336,7 @@ eap7660d |\
el-mini |\
loco-m-xw |\
mr1750 |\
+mr1750v2 |\
mr18 |\
mr600 |\
mr600v2 |\
@@ -461,6 +463,7 @@ tl-wr741nd |\
tl-wr741nd-v4 |\
tl-wr841n-v7 |\
tl-wr841n-v9 |\
+tl-wr841n-v11 |\
tl-wr842n-v3 |\
whr-g301n |\
whr-hp-g300n |\
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 5e6d305593..e43657148a 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"
;;
@@ -319,6 +321,7 @@ get_status_led() {
tl-wr841n-v1 | \
tl-wr841n-v7 | \
tl-wr841n-v8 | \
+ tl-wr841n-v11 | \
tl-wa830re-v2 | \
tl-wr842n-v2 | \
tl-wr842n-v3 | \
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 d925a852d6..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,6 +72,7 @@ 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)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index eb87dd4ecb..c2ad7690a3 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"
;;
@@ -907,6 +917,9 @@ 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"
;;
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 0d6aa6b67e..bfab73cc7c 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -280,6 +280,7 @@ platform_check_image() {
return 0
;;
+ cpe210|\
cpe510)
tplink_pharos_check_image "$1" && return 0
return 1
@@ -314,6 +315,7 @@ platform_check_image() {
return 0;
;;
mr1750 | \
+ mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -322,6 +324,7 @@ platform_check_image() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+ om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \
@@ -385,6 +388,7 @@ platform_check_image() {
tl-wr841n-v7 | \
tl-wr841n-v8 | \
tl-wr841n-v9 | \
+ tl-wr841n-v11 | \
tl-wr842n-v2 | \
tl-wr842n-v3 | \
tl-wr941nd | \
@@ -573,6 +577,7 @@ platform_do_upgrade() {
platform_do_upgrade_dir825b "$ARGV"
;;
mr1750 | \
+ mr1750v2 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -581,6 +586,7 @@ platform_do_upgrade() {
om2pv2 | \
om2p-hs | \
om2p-hsv2 | \
+ om2p-hsv3 | \
om2p-lc | \
om5p | \
om5p-an | \