aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2022-04-29 16:38:27 +0200
committerChristian Lamparter <chunkeey@gmail.com>2022-06-25 00:05:21 +0200
commitd01e374074ef333aa14ae74628e52fa60f5b5ae5 (patch)
tree37e07f73e699f92e47a539e766fdeb01937381d6
parentb9d67e2608134e6d5c4f8c4d64be7271ccc8455c (diff)
downloadupstream-d01e374074ef333aa14ae74628e52fa60f5b5ae5.tar.gz
upstream-d01e374074ef333aa14ae74628e52fa60f5b5ae5.tar.bz2
upstream-d01e374074ef333aa14ae74628e52fa60f5b5ae5.zip
ramips: force ZyXEL NR7101 to boot from "Kernel" partition
Make sure BootingFlag points to the system partition we install to. The BootingFlag variable selects which system partition the system boots from (0 => "Kernel", 1 => "Kernel2"). OpenWrt does not yet have device specific support for this dual image scheme, and can therefore only boot from "Kernel". This has not been an issue until now, since all known OEM firmware versions have ignored "Kernel2" - leaving the BootingFlag fixed at 0. But the newest OEM firmware has a new upgrade procedure, installing to the "inactive" system partition and setting BootingFlag accordingly. This workaround is needed until the dual image scheme is fully supported. Signed-off-by: Bjørn Mork <bjorn@mork.no> (cherry picked from commit 79112e7d4758cc79dea506ffebdf40e00d94fa06)
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 407611a6a2..e12eb3ede9 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -113,6 +113,7 @@ platform_do_upgrade() {
zyxel,nr7101)
fw_setenv CheckBypass 0
fw_setenv Image1Stable 0
+ [ "$(fw_printenv -n BootingFlag)" = "0" ] || fw_setenv BootingFlag 0
CI_KERNPART="Kernel"
nand_do_upgrade "$1"
;;