[U-Boot] RFC: Alternative boot_jump_linux() function

Tom Rini trini at konsulko.com
Fri May 25 12:11:37 UTC 2018


On Thu, May 17, 2018 at 07:48:45PM +0300, Ramon Fried wrote:
> On Thu, May 17, 2018 at 5:22 PM, Tom Rini <trini at konsulko.com> wrote:
> > On Thu, May 17, 2018 at 02:01:55PM +0300, Ramon Fried wrote:
> >
> >> Hi.
> >> I'm currently working on snapdragon bootloader support and in the
> >> particular case where U-boot is running in Aarch32 and the kernel is
> >> Aarch64 the specific implementation is to jump to Linux through SCM
> >> call.
> >>
> >> I try to find the best possible way to provide an alternative boot function.
> >> Adding #ifdef ARCH_SNAPDRAGON will just be too specific in
> >> arm/lib/bootm.c in my opinion and I'm thinking of introducing kind of
> >> a callback function in gd. that if exists will jump there instead of
> >> executing boot_jump_linux().
> >>
> >> What do you think ?
> >
> > So, to be clear, we're on an aarch64 SoC, but U-Boot has been entered in
> > 32bit mode.  And we need to boot a 64bit Linux Kernel.  What else, if
> > anything, is also loaded/still in residence/etc?  Can you explain the
> > overall usecase a bit more and why we're in 32bit mode?  Thanks!
> >
> OK.
> Basically, Qualcomm has the following boot flow:
> 
> PBL -> SBL -> LK -> Linux Kernel
> 
> PBL - 32bit Primary boot loader(ROM) loads the SBL from eMMC.
> 
> SBL - 32bit Secondary boot loader(eMMC/UFS), proprietary closed source,
> Initializes the DDR, starts the trustzone and can load either a 32bit
> or a 64bit (1)
> ELF bootloader, given that it's signed.
> 
> LK - Little kernel, 32bit. Qualcomm maintains a downstream version, open source.
> Loads 64bit Android boot image from eMMC and jumps to it using SMC
> call made to Trustzone.
> 
> This was used primarily for Android, but when Dragonboards boards came
> out, Qualcomm and Linaro started
> distributing 64bit Linux OE & Debian builds that were booted by LK.
> Because U-boot is much more useful than LK, the first U-boot
> contribution was made by Mateusz Kulikowski.
> 
> Basically, Mateusz port is wrapping U-boot to appear as a kernel so LK
> boots it, then it boots Linux.
> So basically, LK did the 32 -> 64 transition.
> 
> Now, here where I appear in the story... :)

Thanks for the detailed background.

> I'm trying to get rid of LK and use U-boot as the real bootloader for Linux.
> I succeeded in that, and I have all the patches ready for submission,
> I just need to add a dedicated boot function
> that does the SMC call, hence this discussion.
> 
> (1) - It implies that we can in practice just use 64bit U-boot for Snapdragon.
> The only problem I have right now is that there's isn't any
> open-source tool to sign the Bootloader that supports ELF64
> executable.

Is it possible to just write that tool, or update an existing tool to do
that signature?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180525/f445ab15/attachment.sig>


More information about the U-Boot mailing list