This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

change AM335x uboot environment from linux

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:

  1. Boot the device and stop at uboot
  2. Run : nandecc hw 2
  3. Run: savenv
  4. Reboot
  5. 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