Search code examples
u-boot

How to configure fw-utils to store environment on FAT filesystem?


I'm struggling with setting U-boot env variables from userspace using fw_setenv.

U-Boot uses the env variables stored on a file u-boot.env on /dev/mmcblk0p1. This is a FAT32 partition on a SD card.

I also have the tools fw_setenv and fw_printenv available in userspace. But I don't know how to configure /etc/fw_env.conf so fw_setenv stores the variables in above mentioned file.

I build U-boot 2015-07 with the am43xx_evm defconfig. Could someone help me?


Solution

  • As far as I know, fw_printenv and fw_setenv are not designed to read and write configuration files: they act on a pseudo-partition whose offset is given in their configuration.

    If you want to edit a plain U-Boot configuration file, you'll have to use more traditional tools.