mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 03:17:48 +00:00
Adds support for CI_FWSETENV environment variable for firmware environment manipulation. Renumbered from patches/0018. Signed-off-by: John Crispin <john@phrozen.org>
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From ed925eac6477838cb37fd668264feebb5e176925 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Sat, 27 Apr 2024 12:04:31 +0200
|
|
Subject: [PATCH 19/55] base-files: add CI_FWSETENV support
|
|
|
|
This allows sysupgrade scripts to automatically call fw_setenv once the upgrade succeded.
|
|
|
|
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 ca302557c8..a2fce5aa81 100644
|
|
--- a/package/base-files/files/lib/upgrade/nand.sh
|
|
+++ b/package/base-files/files/lib/upgrade/nand.sh
|
|
@@ -14,6 +14,9 @@ CI_UBIPART="${CI_UBIPART:-ubi}"
|
|
# 'rootfs' UBI volume on NAND contains the rootfs
|
|
CI_ROOTPART="${CI_ROOTPART:-rootfs}"
|
|
|
|
+# update uboot-env if upgrade suceeded
|
|
+CI_FWSETENV=
|
|
+
|
|
ubi_mknod() {
|
|
local dir="$1"
|
|
local dev="/dev/$(basename $dir)"
|
|
@@ -446,6 +449,7 @@ nand_do_upgrade() {
|
|
|
|
nand_do_upgrade_success() {
|
|
if nand_do_restore_config && sync; then
|
|
+ [ -n "$CI_FWSETENV" ] && fw_setenv $CI_FWSETENV
|
|
echo "sysupgrade successful"
|
|
umount -a
|
|
reboot -f
|
|
--
|
|
2.34.1
|
|
|