Uboot variable environment access with 2016-11 version

Hello there,

Thanks to your support we successfully flash a module 1.1A with TEZI then with our own Linux image.
To achieve this, we first update u-boot version to 2016-11 and then turn the module in recovery mode (all succeeded). To finish we create a directory for TEZI with different tarball + SPL and u-boot 2016-11 compiled from your oe-core framework.
But now, when we try to access to u-boot environment, we have this issue :

Too few good blocks within range

fw_env.config file is this one :

# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.
# On a block device a negative offset is treated as a backwards offset from the
# end of the device/partition, rather than a forwards offset from the start.

# Colibri iMX6/Apalis iMX6
# U-Boot environment is stored at the end of the first eMMC boot partition
# hence use a negative value. The environment is just in front of the config
# block which occupies the last sector (hence -0x200)

# Block device name	Device offset	Env. size
/dev/mmcblk0boot0	-0x2200		0x2000

We checked version under u-boot and it is 2016-11. Could you please help us ? Thanks

And what root file system are you using here exactly? Could it be that your fw-utils on that root file system do not match your particular U-Boot version?

We are using a rootfs generate with yocto. I updated fw-utils by recompiling it with .bb file found on meta-toradex-nxp git on master branch (r0+gitrb66337d357cca761bf8627acbb1ec991f425f0b4-r0) and we still have the same issue.

Did you ever try one of our stock demo images? I assume there it does/did work so it looks like somehow you messed something up along the line.

Sure, we’ve tried 2.4 and all work fine. Is possible that uboot variable are not correctly mapped ?

I still suspect that something is not matching:

  1. Location of U-Boot Environment has been changed at one point albeit probably 2 years ago
  2. Support for negative device offset has been implemented at one point. Could your message stem from missing such support? Before we calculated the offset during first boot.
  3. Default environment gets compiled into fw-utils and needs to match the particular running U-Boot (e.g. all needs to be compiled off the exact same sources).
3. Default environment gets compiled into fw-utils and needs to match the particular running U-Boot (e.g. all needs to be compiled off the exact same sources).

Ok, we take fw_utils from oe-core and now it works. Now we have to put all together in same place…

Glad you figured it out and thanks for letting us know.