Skip to content

Commit d2da548

Browse files
committed
binaries: add FEL capable SPL binaries
FEL booting allows to boot a board using an USB OTG connection from a host PC, without the need to use any media (SD card) or on-board storage (SPI flash). This is controlled by the BootROM, which runs entirely in AArch32 mode. To allow FEL booting, we need to load and execute some code to at least initialise the DRAM. U-Boot's SPL can do this, but it needs to return to the (32 bit!) BootROM to allow loading of further firmware components or other images. Since the mainline U-Boot is an AArch64 port, this is not easily doable with the upstream version. However it is possible to build an AArch32 version of the SPL, with the help of some (non-upstream) patches [1]. Add three binaries to allow FEL booting of A64 (DDR3/LPDDR3 DRAM) and H5 boards. Also document the steps required to rebuild those binaries. [1] https://github.com/apritzel/u-boot/commits/sunxi64-fel32
1 parent f6c4a95 commit d2da548

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

binaries/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,38 @@ To rebuild those binaries, fetch the allwinner branch from the
3939
The resulting binary is `build/sun50iw1p1/debug/bl31.bin`. For the non-debug
4040
build, use `DEBUG=0` in the command line above and use the binary at
4141
`build/sun50iw1p1/release/bl31.bin`.
42+
43+
FEL capable SPL builds
44+
----------------------
45+
- `sunxi-a64-spl32-ddr3.bin`: 32bit build of a mainline based U-Boot SPL. Can be
46+
used for FEL booting. This version is for boards with the Allwinner A64 SoC
47+
and DDR3 DRAM (*not* LPDDR3), like the original Pine64 or the BananaPi M64.
48+
- `sunxi-a64-spl32-lpddr3.bin`: 32bit build of a mainline based U-Boot SPL.
49+
Can be used for FEL booting. This version is for boards with the Allwinner A64
50+
SoC and LPDDR3 DRAM, like the SoPine or the Pinebook.
51+
- `sunxi-h5-spl32-ddr3.bin`: 32bit build of a mainline based U-Boot SPL.
52+
Can be used for FEL booting. This version is for boards with the Allwinner H5
53+
SoC and DDR3 DRAM, like the OrangePi PC2 or the NanoPi Neo 2.
54+
55+
To FEL boot a board, connect your host computer to the OTG port of a board.
56+
On the Pine64 you need a special USB-A <-> USB-A cable connected to the upper
57+
USB port. Then use the sunxi-fel program from the sunxi-tools [1] repository:
58+
59+
$ sunxi-fel -v spl sunxi-a64-spl32-ddr3.bin
60+
61+
After that you can load further firmware components into DRAM, if required.
62+
63+
To rebuild those binaries, fetch the sunxi64-fel32 branch from
64+
[this U-Boot](https://github.com/apritzel/u-boot/commits/sunxi64-fel32)
65+
repository:
66+
67+
$ git checkout sunxi64-fel32
68+
$ export CROSS_COMPILE=arm-linux-gnueabihf-
69+
$ make sun50i-a64-ddr3-spl_defconfig
70+
$ make
71+
72+
The full U-Boot will probably fail to build, but you can pick up the SPL binary
73+
by just copying spl/sunxi-spl.bin. Alternative defconfigs provided are:
74+
- `sun50i-a64-ddr3-spl_defconfig`: A64 with DDR3 DRAM (Pine64, BananaPi M64)
75+
- `sun50i-a64-lpddr3-spl_defconfig`: A64 with LPDDR3 DRAM (Pine64 LTS, Pinebook)
76+
- `sun50i-h5-ddr3-spl_defconfig`: H5 with DDR3 DRAM (OrangePi PC2)

binaries/sunxi-a64-spl32-ddr3.bin

24 KB
Binary file not shown.
24 KB
Binary file not shown.

binaries/sunxi-h5-spl32-ddr3.bin

24 KB
Binary file not shown.

0 commit comments

Comments
 (0)