All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] RFC: Split configs between U-Boot proper and SPL builds
@ 2021-09-17 16:17 Simon Glass
  2021-09-17 16:17 ` [PATCH 01/17] env: Avoid checking ENV_IS_IN when env disabled Simon Glass
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Simon Glass @ 2021-09-17 16:17 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Masahiro Yamada, Simon Glass, Bin Meng,
	Joe Hershberger, Lukasz Majewski

At present a single .config file is used to configure the build for all
phases, with SPL phases having a SPL_ or TPL_ prefix on each CONFIG to
indicate which build it controls.

So, for example, we have CONFIG_MISC and CONFIG_SPL_MISC to control the
inclusion of MISC drivers in each phase.

From this .config a few other files are generated (by the kconfig tool)
for use with make and from C code (auto.conf and autoconf.h).

This all  works well but is a bit ugly in places, for example requiring
the use of a SPL_TPL_ macro in Makefiles to distinguish between options
intended for SPL and U-Boot proper.

In discussions with trini the idea came up of creating separate config
files for each type of build. So instead of using SPL_ or TPL_ prefixes,
each build includes its own files with the config it needs.

This series takes a pass at implementing this. It makes only minor changes
to the existing Kconfig files, to make things work, but updates the
kconfig tool to output seperate files for each phase. These changes may
need reworking to send upstream.

With this series, SPL_TPL_ resolves to an empty value, so it is possible
to drop this macro.

This cannot be applied as is. Any ad-hoc CONFIG options break the logic
in this series, since these are not processed by the kconfig tool. A
special xSPL_TPL_ macro is added to show this problem.

A run indicative of the current state (without the last patch, which
breaks everything) is here:

https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/9135

Once CONFIG migration is completed, something along these lines can be
applied.


Simon Glass (17):
  env: Avoid checking ENV_IS_IN when env disabled
  x86: Fix qemu condition for arch_cpu_init()
  acpi: Add a Kconfig for SPL
  cmd: Add an SPL Kconfig for CMDLINE and HUSH
  cros_ec: Add SPL Kconfigs for cros_ec features
  power: Add SPL Kconfig for sandbox pmc emulator
  test: Add SPL Kconfig for compression tests
  sandbox: Enable MISC support for the SPL build
  serial: Tidy up the Makefile condition for DM_SERIAL
  virtio: Add SPL Kconfig for virtio
  kconfig: Refactor code into separate writer functions
  kconfig: Support writing separate SPL files
  Makefile: Include the config for the phase being built
  Makefile: Use empty SPL_ and SPL_TPL_ vars
  Makefile: Support ad-hoc COMFIX_SPL_IMAGE_SIZE et al
  kconfig: Update CONFIG_IS_ENABLED() for split files
  kconfig: Add a new CONFIG() macro

 Makefile                         |  11 +-
 arch/x86/cpu/qemu/qemu.c         |   2 +-
 cmd/Kconfig                      |  10 ++
 cmd/nvedit.c                     |   2 +
 configs/sandbox_noinst_defconfig |   1 +
 configs/sandbox_spl_defconfig    |   1 +
 drivers/core/Kconfig             |   5 +
 drivers/i2c/Kconfig              |  10 ++
 drivers/power/acpi_pmc/Kconfig   |   5 +
 drivers/serial/Makefile          |   2 +-
 drivers/virtio/Kconfig           |   6 +
 include/linux/kconfig.h          |  91 +++-------
 scripts/Kbuild.include           |  17 +-
 scripts/Makefile.build           |  10 +-
 scripts/Makefile.spl             |  33 +++-
 scripts/kconfig/conf.c           |   4 +
 scripts/kconfig/confdata.c       | 286 ++++++++++++++++++++++++++++---
 scripts/kconfig/expr.h           |   9 +
 scripts/kconfig/lkc.h            |   9 +
 test/Kconfig                     |   5 +
 20 files changed, 408 insertions(+), 111 deletions(-)

-- 
2.33.0.309.g3052b89438-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-09-17 16:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 16:17 [PATCH 00/17] RFC: Split configs between U-Boot proper and SPL builds Simon Glass
2021-09-17 16:17 ` [PATCH 01/17] env: Avoid checking ENV_IS_IN when env disabled Simon Glass
2021-09-17 16:17 ` [PATCH 02/17] x86: Fix qemu condition for arch_cpu_init() Simon Glass
2021-09-17 16:17 ` [PATCH 03/17] acpi: Add a Kconfig for SPL Simon Glass
2021-09-17 16:17 ` [PATCH 04/17] cmd: Add an SPL Kconfig for CMDLINE and HUSH Simon Glass
2021-09-17 16:17 ` [PATCH 05/17] cros_ec: Add SPL Kconfigs for cros_ec features Simon Glass
2021-09-17 16:17 ` [PATCH 06/17] power: Add SPL Kconfig for sandbox pmc emulator Simon Glass
2021-09-17 16:17 ` [PATCH 07/17] test: Add SPL Kconfig for compression tests Simon Glass
2021-09-17 16:17 ` [PATCH 08/17] sandbox: Enable MISC support for the SPL build Simon Glass
2021-09-17 16:17 ` [PATCH 09/17] serial: Tidy up the Makefile condition for DM_SERIAL Simon Glass
2021-09-17 16:17 ` [PATCH 10/17] virtio: Add SPL Kconfig for virtio Simon Glass
2021-09-17 16:17 ` [PATCH 11/17] kconfig: Refactor code into separate writer functions Simon Glass
2021-09-17 16:17 ` [PATCH 12/17] kconfig: Support writing separate SPL files Simon Glass
2021-09-17 16:17 ` [PATCH 13/17] Makefile: Include the config for the phase being built Simon Glass
2021-09-17 16:17 ` [PATCH 14/17] Makefile: Use empty SPL_ and SPL_TPL_ vars Simon Glass
2021-09-17 16:17 ` [PATCH 15/17] Makefile: Support ad-hoc COMFIX_SPL_IMAGE_SIZE et al Simon Glass
2021-09-17 16:17 ` [PATCH 16/17] kconfig: Update CONFIG_IS_ENABLED() for split files Simon Glass
2021-09-17 16:17 ` [PATCH 17/17] kconfig: Add a new CONFIG() macro Simon Glass

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.