* barebox env userspace
@ 2014-02-03 17:19 Balasa, Bogdan
2014-02-03 18:00 ` Balasa, Bogdan
0 siblings, 1 reply; 6+ messages in thread
From: Balasa, Bogdan @ 2014-02-03 17:19 UTC (permalink / raw)
To: barebox
Hi,
I try to modify the barebox environment from linux userspace with:
1. Load environment from SPI NOR flash:
./bareboxenv-target -l /mnt /dev/mtd1
2. Erase environment from SPI nor flash
flash_erase /dev/mtd1 0 0
# do some modifications in "/mnt"
3. Save environment to NOR flash
./bareboxenv-target -s /mnt /dev/mtd1
----
After reset I can see my modifications in the files within barebox but the changes are not taken into account by barebox.
It's like they are not saved in the persistent storage "dev/env0".(it's like a saveenv is missing).
What am I missing such that the changes to be saved in the persistent storage 'dev/env0' from userspace?
---
Userspace:
cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00010000 "m25p0.barebox"
mtd1: 00010000 00010000 "m25p0.bareboxenv"
mtd2: 00200000 00020000 "nand0.barebox"
mtd3: 00020000 00020000 "nand0.bareboxenv"
mtd4: 00800000 00020000 "nand0.kernel"
mtd5: 03200000 00020000 "nand0.root"
mtd6: 00800000 00020000 "nand0.kernel2"
mtd7: 03200000 00020000 "nand0.root2"
mtd8: 389e0000 00020000 "nand0.data"
Thank you,
Bogdan
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: barebox env userspace
2014-02-03 17:19 barebox env userspace Balasa, Bogdan
@ 2014-02-03 18:00 ` Balasa, Bogdan
2014-02-04 7:17 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Balasa, Bogdan @ 2014-02-03 18:00 UTC (permalink / raw)
To: barebox
I was modifying the '/init/general' file, the line:
global.boot.default=nand
A second method (this one worked): changed the content of 'boot/nand' file.
Bogdan
-----Message d'origine-----
De : Balasa, Bogdan [mailto:BBalasa@Morganschaffer.com]
Envoyé : February-03-14 12:20 PM
À : barebox@lists.infradead.org
Objet : barebox env userspace
Hi,
I try to modify the barebox environment from linux userspace with:
1. Load environment from SPI NOR flash:
./bareboxenv-target -l /mnt /dev/mtd1
2. Erase environment from SPI nor flash
flash_erase /dev/mtd1 0 0
# do some modifications in "/mnt"
3. Save environment to NOR flash
./bareboxenv-target -s /mnt /dev/mtd1
----
After reset I can see my modifications in the files within barebox but the changes are not taken into account by barebox.
It's like they are not saved in the persistent storage "dev/env0".(it's like a saveenv is missing).
What am I missing such that the changes to be saved in the persistent storage 'dev/env0' from userspace?
---
Userspace:
cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00010000 "m25p0.barebox"
mtd1: 00010000 00010000 "m25p0.bareboxenv"
mtd2: 00200000 00020000 "nand0.barebox"
mtd3: 00020000 00020000 "nand0.bareboxenv"
mtd4: 00800000 00020000 "nand0.kernel"
mtd5: 03200000 00020000 "nand0.root"
mtd6: 00800000 00020000 "nand0.kernel2"
mtd7: 03200000 00020000 "nand0.root2"
mtd8: 389e0000 00020000 "nand0.data"
Thank you,
Bogdan
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: barebox env userspace
2014-02-03 18:00 ` Balasa, Bogdan
@ 2014-02-04 7:17 ` Sascha Hauer
2014-02-04 14:14 ` Balasa, Bogdan
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2014-02-04 7:17 UTC (permalink / raw)
To: Balasa, Bogdan; +Cc: barebox
On Mon, Feb 03, 2014 at 06:00:02PM +0000, Balasa, Bogdan wrote:
> I was modifying the '/init/general' file, the line:
>
> global.boot.default=nand
>
> A second method (this one worked): changed the content of 'boot/nand' file.
>
> Bogdan
>
> -----Message d'origine-----
> De : Balasa, Bogdan [mailto:BBalasa@Morganschaffer.com]
> Envoyé : February-03-14 12:20 PM
> À : barebox@lists.infradead.org
> Objet : barebox env userspace
>
> Hi,
>
> I try to modify the barebox environment from linux userspace with:
>
> 1. Load environment from SPI NOR flash:
> ./bareboxenv-target -l /mnt /dev/mtd1
>
> 2. Erase environment from SPI nor flash
> flash_erase /dev/mtd1 0 0
>
> # do some modifications in "/mnt"
>
> 3. Save environment to NOR flash
> ./bareboxenv-target -s /mnt /dev/mtd1
>
> ----
> After reset I can see my modifications in the files within barebox but the changes are not taken into account by barebox.
So it doesn't seem to be a problem with accessing/changing the
environment from userspace, but that you modify a file which isn't used
by barebox, or not used as you are expecting it. What file are you
modifying?
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] 6+ messages in thread
* RE: barebox env userspace
2014-02-04 7:17 ` Sascha Hauer
@ 2014-02-04 14:14 ` Balasa, Bogdan
2014-02-05 8:18 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Balasa, Bogdan @ 2014-02-04 14:14 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi,
Is not working when modifying in userspace the '/init/general' file, the line:
'global.boot.default=nand'
to: 'global.boot.default=two'
and after reset barebox was not taking into account this change.
I needed to enter in barebox abd send a saveenv in barebox such that the content of '/init/general'
to be saved in the persistent storage (I think dev/env0).
-----Message d'origine-----
De : Sascha Hauer [mailto:s.hauer@pengutronix.de]
Envoyé : February-04-14 2:18 AM
À : Balasa, Bogdan
Cc : barebox@lists.infradead.org
Objet : Re: barebox env userspace
On Mon, Feb 03, 2014 at 06:00:02PM +0000, Balasa, Bogdan wrote:
> I was modifying the '/init/general' file, the line:
>
> global.boot.default=nand
>
> A second method (this one worked): changed the content of 'boot/nand' file.
>
> Bogdan
>
> -----Message d'origine-----
> De : Balasa, Bogdan [mailto:BBalasa@Morganschaffer.com]
> Envoyé : February-03-14 12:20 PM
> À : barebox@lists.infradead.org
> Objet : barebox env userspace
>
> Hi,
>
> I try to modify the barebox environment from linux userspace with:
>
> 1. Load environment from SPI NOR flash:
> ./bareboxenv-target -l /mnt /dev/mtd1
>
> 2. Erase environment from SPI nor flash
> flash_erase /dev/mtd1 0 0
>
> # do some modifications in "/mnt"
>
> 3. Save environment to NOR flash
> ./bareboxenv-target -s /mnt /dev/mtd1
>
> ----
> After reset I can see my modifications in the files within barebox but the changes are not taken into account by barebox.
So it doesn't seem to be a problem with accessing/changing the environment from userspace, but that you modify a file which isn't used by barebox, or not used as you are expecting it. What file are you modifying?
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] 6+ messages in thread
* Re: barebox env userspace
2014-02-04 14:14 ` Balasa, Bogdan
@ 2014-02-05 8:18 ` Sascha Hauer
2014-02-05 15:42 ` Balasa, Bogdan
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2014-02-05 8:18 UTC (permalink / raw)
To: Balasa, Bogdan; +Cc: barebox
On Tue, Feb 04, 2014 at 02:14:17PM +0000, Balasa, Bogdan wrote:
> Hi,
> Is not working when modifying in userspace the '/init/general' file, the line:
> 'global.boot.default=nand'
> to: 'global.boot.default=two'
>
> and after reset barebox was not taking into account this change.
> I needed to enter in barebox abd send a saveenv in barebox such that the content of '/init/general'
> to be saved in the persistent storage (I think dev/env0).
I think the problem is that the variable is overwritten later, at least
that's what I rememember from the Phytec barebox. Try removing that file
and modify /env/config instead.
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] 6+ messages in thread
* RE: barebox env userspace
2014-02-05 8:18 ` Sascha Hauer
@ 2014-02-05 15:42 ` Balasa, Bogdan
0 siblings, 0 replies; 6+ messages in thread
From: Balasa, Bogdan @ 2014-02-05 15:42 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi,
I modified '/env/config' instead of 'init/general' and deleted 'init/general' and it works.
Thank you,
Bogdan
-----Message d'origine-----
De : Sascha Hauer [mailto:s.hauer@pengutronix.de]
Envoyé : February-05-14 3:19 AM
À : Balasa, Bogdan
Cc : barebox@lists.infradead.org
Objet : Re: barebox env userspace
On Tue, Feb 04, 2014 at 02:14:17PM +0000, Balasa, Bogdan wrote:
> Hi,
> Is not working when modifying in userspace the '/init/general' file, the line:
> 'global.boot.default=nand'
> to: 'global.boot.default=two'
>
> and after reset barebox was not taking into account this change.
> I needed to enter in barebox abd send a saveenv in barebox such that the content of '/init/general'
> to be saved in the persistent storage (I think dev/env0).
I think the problem is that the variable is overwritten later, at least that's what I rememember from the Phytec barebox. Try removing that file and modify /env/config instead.
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] 6+ messages in thread
end of thread, other threads:[~2014-02-05 15:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-03 17:19 barebox env userspace Balasa, Bogdan
2014-02-03 18:00 ` Balasa, Bogdan
2014-02-04 7:17 ` Sascha Hauer
2014-02-04 14:14 ` Balasa, Bogdan
2014-02-05 8:18 ` Sascha Hauer
2014-02-05 15:42 ` Balasa, Bogdan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox