u-boot saveenv to redundant fat does not persist env

Tom Rini trini at konsulko.com
Wed Jul 28 16:39:31 CEST 2021


On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> Hi,
> 
> I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> 
> The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> relevant modified files are:
> - configs/rpi_4_32b_defconfig
> - include/config_mender_defines.h
> - include/env_mender.h
> - include/configs/rpi.h
> - include/env_default.h
> - include/config_mender.h
> 
> Any help or investigating direction would be greatly appreciated.

What does your /etc/fw_env.config file look like?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210728/bc1785c2/attachment.sig>


More information about the U-Boot mailing list