From: Sascha Hauer <s.hauer@pengutronix.de>
To: Frank Hunleth <fhunleth@troodon-software.com>
Cc: barebox@lists.infradead.org
Subject: Re: Accessing non-volatile variables from Linux
Date: Thu, 26 Jan 2017 08:30:03 +0100 [thread overview]
Message-ID: <20170126073003.rpufxl2us6mc5i4b@pengutronix.de> (raw)
In-Reply-To: <CA+-urNQJbuE44V93+BERHf9r5kEKzn5mBJ5e=t9932TtR7+0Yw@mail.gmail.com>
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-01-26 7:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 19:21 Frank Hunleth
2017-01-25 20:51 ` Trent Piepho
2017-01-26 7:30 ` Sascha Hauer [this message]
2017-01-26 13:30 ` Frank Hunleth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170126073003.rpufxl2us6mc5i4b@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=fhunleth@troodon-software.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox