We currently use scripts/kconfig/merge_config.sh only in MAKEALL. Linux has been using it inside Kbuild as well to derive new defconfigs from the existing ones that differ only by a few options, e.g. to enable virtualization or to switch endianness.
This is useful for us in barebox as well to cut down on the number of configs and to avoid bitrot in the less used ones, e.g. a lot of AT91 configs can probably be replaced with two lines in mach-at91/Makefile each this way and e.g. x86 defconfig could have a virtio.defconfig for use with Qemu. This series adds the infrastructure for this and some example defconfig targets that are derived from existing defconfigs: - ARCH=mips qemu-malta_defconfig -> qemu-malta(64)?(el)_defconfig - ARCH=sandbox sandbox_defconfig -> (headless|noshell|lockdown)_defconfig Configs added with the new mechanism are automatically discoverable by CI and so this should increase build coverage with minimal development overhead. Ahmad Fatoum (8): test: move common config fragments into common/boards/configs kconfig: merge_config.sh: sync with Linux v6.9 kbuild: add support for merged defconfigs MIPS: make use of merged defconfigs sandbox: stdio: fix ctrlc link error when CONFIG_CONSOLE_NONE=y net: fix build with CONFIG_SHELL_NONE power: reset: reboot-mode: fix link error without globalvar sandbox: add headless_defconfig .github/workflows/build-defconfigs.yml | 8 +- .github/workflows/test-labgrid-pytest.yml | 6 +- Documentation/boards/mips/qemu-malta.rst | 11 +++ Makefile | 6 +- arch/mips/Makefile | 8 ++ arch/mips/configs/le.config | 1 + arch/mips/configs/mips64.config | 2 + arch/mips/configs/qemu-malta64el_defconfig | 97 ------------------- arch/sandbox/Makefile | 8 ++ .../boards/configs/base.config | 0 .../boards/configs/disable_size_check.config | 0 .../configs/disable_target_tools.config | 0 .../boards/configs/enable_self_test.config | 0 .../boards/configs/enable_werror.config | 0 .../boards/configs/full.config | 0 common/boards/configs/headless.config | 3 + common/boards/configs/noshell.config | 2 + .../boards/configs/virtio-pci.config | 0 drivers/power/reset/reboot-mode.c | 5 +- include/command.h | 8 ++ include/stdio.h | 2 - net/Kconfig | 1 - scripts/Makefile.defconf | 37 +++++++ scripts/container.sh | 2 +- scripts/kconfig/merge_config.sh | 40 ++++++-- scripts/list-defconfigs.sh | 20 ++-- test/emulate.pl | 10 +- test/x86/virtio@efi_defconfig.yaml | 2 +- 28 files changed, 145 insertions(+), 134 deletions(-) create mode 100644 arch/mips/configs/le.config create mode 100644 arch/mips/configs/mips64.config delete mode 100644 arch/mips/configs/qemu-malta64el_defconfig rename test/kconfig/base.cfg => common/boards/configs/base.config (100%) rename test/kconfig/disable_size_check.kconf => common/boards/configs/disable_size_check.config (100%) rename test/kconfig/disable_target_tools.kconf => common/boards/configs/disable_target_tools.config (100%) rename test/kconfig/enable_self_test.kconf => common/boards/configs/enable_self_test.config (100%) rename test/kconfig/enable_werror.kconf => common/boards/configs/enable_werror.config (100%) rename test/kconfig/full.cfg => common/boards/configs/full.config (100%) create mode 100644 common/boards/configs/headless.config create mode 100644 common/boards/configs/noshell.config rename test/kconfig/virtio-pci.cfg => common/boards/configs/virtio-pci.config (100%) create mode 100644 scripts/Makefile.defconf -- 2.39.2