how to persistently save config values

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 29 06:00:20 PDT 2017


On Fri, Sep 29, 2017 at 02:31:40PM +0200, Giorgio Dal Molin wrote:
> Hi Sascha,
> 
> thank you for the answer.
> 
> I just experimented a bit with the environment and the nv vars
> and I think I'll go this way.
> 
> I was a bit surprised by the saveenv command though: my understanding
> of the (default) environment was that it was a read only blob
> hardcoded in the barebox image

Yes, it is.

> I thought if I want some new/dynamic
> env content to be saved for the next reboot I have to explicitly provide
> a storage disk/cf/mtd partition to the saveenv and then to the loadenv.

Yes, true. Normally the board code provides a storage place. In case of
UEFI the storage place is set to a EFI Variable in common/efi/efi.c:305

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list