aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/base-files/lib')
-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
3 files changed, 62 insertions, 34 deletions
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 | \