All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Tom Rini <trini@konsulko.com>
Cc: "Simon Glass" <sjg@chromium.org>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Marek Vasut" <marex@denx.de>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Bin Meng" <bmeng.cn@gmail.com>, "Stefan Roese" <sr@denx.de>,
	"Marek Behún" <marek.behun@nic.cz>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Aaron Williams" <awilliams@marvell.com>
Subject: Re: RFC: Support for U-Boot phases in Kconfig
Date: Wed, 11 Aug 2021 10:57:45 +0100	[thread overview]
Message-ID: <CACxGe6toUu5LT4yt56xcA3ZsiHbxcGv+Z2FT9eAdn+9fgVzaDA@mail.gmail.com> (raw)
In-Reply-To: <20210809191111.GD858@bill-the-cat>

On Mon, Aug 9, 2021 at 8:11 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Aug 07, 2021 at 04:23:36PM -0600, Simon Glass wrote:
> > Comments welcome!
>
> I think what this is really showing is that Yamada-san was right.  All
> the games we need to do so that "make fooboard_config all" results in
> building the N stages needed was the wrong track.  Taking
> khadas-edge-v-rk3399 as an example, if we had instead of
> khadas-edge-v-rk3399_defconfig but khadas-edge-v-rk3399_tpl_defconfig
> khadas-edge-v-rk3399_spl_defconfig and khadas-edge-v-rk3399_config, each
> of which could set CONFIG_TPL, CONFIG_SPL or neither.  Then yes, to
> build u-boot-rockchip.bin you would need to pass in the separately build
> TPL and SPL stages.  But, that's true of so so many other platforms.  To
> pick another example, imx8mm_evk doesn't function without other
> binaries.  If in theory to build khadas-edge-v-rk3399 you had to do
> something like:
> $ export CROSS_COMPILE=aarch64-linux-
> $ make O=obj/tpl khadas-edge-v-rk3399_tpl_config all
> $ make O=obj/spl khadas-edge-v-rk3399_spl_config all
> $ make O=obj/khadas-edge-v-rk3399 TPL=obj/tpl/u-boot.bin \
>     SPL=obj/spl/u-boot.bin khadas-edge-v-rk3399_config all
>
> But it also meant that we didn't need to duplicate so so many Kconfig
> options and most of our obj rules would just be:
> obj-$(CONFIG_FOO) += foo.o
>
> would be a win.

Oh! I quite like this. Simpler indeed. With all the different
components that need to be pulled in to build a bootable image, each
of the various U-Boot stages would just be another configuration that
needs to be built and included in the result.

I've already been playing with a top level build tool that starts with
the U-Boot config and chooses the correct configuration of TFA, OPTEE,
and any other binaries needed. Basically it is a top level Makefile
that includes the U-Boot config and then passes make targets through
to the right build directories. This could effectively be the same
thing; start with the board config, and then filter it when going into
each stages build directory with O= as you have above.

If you want to look I've got the repo published here:

https://gitlab.arm.com/systemready/u-boot-tfa-build/

g.

  parent reply	other threads:[~2021-08-11  9:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 22:23 RFC: Support for U-Boot phases in Kconfig Simon Glass
2021-08-09 19:11 ` Tom Rini
2021-08-10 14:58   ` Simon Glass
2021-08-10 19:38     ` Tom Rini
2021-08-11 12:56       ` Simon Glass
2021-08-11 13:47         ` Tom Rini
2021-08-11 14:03           ` Simon Glass
2021-08-11 14:17             ` Tom Rini
2021-08-11 14:26               ` Simon Glass
2021-08-11 15:40                 ` Tom Rini
2021-08-11 18:28                   ` Simon Glass
2021-08-11 21:19                     ` Tom Rini
2021-08-11 20:14               ` Sean Anderson
2021-08-11 20:42                 ` Tom Rini
2021-08-11 14:02         ` Tom Rini
2021-08-11 14:11           ` Simon Glass
2021-08-11 14:31             ` Tom Rini
2021-08-11 14:47               ` Simon Glass
2021-08-11 21:04                 ` Tom Rini
2021-08-11  9:57   ` Grant Likely [this message]
2021-08-11 12:58     ` Simon Glass
2021-08-11 13:47       ` Grant Likely
2021-08-11 13:52         ` Simon Glass
2021-08-09 22:31 ` Sean Anderson
2021-08-10 20:32   ` Simon Glass

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=CACxGe6toUu5LT4yt56xcA3ZsiHbxcGv+Z2FT9eAdn+9fgVzaDA@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=awilliams@marvell.com \
    --cc=bmeng.cn@gmail.com \
    --cc=marek.behun@nic.cz \
    --cc=marex@denx.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yamada.masahiro@socionext.com \
    /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.