public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: Getting rid of falcon mode
Date: Wed, 14 Apr 2021 16:05:43 -0400	[thread overview]
Message-ID: <20210414200543.GA1310@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ158z+ndS9rPRNV_Rn_WHLfyYe1sieM7ojzHGsumV1RHg@mail.gmail.com>

On Wed, Apr 14, 2021 at 08:37:07PM +0100, Simon Glass wrote:
> Hi,
> 
> On Tue, 13 Apr 2021 at 09:32, Alex G. <mr.nuke.me@gmail.com> wrote:
> >
> > ## Introduction
> >
> > Today we use "falcon mode" to mean "boot linux straight from SPL". This
> > designation makes sense, since falcons "fly at high speed and change
> > direction rapidly" according to Wikipedia.
> >
> > The way we implement falcon mode is to reserve two areas of storage:
> >    * kernel area/partition
> >    * dtb area/partition
> > By using some "special cases", and "spl export", SPL can more or less
> > figure out how to skip u-boot.
> >
> >
> > ## The plot twist
> >
> > People familiar with FIT, will have recognized that the above is
> > achievable with a very basic FIT image. With some advantages:
> >
> >      - No "special cases" in SPL code
> >      - Signed kernel images
> >      - Signed kernel devicetree
> >      - Devicetree overlays
> >      - Automatic selection of correct devicetree
> >
> >
> > ## The problems
> >
> > The advantages of FIT are not obvious by looking at SPL code. A
> > noticeable amount of SPL code is hidden under #ifdef CONFIG_SPL_OS_BOOT,
> > leading one to believe that SPL_OS_BOOT is very important. It must be
> > since it takes up so much code.
> >
> > Enabling falcon mode is not well documented, and requires a lot of trial
> > and error. I've had to define 7 macros, and one new function to get it
> > working on my board -- and vividly remember the grief. This is an
> > antiquated way of doing things, and completely ignores the u-boot
> > devicetree -- we could just as well have defined those seven values in
> > the dtb.
> >
> > SPL assumes that it must load u-boot, unless in instances under
> > CONFIG_SPL_OS_BOOT. This has cause me a huge amount of grief and
> > confusion over the past several months. I have no less than three patch
> > series trying to address shortfalls there. It's awful.
> >
> >
> > ## The proposal
> >
> > I propose we drop falcon mode support for legacy images.
> >
> >    - Drop CONFIG_SPL_OS_BOOT. Support for this is implied by SPL_FIT
> >    - Drop the "dtb area/partition". The dtb is derived from the FIT
> >    - Drop "spl export"
> >
> >
> > How do we deal with devicetrees in the FIT then? The options are to use
> > a modified devicetree which has the desired "/chosen" node, or use DTB
> > overlays.
> >
> > What are the reasons why we shouldn't go this route?
> 
> I think this makes sense, on the basis that it is a legacy image and
> people can always use the U-Boot path if needed.
> 
> I believe Falcon boot made a lot more sense when the cache was off.
> But at least in my experience, we were able to get through two SPLs
> and two U-Boots and boot a kernel about 800ms on a Cortex-A15, so
> Falcon mode might not be so relevant anymore, and supporting a legacy
> image seems like unnecessary complexity.

I'm curious where the end of that 800ms is, and I think we might need to
post grabserial logs so everyone is on the same page about where / when
we're at in booting.

-- 
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/20210414/17369cba/attachment.sig>

      reply	other threads:[~2021-04-14 20:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 21:32 Getting rid of falcon mode Alex G.
2021-04-12 22:21 ` Tom Rini
2021-04-13  8:56 ` Maxime Ripard
2021-04-13 14:08   ` Alex G.
2021-04-13 14:13     ` Tom Rini
2021-04-13 14:28       ` Maxime Ripard
2021-04-13 14:26     ` Maxime Ripard
2021-04-14 19:37 ` Simon Glass
2021-04-14 20:05   ` Tom Rini [this message]

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=20210414200543.GA1310@bill-the-cat \
    --to=trini@konsulko.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox