[U-Boot-Users] outline of bootm script
Kumar Gala
galak at kernel.crashing.org
Wed Aug 6 21:15:52 CEST 2008
On Aug 5, 2008, at 9:33 PM, Jerry Van Baren wrote:
> Kumar Gala wrote:
>> here's a rough start at an outline for the bootm script based on
>> the code (I've only outlined the Linux/PPC boot case its seems the
>> most complicated). One of the first things we clearly need is a
>> imload command. Thoughts on the various disable_{interrupts, usb,
>> caches} ?
>> - k
>
> Another rough start on an outline (only cmd_bootm.c, need to add
> image.c information):
> <http://www.denx.de/wiki/view/U-Boot/UBootFdtInfo#Refactoring_bootm>
>
> Goal is to identify the major pieces of the sequence, identify what
> commands we have and what we need to make a scripted equivalent
> sequence for (ultimately) each path through the sequence.
I added a few bullets about functionality I'd like to see the new
sequence to be capable of it.
one idea is having "stages" of bootm handled as sub commands:
bootm start <args>
bootm prep (disable interrupts, stop usb, disable caches)
bootm load_os (decompress OS image)
bootm load_fdt(relocates fdt to proper place, setup bootargs, initrd
prep, board setup?? [or do via fdt boardsetup command])
bootm load_initrd
bootm jump
bootm restore (undo anything prep did, reset state tracking)
And we keep state around so the next stage can run w/o a lot of
arguments and you have to execute these in order, and only once. But
you can intermix other commands between the stages.
We could also have some "bootm query <foo>" to expose the internal
state if that's useful. We could completely get rid of the various
"env" vars that impact bootm and just make them state variables
("verify", "autostart", "bootm_size", "bootm_low", ...)
Also, bootm would be the sequence of:
bootm start <args>
bootm prep
bootm load_os
bootm load_fdt
bootm load_initrd
bootm jump
comments?
- k
More information about the U-Boot
mailing list