From b77e80cf1427cc2b1ceda86c612748cbebfe2ab3 Mon Sep 17 00:00:00 2001 From: Tanya Singh Date: Thu, 6 Feb 2025 08:22:35 +0100 Subject: [PATCH] WIFI-14404: Enable dual boot support on EAP105 and certificate loading on dual boot for EAP104 and OAP101 series Signed-off-by: Tanya Singh --- feeds/qca/ipq53xx/base-files/etc/init.d/bootcount | 13 +++++++++++++ .../qca/ipq53xx/base-files/lib/upgrade/platform.sh | 11 +++++++++++ feeds/tip/certificates/files/usr/bin/mount_certs | 9 +++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100755 feeds/qca/ipq53xx/base-files/etc/init.d/bootcount diff --git a/feeds/qca/ipq53xx/base-files/etc/init.d/bootcount b/feeds/qca/ipq53xx/base-files/etc/init.d/bootcount new file mode 100755 index 000000000..9dabca3ed --- /dev/null +++ b/feeds/qca/ipq53xx/base-files/etc/init.d/bootcount @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=99 + +boot() { + case "$(board_name)" in + edgecore,eap105) + avail=$(fw_printenv -n upgrade_available) + [ ${avail} -eq 0 ] && fw_setenv upgrade_available 1 + fw_setenv bootcount 0 + ;; + esac +} diff --git a/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh b/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh index 2a1a2eec8..b4b49d4db 100644 --- a/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh +++ b/feeds/qca/ipq53xx/base-files/lib/upgrade/platform.sh @@ -27,6 +27,17 @@ platform_do_upgrade() { nand_upgrade_tar "$1" ;; edgecore,eap105) + if [ "$(find_mtd_chardev rootfs)" ]; then + CI_UBIPART="rootfs" + else + if grep -q rootfs1 /proc/cmdline; then + CI_UBIPART="rootfs2" + CI_FWSETENV="active 2" + else + CI_UBIPART="rootfs1" + CI_FWSETENV="active 1" + fi + fi nand_upgrade_tar "$1" ;; esac diff --git a/feeds/tip/certificates/files/usr/bin/mount_certs b/feeds/tip/certificates/files/usr/bin/mount_certs index e526ecb09..70f6252b0 100755 --- a/feeds/tip/certificates/files/usr/bin/mount_certs +++ b/feeds/tip/certificates/files/usr/bin/mount_certs @@ -44,9 +44,14 @@ actiontec,web7200) edgecore,ecw5211|\ edgecore,eap101|\ edgecore,eap102|\ -edgecore,oap104|\ +edgecore,eap104|\ +edgecore,eap105|\ edgecore,eap111|\ -edgecore,eap112) +edgecore,eap112|\ +edgecore,oap101|\ +edgecore,oap101e|\ +edgecore,oap101-6e|\ +edgecore,oap101e-6e) if grep -q rootfs1 /proc/cmdline; then PART_NAME=rootfs2 else