Skip to content

Support unified u-boot SPL for SD cards and FEL mode

Hans de Goede u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest0 of 2 patches 0 repliesNew

Patches in v2 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [U-Boot] [PATCH sunxi-tools v2 0/2] Support unified u-boot SPL for SD cards and FEL mode

Hi,

Quoted 33 lines · Siarhei Siamashka

An updated variant of the older patch

     http://lists.denx.de/pipermail/u-boot/2015-February/204024.html

These patches are not for the u-boot code (unless u-boot decides to cannibalize the 'fel' tool later) but still provide a glue layerHi, between the Allwinner BROM code and the u-boot SPL code. And need to play nice with both of them.

The updated 'fel' tool is supposed to be used together with u-boot v2015.04 and provide support for booting regular u-boot SPL binaries over USB via FEL mode. So that a special u-boot sunxi FEL configuration can be eventually dropped in the future.

The usage instructions are in the 'New method of booting u-boot over USB (u-boot v2015.04 and later versions)' section of the linux-sunxi wiki page

     http://linux-sunxi.org/index.php?title=FEL/USBBoot&oldid=12979

It temporarily moves the BROM data from the first 32 KiB of SRAM into a different SRAM section before calling the SPL code. And then moves it back before returning from the SPL back to the FEL code in BROM. This provides a contiguous 32 KiB block in the beginning of SRAM for use by the SPL. And in the case if an extra SRAM section is not available, we can at least "defragmemnt" the free memory areas and still provide a contiguous ~21 KiB block to the SPL in the beginning of SRAM.

This code is also available in the following branch:

     https://github.com/ssvb/sunxi-tools/commits/20150206-fel-large-spl-support

Siarhei Siamashka (2):
fel: Split 'aw_fel_get_version' into 'get' and 'print' variants
fel: New command for loading U-Boot SPL binaries in eGON format

Quoted 6 lines
  fel-to-spl-thunk.S | 172 +++++++++++++++++++++++++++++++
  fel-to-spl-thunk.h |  69 +++++++++++++
  fel.c              | 291 +++++++++++++++++++++++++++++++++++++++++++++++++----
  3 files changed, 510 insertions(+), 22 deletions(-)

create mode 100644 fel-to-spl-thunk.S
create mode 100644 fel-to-spl-thunk.h

Thanks for your work on this, ACK to both patches, feel free to push them.

One question, the new wiki instructions say that for the latest upstream u-boot _felconfig is no longer necessary, but Simon's patches to fix FEL support upstream contain some #ifdef FEL in start.S to skip some lowlevel init when in FEL mode, does that mean that skipping this is no longer necessary ?

Regards,

Hans