mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 2d00d704033f71d527320aeb9d6f47b2f84647e4 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Thu, 8 Jun 2023 15:57:24 +0200
|
|
Subject: [PATCH] base-files: allow setting the dualboot fw_setenv in the
|
|
sysupgrade sucess handler
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
package/base-files/files/lib/upgrade/nand.sh | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
|
|
index 349d287841..41a2de529c 100644
|
|
--- a/package/base-files/files/lib/upgrade/nand.sh
|
|
+++ b/package/base-files/files/lib/upgrade/nand.sh
|
|
@@ -18,6 +18,9 @@ CI_IPQ807X=0
|
|
# update BOOTCONFIG partitions (rotate rootfs/rootfs_1)
|
|
CI_BOOTCFG=0
|
|
|
|
+# update uboot-env if upgrade suceeded
|
|
+CI_FWSETENV=
|
|
+
|
|
ubi_mknod() {
|
|
local dir="$1"
|
|
local dev="/dev/$(basename $dir)"
|
|
@@ -244,6 +247,7 @@ nand_do_upgrade_success() {
|
|
local conf_tar="/tmp/sysupgrade.tgz"
|
|
sync
|
|
[ "$CI_BOOTCFG" = 1 ] && nand_qca_update_bootconfig
|
|
+ [ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
|
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
|
|
echo "sysupgrade successful"
|
|
umount -a
|
|
--
|
|
2.34.1
|
|
|