Project

General

Profile

u-boot prompt from kernel possible ?

Added by Thomas Nagel over 12 years ago

Hi,
Once the kernel is loaded and we are logged in, is there a way to restart and bring the card to U-boot> prompt whenever we want ? In other words, is it possible to somehow selectively get to u-boot prompt after booting, without missing the bootdelay time.

Thanks.
TN


Replies (1)

RE: u-boot prompt from kernel possible ? - Added by Michael Williamson over 12 years ago

Hi Thomas,

From linux, if you issue the "reboot" command, it will jump back to u-Boot.

The bootdelay variable (see the u-Boot documentation, here) is read from the u-Boot environment (from the SPI-NOR FLASH). If you set that variable to non-zero (default is 3, I think), then u-Boot will autoboot after the defined "break in" interval (in seconds). If you set it to -1, then the u-boot will stop at the u-Boot command prompt.

It seems that if you had a non-zero delay you could write a simple program on the host board to issue the reboot command and then periodically send over a character (like newline or space or something) to catch u-Boot before it started. This is what we do for our factory configuration and test software.

Alternatively, you could write a routine that (from linux) altered the SPI-NOR FLASH u-Boot configuration section to change the bootdelay value to -1 (the configuration block is fairly straightforward, a list of ascii strings followed by a checksum) and then reboot. I'm not sure I'd recommend this approach, but it could be made to work.

Another approach might be to modify your version of u-Boot (the source is available on our site) to accept some sort of warm boot parameter in memory to alter it's autoboot behavior.

I hope this helps.

-Mike

    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)