mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Modifying Barebox variables from Linux
@ 2015-02-02 21:20 Boulais, Marc-Andre
  2015-02-03  7:38 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Boulais, Marc-Andre @ 2015-02-02 21:20 UTC (permalink / raw)
  To: barebox

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 ? 

Many thanks,

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Modifying Barebox variables from Linux
  2015-02-02 21:20 Modifying Barebox variables from Linux Boulais, Marc-Andre
@ 2015-02-03  7:38 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-02-03  7:38 UTC (permalink / raw)
  To: Boulais, Marc-Andre; +Cc: barebox

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-03  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 21:20 Modifying Barebox variables from Linux Boulais, Marc-Andre
2015-02-03  7:38 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox