* Specify where to save Barebox env
@ 2015-02-18 19:55 Boulais, Marc-Andre
2015-02-19 20:08 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Boulais, Marc-Andre @ 2015-02-18 19:55 UTC (permalink / raw)
To: barebox
Good day,
I am working on a phytec-phycore-OMAP446 system where the system boots from the SD card. On it, I have MLO+barebox.bin (v2015.02). The system boots ok.
However, when I set NV variables (from its prompt) and then do a "saveenv", I would like the environment to be saved in NAND. Is there a way to configure Barebox to do that ?
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Specify where to save Barebox env
2015-02-18 19:55 Specify where to save Barebox env Boulais, Marc-Andre
@ 2015-02-19 20:08 ` Sascha Hauer
2015-02-19 20:32 ` Boulais, Marc-Andre
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2015-02-19 20:08 UTC (permalink / raw)
To: Boulais, Marc-Andre; +Cc: barebox
On Wed, Feb 18, 2015 at 07:55:46PM +0000, Boulais, Marc-Andre wrote:
> Good day,
> I am working on a phytec-phycore-OMAP446 system where the system
> boots from the SD card. On it, I have MLO+barebox.bin (v2015.02). The
> system boots ok. However, when I set NV variables (from its prompt)
> and then do a "saveenv", I would like the environment to be saved in
> NAND. Is there a way to configure Barebox to do that ?
Normally barebox stores the environment on the medium it is started
from. Looking at arch/arm/boards/phytec-phycore-omap4460/board.c:
#ifdef CONFIG_PARTITION
devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "xload_raw");
dev_add_bb_dev("xload_raw", "xload");
devfs_add_partition("nand0", SZ_128K, SZ_512K, DEVFS_PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", SZ_128K + SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
#endif
The last two lines create /dev/env0 on nand. If you boot from nand the
environment should be stored there already.
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] 4+ messages in thread
* RE: Specify where to save Barebox env
2015-02-19 20:08 ` Sascha Hauer
@ 2015-02-19 20:32 ` Boulais, Marc-Andre
2015-02-19 21:16 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Boulais, Marc-Andre @ 2015-02-19 20:32 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
The system I am working on requires to boot from the SD card. However, the Linux application needs to have the ability to change boot parameters to set the location of the kernel and rootfs for the next boot. I was planning on making the Linux application use the bareboxenv-target tool to map the Barebox environment and then modify variables accordingly.
From what I understand, this is possible when the environment is in NAND. Is it also true if the env. is on the SD card (barebox.env file) ? if so, how is it done ?
-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de]
Sent: February-19-15 3:09 PM
To: Boulais, Marc-Andre
Cc: barebox@lists.infradead.org
Subject: Re: Specify where to save Barebox env
On Wed, Feb 18, 2015 at 07:55:46PM +0000, Boulais, Marc-Andre wrote:
> Good day,
> I am working on a phytec-phycore-OMAP446 system where the system
> boots from the SD card. On it, I have MLO+barebox.bin (v2015.02). The
> system boots ok. However, when I set NV variables (from its prompt)
> and then do a "saveenv", I would like the environment to be saved in
> NAND. Is there a way to configure Barebox to do that ?
Normally barebox stores the environment on the medium it is started from. Looking at arch/arm/boards/phytec-phycore-omap4460/board.c:
#ifdef CONFIG_PARTITION
devfs_add_partition("nand0", 0x00000, SZ_128K, DEVFS_PARTITION_FIXED, "xload_raw");
dev_add_bb_dev("xload_raw", "xload");
devfs_add_partition("nand0", SZ_128K, SZ_512K, DEVFS_PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", SZ_128K + SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0"); #endif
The last two lines create /dev/env0 on nand. If you boot from nand the environment should be stored there already.
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] 4+ messages in thread
* Re: Specify where to save Barebox env
2015-02-19 20:32 ` Boulais, Marc-Andre
@ 2015-02-19 21:16 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-02-19 21:16 UTC (permalink / raw)
To: Boulais, Marc-Andre; +Cc: barebox
On Thu, Feb 19, 2015 at 08:32:54PM +0000, Boulais, Marc-Andre wrote:
> The system I am working on requires to boot from the SD card. However,
> the Linux application needs to have the ability to change boot
> parameters to set the location of the kernel and rootfs for the next
> boot. I was planning on making the Linux application use the
> bareboxenv-target tool to map the Barebox environment and then modify
> variables accordingly.
>
> From what I understand, this is possible when the environment is in
> NAND. Is it also true if the env. is on the SD card (barebox.env file)
> ? if so, how is it done ?
You have to mount the partition containing the environment before using
the bareboxenv tool.
BTW you to always store the environment on Nand you would have to
comment out the omap_env_init function.
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] 4+ messages in thread
end of thread, other threads:[~2015-02-19 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 19:55 Specify where to save Barebox env Boulais, Marc-Andre
2015-02-19 20:08 ` Sascha Hauer
2015-02-19 20:32 ` Boulais, Marc-Andre
2015-02-19 21:16 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox