Sunxi (pine64-lts) SPL load BL32

I am attempting to boot the Pine64-lts with a Trusted OS. In the ARM-TF documentation it states "make sure the loader (SPL) loads the Trusted OS binary to the beginning of DRAM (0x40000000)." I have yet to find a mechanism by which U-Boot's SPL for this platform can be configured to do this. Any help would be appreciated.
Thanks, Adam

Hi Adam,
I am attempting to boot the Pine64-lts with a Trusted OS. In the ARM-TF documentation it states "make sure the loader (SPL) loads the Trusted OS binary to the beginning of DRAM (0x40000000)." I have yet to find a mechanism by which U-Boot's SPL for this platform can be configured to do this. Any help would be appreciated.
You can use "sunxi-fel" tool(which is part of sunxi-tool[0]) to load Secure OS on pine64.
Also, you have to use specific SPL binary[1] to make it work.Besides that you need USB Type A Male to Type A male cable(connected from host to upper USB socket on Pine64 machine)
So, you can try following from host machine(after building sunxi-tool package)
# /sunxi-fel -v -p spl sunxi-a64-spl32-ddr3.bin write 0x44000 bl31.bin write 0x40000000 tee-pager_v2.bin write 0x4a000000 u-boot.bin write 0x42080000 Image write 0x43080000 sun50i-a64-pine64-plus.dtb reset64 0x44000
Hi Andre,
Right now, we club different binaries together using FIT image(if I am right ?), is it a good idea to club Secure OS image as well with in FIT for A64 based platform ?
[0]: https://github.com/linux-sunxi/sunxi-tools [1]: https://github.com/apritzel/pine64/tree/master/binaries
Thanks -Amit

Hi Adam,
I am attempting to boot the Pine64-lts with a Trusted OS. In the ARM-TF documentation it states "make sure the loader (SPL) loads the Trusted OS binary to the beginning of DRAM (0x40000000)." I have yet to find a mechanism by which U-Boot's SPL for this platform can be configured to do this. Any help would be appreciated.
It can't be easily "configured" officially, as I am not sure what would be the proper and canonical way here. Apart from the FEL boot hack that Amit mentioned the best way to achieve this is to add a secure payload to the FIT image, by using a custom .its file: - Compile U-Boot normally, that should produce a u-boot.its file. - Edit this file to add a node for your BL32 to the /images node: bl32 { description = "Secure payload"; data = /incbin/("bl32.bin"); type = "firmware"; arch = "arm64"; compression = "none"; load = <0x40000000>; }; - Reference this node in the config_1 node below: ... loadables = "atf", "bl32"; ... - Then recreate u-boot.itb: ./tools/mkimage -E -f u-boot.its -p 0x0 u-boot.itb
u-boot.its will be overwritten by every call to make, so take care.
The .itb file is the FIT image that goes behind the SPL on the SD card/eMMC/SPI flash. You can cat together spl/sunxi-spl.bin and u-boot.itb to create the final u-boot-sunxi-with-spl.bin image.
Good luck!
Cheers, Andre.
participants (3)
-
adam parker
-
Amit Tomer
-
Andre Przywara