I've thought it would be simply changing the CONFIG_ENV_SIZE in the u-boot source along with changing the size in the userspace /etc/fw_env.config to match, but this is not the case.

  • Use of CONFIG_ENV_SIZE depends on the medium you specify for storing the environment. "[T]his is not the case" is a useless summary. – sawdust Nov 16 '17 at 23:50
  • -Tegra TX1, and the failure was that the crc would always fail in the userspace, but not in uboot interactive mode – ryeager Nov 17 '17 at 18:48

Solved it:

In order to update the environment size with flash memory (in particular on the Tegra), we need to:

  • Ensure the CONFIG_FILE is defined in /tools/env/fw_env.h in uboot src (make sure this line is uncommented (#define CONFIG_FILE "/etc/fw_env.config")

  • Change CONFIG_ENV_SIZE to desired size (/include/configs/tegra-common.h in uboot src), note it needs be 4k aligned for flash if using mmc

  • Match Env. size below to the size of CONFIG_ENV_SIZE

  • Set the Device offset below to ((end of environment addr + 1) - CONFIG_ENV_SIZE) (turns out uboot environment is stored at the end of the boot partition)

  • Keep Flash sector size below set to 0x2000 if Env. size differs

  • this is all if using userspace fw_printenv tool – ryeager Nov 17 '17 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.