[PATCH 2/2] board: stemmy: Copy atags for booting downstream/vendor kernel

Tom Rini trini at konsulko.com
Wed Jul 14 22:53:15 CEST 2021


On Wed, Jul 07, 2021 at 12:58:55PM +0200, Stephan Gerhold wrote:

> The U-Boot "stemmy" board is mainly intended to simplify booting
> mainline Linux on various smartphones from Samsung based on ST-Ericsson
> Ux500. While the mainline kernel is working great, there are still some
> features missing there. In particular, it is currently not possible to
> charge the battery when using the mainline kernel.
> 
> This means that it is still necessary to boot the downstream/vendor
> kernel from Samsung sometimes to charge the device. That kernel is
> ancient, still uses board files + ATAGS instead of device trees and
> relies on a strange very long kernel command line hardcoded in the
> Samsung bootloader.
> 
> Actually, since mainline is booted with device trees there is a very
> simple way to make the old downstream kernel work as well: We can
> simply take most of the ATAGS passed to U-Boot from the Samsung
> bootloader and copy them as-is when booting a kernel without device
> tree. That way the long command line and other needed ATAGS are copied
> as-is without having to bother with them.
> 
> The only exception is the ATAG_INITRD - since the initrd is loaded
> by U-Boot, the atag for that should be generated in U-Boot so it points
> to the correct address. All other ATAGS are copied as-is and not
> generated in U-Boot.
> 
> Also use the chance and provide a serial# for U-Boot by parsing the
> ATAG_SERIAL that is also passed by the Samsung bootloader.
> 
> Signed-off-by: Stephan Gerhold <stephan at gerhold.net>
> Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210714/7b0d0a7b/attachment.sig>


More information about the U-Boot mailing list