From 1485f06d7e02cd9e15ca0f7895a9e697ed2f15dc Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Fri, 2 Apr 2021 16:10:47 +0200 Subject: [PATCH] ar71xx: mikrotik: fix upgrading beyond 19.07 using sysupgrade Newer releases uses a different path within sysupgrade to store files. This leads to sysupgrade currently being broken when trying to upgrade MikroTik devices to this newer model, even when using the Force flag. Fix this by trying the newer location for verification if the standard one fails. This patch allows to easily use sysupgrade for upgrading Mikrotik devices beyond 19.07 releases. Using RB922 as an example: boardname --> rb-922uags-5hpacd sysupgrade archive main folder name: Within 19.07 --> sysupgrade-mikrotik/ Beyond 19.07 --> sysupgrade-mikrotik_routerboard-922uags-5hpacd/ Signed-off-by: Koen Vandeputte --- target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index f44cdb061f..9e4c0a8731 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -571,7 +571,8 @@ platform_check_image() { rb-2011uias-2hnd-r2|\ rb-sxt2n|\ rb-sxt5n) - nand_do_platform_check routerboard $1 + nand_do_platform_check routerboard $1 || + nand_do_platform_check mikrotik_routerboard-$(echo "$board" | cut -c 4- ) $1 return $? ;; c-60|\ -- 2.30.2