mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-21 00:02:26 +01:00
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@0:partitions:partition@30000:nvmem-layout: Invalid calculated CRC32: 0xfcac8c41 (expected: 0x14e6335a)
u-boot-env-layout 1f000000.spi:flash@0:partitions:partition@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:
|
||
|---|---|---|
| .. | ||
| base-files/etc/hotplug.d/ieee80211 | ||
| dts | ||
| files | ||
| generic | ||
| image | ||
| mikrotik | ||
| nand | ||
| patches-6.12 | ||
| tiny | ||
| config-6.12 | ||
| Makefile | ||
| modules.mk | ||