[U-Boot] u-boot boot sequence

Marcel korgull at home.nl
Mon Sep 27 00:11:32 CEST 2010


Hi,

I'm working on u-boot-usb and I think I get along quite well so far for the 
Atmel g45, thanks to this list. Slowly I do like the u-boot structure although 
it has a steep learning curve (I guess one week is considered steep by me).
I've got the my Atmel Sam9G45 working for most parts (it boots well) and I 
hope to contribute some code soon (after usb is working well). 

I do however have some questions about the u-boot startup behaviour.

What I want to create is the following :

1) u-boot starts and checks if it can start my application (either CRC check 
or whatever). This is the first thing u-boot should do.
2) if it can't boot it will listen on USB or ethernet for someone to upload a 
valid image or boot via NFS or whatever has been configured.
3) If it can boot, it will boot immediately (there may be a GPIO pin to 
override this behaviour)
4) once within the application (linux or whatever) I must be able to set a flag 
that lets u-boot wait for uploading a new image file when I soft-reset my 
device. This is needed for firmware upgrading of course. I still need to check 
if this flag is supported by the CPU or needs other support (eeprom perhaps).
5) After uploading an image the soft-reset is cleared and the whole sequence 
start over again, so it should boot the new image.

In short I want the application to be in control and only if there's no 
application installed or it's corrupt or when the application let's u-boot 
know, u-boot is in control. I know at step 2 there are some complications for 
testing purposes, so there must be a way to change the behavior (change the 
order of doing things).
Maybe a kind of boot sequence added to u-boot would be fine. But the boot 
sequence only needs two items than. Either boot the image or stay in u-boot.

I know it's possible to do this but I wonder if it has been done before and if 
there any examples of it ?

Since I'm working on USB device support for my G45 and I want the above 
behaviour (or something very similar) I'm very much interested in any work 
that implements this or comes close to this. If it hasn't been done before I'm 
interested to work on this of course and contribute the work. In that case I'd 
be interested in anyone's opinion on this topic (I mean the way to implement 
it and stay consistent with the current u-boot code).

Best regards,
Marcel


More information about the U-Boot mailing list