Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The source files of the fw_printenv utility reside in the U-boot source tree, which is located in the u-boot/ sub-directory in the Emcraft software distribution.

fw_setenv and fw_printenv are included in the default rootfs project. The utilities are built during the rootfs compilation according to the rules specified in the projects/rootfs/env/Makefile:

  • The U-Boot source tree is configured for the NXP i.MX RT1050 RT10XX EVK board;

  • The fw_printenv utility is built.

When run on the target, the utility makes use of a configuration file that defines the geometry of the device and where the U-Boot environment is located in it. Since we keep the environment on the SD Card here is what the configuration file looks like for the NXP i.MX RT1050 RT10XX EVK board:

Code Block
$ cat projects/rootfs/etc/fw_env.config.mmc
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.

# Configuration for a board with CONFIG_ENV_IS_IN_MMC
#
# MTD device name Device offset Env. size
/dev/mmcblk0 0x80000 0x1f000

...