[openwrt/openwrt] ath79: add env-size for Sitecom WLR-7100 / WLR-8100 u-boot-env
LEDE Commits
lede-commits at lists.infradead.org
Mon Feb 16 16:49:00 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/576aa041511f8dd157720ed1ccaa9764bdb11997
commit 576aa041511f8dd157720ed1ccaa9764bdb11997
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Feb 15 03:06:53 2026 +0100
ath79: add env-size for Sitecom WLR-7100 / WLR-8100 u-boot-env
The Linux kernel assumes that the u-boot environment covers the full
partition, but it only covers 0x1000 bytes. Linux checks the CRC and
does this over the full partition. This fails like this:
```
u-boot-env-layout 1f000000.spi:flash at 0:partitions:partition at 30000:nvmem-layout: Invalid calculated CRC32: 0xfcac8c41 (expected: 0x14e6335a)
u-boot-env-layout 1f000000.spi:flash at 0:partitions:partition at 30000:nvmem-layout: probe with driver u-boot-env-layout failed with error -22
```
Define the u-boot environment with a length of 0x1000 bytes to calculate
the CRC only over this area.
When replicating the u-boot environment with these parameters it
generates the same CRC:
```
mkenvimage -p 0 -b -s 0x1000 -o output.bin input.txt
```
Fixes: https://github.com/openwrt/openwrt/issues/21696
Fixes: 5e3a602def72 ("ath79: sitecom,wlrx100: use nvmem")
Link: https://github.com/openwrt/openwrt/pull/22030
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
(cherry picked from commit 68a466b698420b32ee45c322141b1f156b635640)
---
target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts | 1 +
target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts | 1 +
2 files changed, 2 insertions(+)
diff --git a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
index 7903f3d73f..da5eba26de 100644
--- a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
+++ b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts
@@ -128,6 +128,7 @@
nvmem-layout {
compatible = "u-boot,env";
+ env-size = <0x1000>;
macaddr_uboot_ethaddr: ethaddr {
#nvmem-cell-cells = <1>;
diff --git a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts
index 9978a3d7d1..e29076d696 100644
--- a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts
+++ b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts
@@ -83,6 +83,7 @@
nvmem-layout {
compatible = "u-boot,env";
+ env-size = <0x1000>;
macaddr_uboot_ethaddr: ethaddr {
#nvmem-cell-cells = <1>;
More information about the lede-commits
mailing list