mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Boulais, Marc-Andre" <maboulais@rheinmetall.ca>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Modifying Barebox variables from Linux
Date: Tue, 3 Feb 2015 08:38:41 +0100	[thread overview]
Message-ID: <20150203073841.GE12209@pengutronix.de> (raw)
In-Reply-To: <29A2697B0516A946B1023D5E798DFCF67BAB6D77@mail-ying>

On Mon, Feb 02, 2015 at 09:20:18PM +0000, Boulais, Marc-Andre wrote:
> Hi,
> I am working on an Phytec Phycore-OMAP4460 platform with a Linux BSP (provided by Phytec) which uses Barebox 2013.1.0 to boot the OMAP4. Our application previously ran in a Linux system where U-Boot was used. We could change U-boot variables from the Linux command line as follows:
> 
> fw_setenv bootargs 'mem=512M console=ttyS0,115200n8 noinitrd root=/dev/mtdblock4 ro rootfstype=yaffs2'
> 
> How would I go doing the same with Barebox ? Is bareboxenv-target part of the solution ?

Yes.

On the target do:

bareboxenv -l /tmp/env /dev/mtdblockx

... modify stuff in /tmp/env ...

bareboxenv -s /tmp/env /dev/mtdblockx

Note that with a newer barebox (v2015.01.0) barebox has nonvolatile
variables that are stored in the environment. With that changing
variables is a matter of doing:

echo "mybootargs" > /tmp/env/nv/linux.bootargs.mine

With your older barebox the variables are created in scripts which means
you have to modify scripts from other scripts, or you would have to add
something like "source /env/vars/*" to a barebox startup script.

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

      reply	other threads:[~2015-02-03  7:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 21:20 Boulais, Marc-Andre
2015-02-03  7:38 ` Sascha Hauer [this message]

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=20150203073841.GE12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=maboulais@rheinmetall.ca \
    /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