[openwrt/openwrt] ramips: force ZyXEL NR7101 to boot from "Kernel" partition

LEDE Commits lede-commits at lists.infradead.org
Fri Jun 24 08:11:14 PDT 2022


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/79112e7d4758cc79dea506ffebdf40e00d94fa06

commit 79112e7d4758cc79dea506ffebdf40e00d94fa06
Author: Bjørn Mork <bjorn at mork.no>
AuthorDate: Fri Apr 29 16:38:27 2022 +0200

    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 at mork.no>
---
 target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh | 1 +
 1 file changed, 1 insertion(+)

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 9d5e7576ec..8055396b85 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -114,6 +114,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"
 		;;




More information about the lede-commits mailing list