public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marcel <korgull@home.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot boot sequence
Date: Wed, 29 Sep 2010 22:33:03 +0200	[thread overview]
Message-ID: <201009292233.04020.korgull@home.nl> (raw)
In-Reply-To: <20100927072536.A4DDFB7164@gemini.denx.de>

On Monday, September 27, 2010 09:25:36 am Wolfgang Denk wrote:
> Dear Marcel,
> 
> In message <201009270011.32850.korgull@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.

Thanks for your kind reply. 
I do honestly have to say that I read a lot of u-boot code but actually only a 
parts of the manual. 

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

I noticed that but had a different behavior in mind but was probably focused 
too much on USB instead of really looking at u-boot's behavior. Now that I 
read it again it does make a bit more sense and I think this will work out 
fine.

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

I used an AVR processor before and did this in the environment settings but 
currently that doesn't work for me yet.
My env is in nor flash and I don't have a driver in linux yet to communicate 
with it. I'll look into this.
Currently I write settings to eeprom but have no idea if it can be read from 
u-boot. I currently only use it for items that I need in Linux. I did see some 
drivers in u-boot for it, so I guess it should work as well and I'll have to 
try it or write a driver for my NOR flash.
 
> > 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.

Great, that should solve it.

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

This does solve a lot of my questions.
Thanks a lot for pointing me to that code and the other answers. 

best regards,
Marcel

> Best regards,
> 
> Wolfgang Denk

  reply	other threads:[~2010-09-29 20:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 22:11 [U-Boot] u-boot boot sequence Marcel
2010-09-27  2:06 ` [U-Boot] How to do pci_init in flash sywang
2010-09-27  7:27   ` Wolfgang Denk
2010-09-27  8:03     ` sywang
2010-09-27  7:25 ` [U-Boot] u-boot boot sequence Wolfgang Denk
2010-09-29 20:33   ` Marcel [this message]
2010-09-29 20:51     ` Wolfgang Denk
2010-09-29 20:58       ` Marcel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009292233.04020.korgull@home.nl \
    --to=korgull@home.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox