Skip to contentSkip to conversation

Flashing automatically the default environment

DISCUSSION Patrick 4 participants 6 messages Jul 9, 2012 – Jul 11, 2012

lore
Share & tools
lore

Patrick

author
#0 lore raw

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

Hello Patrick,

Quoted 7 lines · Patrick

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

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

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
In reply to Patrick
Quoted 7 lines · Patrick

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 7 lines · Michael Olbrich
Quoted 6 lines · Patrick

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.

Quoted 6 lines
Quoted 1 line

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

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

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

Hello.

Tue, 10 Jul 2012 11:06:47 +0200 от Uwe Kleine-König <[email protected]>:

Quoted 7 lines · Michael Olbrich
Quoted 6 lines · Patrick

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.

Quoted 6 lines
Quoted 1 line

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

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw
In reply to Uwe Kleine-König
Quoted 8 lines · Uwe Kleine-König
Quoted 7 lines · Michael Olbrich
Quoted 6 lines · Patrick

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.

Quoted 7 lines
Quoted 6 lines
Quoted 1 line

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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox