Bypassing U-Boot (SPL -> kernel)

Interesting concept, and I would be interested in this as well. I attached a patch that I did a few days ago that made SPL and u-boot finish in a little over 3 seconds (was about 7 seconds out of the box), but I would like to see this reduced further if possible. If you find a solution please let me know!

u-boot.patch (8.05 KB)

By the way, the patch is not ideal… I commented out a bunch of things, but ideally you would use the #define’s to turn things on/off. This was just a way for me to hack it quickly so I could figure out the minimum I needed to boot the kernel.

Two stage U-Boot design

This section gives an overview of the two stage U-Boot approach adopted for AM335X.



The size of the internal RAM in AM335X is 128KB out of which 18KB at the end is used by the ROM code. Also, 1 KB at the start (0x402f0000 - 0x402f0400) is secure and it cannot be accessed This places a limit of 109KB on the size of the U-Boot binary which the ROM code can transfer to the internal RAM and use as an initial stack before initialization of DRAM.



Since it is not possible to squeeze in all the functionality that is normally expected from U-Boot in < 110KB (after setting aside some space for stack, heap etc) a two stage approach has been adopted. Initial stage initalize only the required boot devices (NAND, MMC, I2C etc); 2nd full stage initall all other devices (ethernet, timers, clocks etc). The 1st binary is generated MLO and the 2nd stage is generated as u-boot.img.








http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User’s_Guide

— On Sat, 6/1/13, Brent brents_3@hotmail.com wrote:


> From: Brent brents_3@hotmail.com
> Subject: [beagleboard] Re: Bypassing U-Boot (SPL → kernel)
> To: beagleboard@googlegroups.com
> Cc: yllarest@gmail.com
> Date: Saturday, June 1, 2013, 9:31 AM
>
> By the way, the patch is not ideal… I commented out a bunch of things, but ideally you would use the #define’s to turn things on/off. This was just a way for me to hack it quickly so I could figure out the minimum I needed to boot the kernel.
>
> On Saturday, June 1, 2013 10:29:19 AM UTC-4, Brent wrote:
>
> > Interesting concept, and I would be interested in this as well. I attached a patch that I did a few days ago that made SPL and u-boot finish in a little over 3 seconds (was about 7 seconds out of the box), but I would like to see this reduced further if possible. If you find a solution please let me know!
> >
> > On Friday, May 31, 2013 10:36:36 PM UTC-4, Paul wrote:
> >
> > > Hello folks!
> > >
> > > I’m trying to reduce the boot time of a BB Black by skipping u-boot and trying to load a compressed kernel directly from the u-boot SPL. Is there a way to do such thing? If so how?
> > >
> > > Thanks in advance!
>
> –
> For more options, visit http://beagleboard.org/discuss
> —
> You received this message because you are subscribed to the Google Groups “BeagleBoard” group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

|

Wow, that’s really amazing that you got the kernel to load in 600ms! Do you mind sharing how you achieved this? I haven’t started optimizing the kernel yet so any direction would be appreciated.

-brent