As part of our upgrade solution we need to update u-boot environments variables from Linux.
For this I am using uboot tool. The issue is that before we boot Linux we change the nand ecc to ECC BCH8 (using nandecc hw 2).
After this command if you save the environments to nand and boot again uboot fails reading uboot environments.
The easiest way simulate this problem is:
- Boot the device and stop at uboot
- Run : nandecc hw 2
- Run: savenv
- Reboot
- Now after boot you will see errors:
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: HW ECC Hamming Code selected
256 MiB
MMC: OMAP SD/MMC: 0
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
Error: Bad compare! failed
NAND read from offset 260000 failed -74
*** Warning - readenv() failed, using default environment
I guess the issue is related to the fact that the device boots with HW ECC Hamming Code.
But in any case for now I cannot change uboot environments from Linux kernel and have them properly read the next boot by u-boot.
Any help is appreciated
Thanks
Ofer