diff --git a/package/boot/uboot-airoha/patches/904-configs-airoha-add-missing-config-env-offset-redund.patch b/package/boot/uboot-airoha/patches/904-configs-airoha-add-missing-config-env-offset-redund.patch new file mode 100644 index 0000000000..f07e5eacdf --- /dev/null +++ b/package/boot/uboot-airoha/patches/904-configs-airoha-add-missing-config-env-offset-redund.patch @@ -0,0 +1,46 @@ +From a919f4797049a82cd3367138a20d06c2e0126534 Mon Sep 17 00:00:00 2001 +From: Yalei Zang +Date: Fri, 24 Jul 2026 14:16:33 +0800 +Subject: [PATCH] configs: airoha: add missing CONFIG_ENV_OFFSET_REDUND + +The an7581/an7583 defconfigs enable CONFIG_ENV_REDUNDANT to support +redundant environment, but miss the CONFIG_ENV_OFFSET_REDUND option. + +Without a valid redundant offset, executing `saveenv` causes U-Boot to +write the redundant environment data to an incorrect location (likely +offset 0 or overlapping), which destroys the eMMC BL2 or FIP partitions. +This leads to a boot failure (bricked device) after a simple reset. + +Signed-off-by: Yalei Zang +--- + configs/an7581_evb_defconfig | 1 + + configs/an7583_evb_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig +index b39ebac8..5e89d418 100644 +--- a/configs/an7581_evb_defconfig ++++ b/configs/an7581_evb_defconfig +@@ -10,6 +10,7 @@ CONFIG_ENV_OFFSET=0x7c000 + CONFIG_DM_GPIO=y + CONFIG_DEFAULT_DEVICE_TREE="airoha/en7581-evb" + CONFIG_SYS_LOAD_ADDR=0x81800000 ++CONFIG_ENV_OFFSET_REDUND=0x80000 + CONFIG_BUILD_TARGET="u-boot.bin" + # CONFIG_EFI_LOADER is not set + CONFIG_FIT=y +diff --git a/configs/an7583_evb_defconfig b/configs/an7583_evb_defconfig +index 4c5bd6dd..48e43b86 100644 +--- a/configs/an7583_evb_defconfig ++++ b/configs/an7583_evb_defconfig +@@ -10,6 +10,7 @@ CONFIG_ENV_OFFSET=0x7c000 + CONFIG_DM_GPIO=y + CONFIG_DEFAULT_DEVICE_TREE="an7583-evb" + CONFIG_SYS_LOAD_ADDR=0x81800000 ++CONFIG_ENV_OFFSET_REDUND=0x80000 + CONFIG_BUILD_TARGET="u-boot.bin" + # CONFIG_EFI_LOADER is not set + CONFIG_FIT=y +-- +2.43.0 +