All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/42] Use separate options for TPL support
Date: Wed, 24 Aug 2016 20:41:01 -0400	[thread overview]
Message-ID: <20160825004101.GH10464@bill-the-cat> (raw)
In-Reply-To: <9a361fd8-4936-8667-0421-3cee236c7d06@wwwdotorg.org>

On Wed, Aug 24, 2016 at 12:16:23PM -0600, Stephen Warren wrote:
> On 08/24/2016 10:51 AM, Simon Glass wrote:
> >At present TPL uses the same options as SPL support. In a few cases the board
> >config enables or disables the SPL options depending on whether
> >CONFIG_TPL_BUILD is defined.
> >
> >With the move to Kconfig, options are determined for the whole build and
> >(without a hack like an #undef in a header file) cannot be controlled in this
> >way.
> >
> >Create new TPL options for these and update users. This will allow Kconfig
> >conversion to proceed for these boards.
> 
> >diff --git a/common/Makefile b/common/Makefile
> 
> > # environment
> >-ifdef CONFIG_SPL_ENV_SUPPORT
> >+ifdef CONFIG_TPL_BUILD
> >+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_attr.o
> >+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_flags.o
> >+obj-$(CONFIG_TPL_ENV_SUPPORT) += env_callback.o
> >+else
> > obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
> > obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
> > obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
> >+endif
> 
> This feels like it will become an unbounded mess as the set of
> Kconfig options for SPL and TPL grow.
> 
> Rather, I think we should have a separate U-Boot build/binary,
> separate defconfig, etc. for main U-Boot, SPL (if a board uses it),
> TPL (if a board uses it), etc., plug perhaps some top-level
> definition to bind them all back together.
> 
> That way, we'll just have CONFIG_ENV_SUPPPORT, and never have any
> CONFIG_$(xxx)_ENV_SUPPORT. We completely avoid the proliferation of
> duplicated Kconfig symbols.
> 
> I vaguely recall mention of SPL choosing the DT for the main U-Boot.
> What if SPL needs different DTs? We'd need to use TPL to choose the
> DT. What if TPL needs different DT to? We'd need to introduce a new
> binary (QPL?) to do the selection. That might then need
> CONFIG_QPL_*. If we just use the same Kconfig symbols everywhere,
> and just configure which options are enabled via a separate
> defconfig for main, SPL, TPL, QPL, we'll have a much more manageable
> system.
> 
> Of course, that would probably require some Kconfig work to allow
> the defconfigs for ${board}_spl_defconfig, ${board}_tpl_defconfig,
> ${board}_qpl_defconfig, and ${board}_defconfig to all include
> ${board}_common_defconfig (or whatever set common files are
> appropriate) to avoid duplication. ChromeOS already solved that for
> the kernel IIRC. Also, we'd likely need some kind of top-level
> ${board}_xxx file to indicate that plain "make" should separately
> build spl, tpl, main for the boad, and how to munge them together.

It's a bit of a mess, yes.  And it doesn't help matters that there's now
a growing number of boards that would like to / could go in the
direction of dropping SPL as they have sufficient initial memory to have
real U-Boot there to start with.  But I think the additional tooling
required to make the end user experience be at least as good as it is
now means we need to revisit this topic once things are largely in
Kconfig. I think the binary manager Simon showed a while ago will be
part this too, so that we can continue to have a functional output at
the end.

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

  reply	other threads:[~2016-08-25  0:41 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 16:51 [U-Boot] [PATCH 00/42] Kconfig: Move CONFIG_SPL_..._SUPPORT to Kconfig Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 01/42] moveconfig: Add an option to skip prompts Simon Glass
2016-08-25  1:45   ` Masahiro Yamada
2016-08-25 12:04     ` Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 02/42] moveconfig: Add an option to commit changes Simon Glass
2016-08-25  1:40   ` Masahiro Yamada
2016-08-25 12:04     ` Simon Glass
2016-08-26 16:47       ` Masahiro Yamada
2016-08-26 18:13         ` Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 03/42] Kconfig: Move SPL settings into their own file Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 04/42] arm: fsl: Adjust ordering of #ifndef CONFIG_SPL_BUILD Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 05/42] Drop CONFIG_SPL_RAM_SUPPORT Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 06/42] Use separate options for TPL support Simon Glass
2016-08-24 18:16   ` Stephen Warren
2016-08-25  0:41     ` Tom Rini [this message]
2016-08-25 12:04     ` Simon Glass
2016-08-25  2:20   ` Masahiro Yamada
2016-08-25 12:04     ` Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 07/42] Kconfig: spl: Add SPL support options to Kconfig Simon Glass
2016-08-25  1:28   ` Masahiro Yamada
2016-08-25 12:04     ` Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 08/42] Kconfig: tpl: Add some TPL " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 09/42] Move existing use of CONFIG_SPL_DM " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 10/42] Move existing use of CONFIG_SPL_RSA " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 11/42] Convert CONFIG_SPL_CRYPTO_SUPPORT " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 12/42] Convert CONFIG_SPL_HASH_SUPPORT " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 13/42] Convert CONFIG_SPL_DMA_SUPPORT " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 14/42] Convert CONFIG_SPL_DRIVERS_MISC_SUPPORT " Simon Glass
2016-08-24 16:51 ` [U-Boot] [PATCH 15/42] Convert CONFIG_SPL_ENV_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 16/42] Convert CONFIG_SPL_ETH_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 17/42] Convert CONFIG_SPL_EXT_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 18/42] Convert CONFIG_SPL_FAT_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 19/42] Convert CONFIG_SPL_GPIO_SUPPORT " Simon Glass
2016-08-24 18:01   ` Maxime Ripard
2016-08-24 19:30     ` Tom Rini
2016-08-25 12:04       ` Simon Glass
2016-08-25 22:01         ` Tom Rini
2016-08-26  2:14           ` Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 20/42] Convert CONFIG_SPL_I2C_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 21/42] Convert CONFIG_SPL_LIBCOMMON_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 22/42] Convert CONFIG_SPL_LIBDISK_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 23/42] Convert CONFIG_SPL_LIBGENERIC_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 24/42] Convert CONFIG_SPL_MMC_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 25/42] Convert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 26/42] Convert CONFIG_SPL_MTD_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 27/42] Convert CONFIG_SPL_MUSB_NEW_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 28/42] Convert CONFIG_SPL_NAND_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 29/42] Convert CONFIG_SPL_NET_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 30/42] Convert CONFIG_SPL_NOR_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 31/42] Convert CONFIG_SPL_ONENAND_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 32/42] Convert CONFIG_SPL_PINCTRL_SUPPORT " Simon Glass
2016-08-25  1:34   ` Masahiro Yamada
2016-08-25 12:04     ` Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 33/42] Convert CONFIG_SPL_POWER_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 34/42] Convert CONFIG_SPL_SATA_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 35/42] Convert CONFIG_SPL_SERIAL_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 36/42] Convert CONFIG_SPL_SPI_FLASH_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 37/42] Convert CONFIG_SPL_SPI_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 38/42] Convert CONFIG_SPL_USBETH_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 39/42] Convert CONFIG_SPL_USB_HOST_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 40/42] Convert CONFIG_SPL_USB_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 41/42] Convert CONFIG_SPL_WATCHDOG_SUPPORT " Simon Glass
2016-08-24 16:52 ` [U-Boot] [PATCH 42/42] Convert CONFIG_SPL_YMODEM_SUPPORT " Simon Glass
2016-08-25  4:30 ` [U-Boot] [PATCH 00/42] Kconfig: Move CONFIG_SPL_..._SUPPORT " Heiko Schocher
2016-08-25 12:04   ` Simon Glass
2016-08-26  4:58     ` Heiko Schocher
2016-08-25 14:19 ` Adam Ford

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=20160825004101.GH10464@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 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.