mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Flashing automatically the default environment
@ 2012-07-09 13:48 Patrick
  2012-07-09 14:33 ` Uwe Kleine-König
  2012-07-10  8:18 ` Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick @ 2012-07-09 13:48 UTC (permalink / raw)
  To: barebox

Dear all,

When booting a new board with barebox it detect that the nand partition 
dedicated to environment is invalid and barebox use the default config.
I would like that in this case (the first boot) the default config is 
flashed in the nand (save) command.

Any idea how to do that ?

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

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

* Re: Flashing automatically the default environment
  2012-07-09 13:48 Flashing automatically the default environment Patrick
@ 2012-07-09 14:33 ` Uwe Kleine-König
  2012-07-10  8:18 ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2012-07-09 14:33 UTC (permalink / raw)
  To: Patrick; +Cc: barebox

Hello Patrick,

On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote:
> When booting a new board with barebox it detect that the nand
> partition dedicated to environment is invalid and barebox use the
> default config.
> I would like that in this case (the first boot) the default config
> is flashed in the nand (save) command.
> 
> Any idea how to do that ?
How do you bring barebox into nand? Maybe flash the environment in the
same go?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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

* Re: Flashing automatically the default environment
  2012-07-09 13:48 Flashing automatically the default environment Patrick
  2012-07-09 14:33 ` Uwe Kleine-König
@ 2012-07-10  8:18 ` Michael Olbrich
  2012-07-10  9:06   ` Uwe Kleine-König
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2012-07-10  8:18 UTC (permalink / raw)
  To: barebox

On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote:
> When booting a new board with barebox it detect that the nand
> partition dedicated to environment is invalid and barebox use the
> default config.
> I would like that in this case (the first boot) the default config
> is flashed in the nand (save) command.
> 
> Any idea how to do that ?

if [ ! -e /dev/saved ]; then
	echo -o /dev/saved
	saveenv
fi

Michael

-- 
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: Flashing automatically the default environment
  2012-07-10  8:18 ` Michael Olbrich
@ 2012-07-10  9:06   ` Uwe Kleine-König
  2012-07-10  9:12     ` Re[2]: " Alexander Shiyan
  2012-07-11  6:46     ` Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2012-07-10  9:06 UTC (permalink / raw)
  To: barebox

On Tue, Jul 10, 2012 at 10:18:33AM +0200, Michael Olbrich wrote:
> On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote:
> > When booting a new board with barebox it detect that the nand
> > partition dedicated to environment is invalid and barebox use the
> > default config.
> > I would like that in this case (the first boot) the default config
> > is flashed in the nand (save) command.
> > 
> > Any idea how to do that ?
> 
> if [ ! -e /dev/saved ]; then
> 	echo -o /dev/saved
> 	saveenv
> fi
Is /dev/saved persistent over a reboot?

Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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

* Re[2]: Flashing automatically the default environment
  2012-07-10  9:06   ` Uwe Kleine-König
@ 2012-07-10  9:12     ` Alexander Shiyan
  2012-07-11  6:46     ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Shiyan @ 2012-07-10  9:12 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 666 bytes --]

Hello.

Tue, 10 Jul 2012 11:06:47 +0200 от Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
On Tue, Jul 10, 2012 at 10:18:33AM +0200, Michael Olbrich wrote:
> On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote:
> > When booting a new board with barebox it detect that the nand
> > partition dedicated to environment is invalid and barebox use the
> > default config.
> > I would like that in this case (the first boot) the default config
> > is flashed in the nand (save) command.
> > 
> > Any idea how to do that ?
> 
> if [ ! -e /dev/saved ]; then
> echo -o /dev/saved
> saveenv
> fi
Is /dev/saved persistent over a reboot?IMHO He mean about /env/saved


[-- Attachment #1.2: Type: text/html, Size: 1462 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: Flashing automatically the default environment
  2012-07-10  9:06   ` Uwe Kleine-König
  2012-07-10  9:12     ` Re[2]: " Alexander Shiyan
@ 2012-07-11  6:46     ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2012-07-11  6:46 UTC (permalink / raw)
  To: barebox

On Tue, Jul 10, 2012 at 11:06:47AM +0200, Uwe Kleine-König wrote:
> On Tue, Jul 10, 2012 at 10:18:33AM +0200, Michael Olbrich wrote:
> > On Mon, Jul 09, 2012 at 03:48:20PM +0200, Patrick wrote:
> > > When booting a new board with barebox it detect that the nand
> > > partition dedicated to environment is invalid and barebox use the
> > > default config.
> > > I would like that in this case (the first boot) the default config
> > > is flashed in the nand (save) command.
> > > 
> > > Any idea how to do that ?
> > 
> > if [ ! -e /dev/saved ]; then
> > 	echo -o /dev/saved
> > 	saveenv
> > fi
> Is /dev/saved persistent over a reboot?

I meant /env/saved of course.

Michael

-- 
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:[~2012-07-11  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 13:48 Flashing automatically the default environment Patrick
2012-07-09 14:33 ` Uwe Kleine-König
2012-07-10  8:18 ` Michael Olbrich
2012-07-10  9:06   ` Uwe Kleine-König
2012-07-10  9:12     ` Re[2]: " Alexander Shiyan
2012-07-11  6:46     ` Michael Olbrich

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