[U-Boot] [PATCH sunxi-tools] WIP: fel: Add a command for loading U-Boot SPL binaries in eGON format

Simon Glass sjg at chromium.org
Fri Feb 6 06:49:39 CET 2015


Hi Siarhei,

On 5 February 2015 at 02:36, Siarhei Siamashka
<siarhei.siamashka at gmail.com> wrote:
> !!! Works only on Allwinner A20 so far and needs a bit more
> !!! debugging. And even on A20, the transition from the SPL to
> !!! the main U-boot binary has some glitches.
>
> Now it should be possible to load and execute the same U-Boot SPL,
> as used for booting from SD cards. The only argument for this new
> command is the name of the SPL binary file (with eGON header).
> It can be run as:
>
>     fel spl u-boot-sunxi-with-spl.bin

This looks great! Does it write only the SPL portion or does it write
U-Boot also?

I don't really understand how it works but will leave that to you and Hans.

>
> The free space in SRAM is scattered in the FEL mode across multiple
> locations. We just split SPL into individual chunks, upload them
> to the free locations in SRAM and also upload a small startup code,
> which is responsible for harvesting and gluing the pieces of SPL
> together. Additionally, the eGON checksum is verified to ensure
> that no data corruption has happened due to some unexpected clash
> with the FEL protocol code from the BROM.
>
> After this is done, it is not possible to return back to FEL anymore
> (both IRQ and normal stacks of the BROM are overwritten). However
> it is still possible to transfer control to the FEL init code (so
> that it re-initializes the USB hardware and all the other things):
>
>     /* Jump to the FEL entry point in BROM */
>     movw  r0, #0x20
>     movt  r0, #0xffff
>     bx    r0
>
> This unifies the FEL and SD card SPL binaries. And also removes
> the FEL SPL size limit (now it can be as large as ~30 KiB).
>
> This work had been inspired by the recent FEL mode support
> u-boot patches from Simon Glass and Hans de Goede.
>
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>

[snip]

Regards,
Simon


More information about the U-Boot mailing list