From a0880ed0f1af15c2148aabfb4a81f8e363b5ccc9 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 11 Mar 2022 16:28:41 +0100 Subject: [PATCH] edgecore: disable dual boot on eap10x/ecw5211 Signed-off-by: John Crispin --- .../ipq807x/base-files/etc/init.d/bootcount | 6 +++- ...-ipq40xx-disable-dualboot-on-ecw5211.patch | 31 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 patches/ipq40xx/0013-ipq40xx-disable-dualboot-on-ecw5211.patch diff --git a/feeds/ipq807x/ipq807x/base-files/etc/init.d/bootcount b/feeds/ipq807x/ipq807x/base-files/etc/init.d/bootcount index a24f27353..76b96457f 100755 --- a/feeds/ipq807x/ipq807x/base-files/etc/init.d/bootcount +++ b/feeds/ipq807x/ipq807x/base-files/etc/init.d/bootcount @@ -6,7 +6,11 @@ boot() { case "$(board_name)" in edgecore,eap101|\ edgecore,eap102) - fw_setenv bootcount 0 + avail=$(fw_printenv -n upgrade_available) + [ ${avail} -eq 0 ] || { + fw_setenv bootcount 0 + fw_setenv upgrade_available 0 + } ;; esac } diff --git a/patches/ipq40xx/0013-ipq40xx-disable-dualboot-on-ecw5211.patch b/patches/ipq40xx/0013-ipq40xx-disable-dualboot-on-ecw5211.patch new file mode 100644 index 000000000..4a25ab869 --- /dev/null +++ b/patches/ipq40xx/0013-ipq40xx-disable-dualboot-on-ecw5211.patch @@ -0,0 +1,31 @@ +From 9ff18b1e8b9417c50566f469d8b3f5f36bef746a Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 11 Mar 2022 16:13:41 +0100 +Subject: [PATCH] ipq40xx: disable dualboot on ecw5211 + +Signed-off-by: John Crispin +--- + target/linux/ipq40xx/base-files/etc/init.d/bootcount | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount +index d2a4abcadd..36b5d56d0c 100755 +--- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount ++++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount +@@ -13,5 +13,13 @@ boot() { + linksys,mr8300) + mtd resetbc s_env || true + ;; ++ edgecore,spw2ac1200|\ ++ edgecore,spw2ac1200-lan-poe|\ ++ edgecore,ecw5211) ++ avail=$(fw_printenv -n upgrade_available) ++ [ ${avail} -eq 0 ] || { ++ fw_setenv bootcount 0 ++ fw_setenv upgrade_available 0 ++ } + esac + } +-- +2.25.1 +