Accessing non-volatile variables from Linux

Sascha Hauer s.hauer at pengutronix.de
Wed Jan 25 23:30:03 PST 2017


Hi Frank,

On Wed, Jan 25, 2017 at 02:21:55PM -0500, Frank Hunleth wrote:
> Hi,
> 
> I'm wondering if it's possible to read and modify Barebox environment
> variables from Linux in a way similar to U-Boot's fw_printenv and
> fw_setenv. If that's not possible, is there another way for communicating
> between Linux and Barebox? Apologies if I totally missed a section in the
> docs that describes this.

There is scripts/bareboxenv.c which gets compiled for the target when
CONFIG_BAREBOXENV_TARGET is enabled. This allows you to unpack the
barebox environment device (mtd/partition) to a directory and back to
the device after modifying. There is no direct getenv/setenv
functionality, you would have to do a manual echo/cat to the variable
files.

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