All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 2/2] board: stemmy: Copy atags for booting downstream/vendor kernel
Date: Thu, 8 Jul 2021 01:54:58 +0200	[thread overview]
Message-ID: <CACRpkdbT4UmFYnG4=d2fmq_s8wGhyhvbANnK0O_XnZBZNeGu5Q@mail.gmail.com> (raw)
In-Reply-To: <20210707105855.89260-2-stephan@gerhold.net>

On Wed, Jul 7, 2021 at 12:59 PM Stephan Gerhold <stephan@gerhold.net> 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@gerhold.net>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

  reply	other threads:[~2021-07-07 23:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 10:58 [PATCH 1/2] board: stemmy: Parse atags to get available memory Stephan Gerhold
2021-07-07 10:58 ` [PATCH 2/2] board: stemmy: Copy atags for booting downstream/vendor kernel Stephan Gerhold
2021-07-07 23:54   ` Linus Walleij [this message]
2021-07-14 20:53   ` Tom Rini
2021-07-07 23:53 ` [PATCH 1/2] board: stemmy: Parse atags to get available memory Linus Walleij
2021-07-14 20:53 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdbT4UmFYnG4=d2fmq_s8wGhyhvbANnK0O_XnZBZNeGu5Q@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=stephan@gerhold.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.