[U-Boot] u-boot boot sequence

Wolfgang Denk wd at denx.de
Mon Sep 27 09:25:36 CEST 2010


Dear Marcel,

In message <201009270011.32850.korgull at home.nl> you wrote:
> 
> I do however have some questions about the u-boot startup behaviour.

Please read the manual; it should cover most of your questions.

> 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.

This is standard behaviour. See 7.4. Boot Arguments Unleashed etc.,
http://www.denx.de/wiki/view/DULG/LinuxBootArgs

> 3) If it can boot, it will boot immediately (there may be a GPIO pin to 
> override this behaviour)

setenv bootdelay 0

> 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).

see tools/env for tools to read and write the U-Boot environment
settings from Linux. This can be used to change the boot command, boot
delay etc.

> 5) After uploading an image the soft-reset is cleared and the whole sequence 
> start over again, so it should boot the new image.

You can script all these things 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 ?

There is all kinds of more or less complext stuff around. Read the
manual. Read the default configurations set in other board config
files. Read the code available in board/*/auto_update.c etc.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The first 90% of a project takes 90% of the time, the last 10%  takes
the other 90% of the time.


More information about the U-Boot mailing list