Skip to contentSkip to conversation

Failsafe bootloader

DISCUSSION Jerry Van Baren 2 participants 2 messages Jun 3, 2003 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Check out U-Boot
http://sourceforge.net/projects/u-boot
The project page on sourceforge is pretty much non-existant other than the CVS link. Pull down the source -- there _is_ a good README file in it that explains a lot about u-boot.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/u-boot/u-boot/README?rev=1.30
Wolfgang Denk of Denx Computer Systems runs the project. He doesn't appear to have anything on U-Boot on his web site either.
http://www.denx.de/

The predecessor was ppcboot, which at least has a home page on sourceforge
http://ppcboot.sourceforge.net/
Pretty much everything said for ppcboot goes for u-boot as well, only better :-).

U-boot has some scripting capabilities as well as variables that can be used for rudimentary decision making. I'm sure Wolfgang will welcome improvements to the scripting :-).

The scripts can be accessed remotely or via your application (assuming your application's "failure" mode is sufficient to allow it to write to flash/eeprom to change the script to a backup mode). You don't tell us _how_ the application fails and how it and/or the boot loader is expected to recover from that failure, so I cannot give you and direct suggestions.

gvb

Quoted 30 lines · At 09:28 PM 6/3/2003 -0400, [email protected] wrote:

Hi all.

We are developing an application for an embedded target that will be located in some rural areas. We foresee a need to update the target with a new version of the application or a new kernel from time to time.

A few of the added requirements on top of that are:
1) The target shall boot up in the old kernel, if a bogus kernel is loaded
2) The target shall boot up in the old application, if a bogus application is loaded
3) On the management side an update shall be handled as a single file, the target may decide to 'unpack' it when received.

We have looked all over the net, but none of the bootloaders found so far could meet the above demands.
The boot loaders usually have an interactive mode used to select between different configurations - and there are no feedback from the application side if the reboot actually went well. The interactiviness does not fit well with an embedded target.

Do you know of a boot loader that partially or fully meets the above requirements?

Background information
Today we are using VxWorks - for which we have made our own boot loader. The boot laoder allows the boot loader itself, and the application part to be upgraded - and if a restart is failed the old version will be activated on a subsequent build.
I want the same behaviour in the Linux based target.

Quoted 4 lines

Thanks in advance,

Sam

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:

Check out U-Boot
http://sourceforge.net/projects/u-boot
The project page on sourceforge is pretty much non-existant other than the CVS link. Pull down the source -- there _is_ a good README file in it that explains a lot about u-boot.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/u-boot/u-boot/README?rev=1.30
Wolfgang Denk of Denx Computer Systems runs the project. He doesn't appear

Actually this is Wolfgang Denk of DENX Software Engineering :-)

Quoted 2 lines

to have anything on U-Boot on his web site either.
http://www.denx.de/

Well, we do have some documentation about PPCBoot at

	http://www.denx.de/re/DPLG.html

which can be used directly for U-Boot, too.

Quoted 4 lines

The predecessor was ppcboot, which at least has a home page on sourceforge
http://ppcboot.sourceforge.net/
Pretty much everything said for ppcboot goes for u-boot as well, only better :-).

Right :-)

Quoted 3 lines

U-boot has some scripting capabilities as well as variables that can be used for rudimentary decision making. I'm sure Wolfgang will welcome improvements to the scripting :-).

The "some scripting capabilities" includes a more or less complete
bourne shell (the "hush" shell from busybox). Things like
if/then/else/fi, for/do/done, while/do/done, until/do/done or
operators like && and || are available.

For a trivial example: to recover from corrupted images (bad checksum etc.) you could use

	setenv bootcmd 'bootm $addr_primary || bootm $addr_secondary'

etc.

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] "A fractal is by definition a set for which the Hausdorff Besicovitch dimension strictly exceeds the topological dimension."
- Mandelbrot, _The Fractal Geometry of Nature_

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/