All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer via buildroot <buildroot@buildroot.org>
To: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
Cc: Arnout Vandecappelle <arnout@rnout.be>,
	Julien Olivain <ju.o@free.fr>,
	Thomas Perale <thomas.perale@mind.be>
Subject: Re: [Buildroot] [RFC] Makefile: do defconfig with /dev/null instead of .defconfig
Date: Sun, 25 Oct 2026 10:13:47 +0100	[thread overview]
Message-ID: <20261025101347.34f787e4@pc-1> (raw)
In-Reply-To: <20261024170830.543982-1-arnout@rnout.be>

Hello Arnout,

On Sat, 24 Oct 2026 19:08:30 +0200, Arnout Vandecappelle via buildroot <buildroot@buildroot.org> wrote:

> For `make defconfig`, we use a .defconfig file. This is inherited from
> the kernel, which has a different defconfig for each architecture. The
> kernel defconfig passes ARCH on the command line rather than in Kconfig,
> and defaults are very different for different architectures. In
> Buildroot, we don't have that, instead we have a .defconfig file which
> only has the default architecture. And it's not actually a defconfig,
> it's a very old full .config where only the first part is kept.
> 
> Since we have architecture-independent defaults, and any architecture
> specific things are expressed with "depend on" and an occasional
> "default ... if ...", we don't need this infrastructure at all. We can
> simply make .defconfig an empty file - the BR2_arch choice has a default
> and that's all we need. And we don't even need an empty file, we have
> /dev/null to do that job.
> 
> Use /dev/null for the "defconfig" target if no DEFCONFIG is given.
> Remove the now unnecessary .defconfig.
> 
> Note that this also makes one hunk of
> support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch redundant.
> Let's not do the effort of removing it now, we can remove it if it
> causes issues when updating the kconfig infrastructure.
> 
> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
> ---
>  .defconfig | 50 --------------------------------------------------
>  Makefile   |  2 +-
>  2 files changed, 1 insertion(+), 51 deletions(-)
>  delete mode 100644 .defconfig
> 
> diff --git a/.defconfig b/.defconfig
> deleted file mode 100644
> index d25c62e104..0000000000
> --- a/.defconfig
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -#
> -# Automatically generated make config: don't edit
> -# Mon Feb 18 09:11:56 2008
> -#
> -BR2_HAVE_DOT_CONFIG=y
> -# BR2_alpha is not set
> -# BR2_arm is not set
> -# BR2_armeb is not set
> -# BR2_cris is not set
> -# BR2_ia64 is not set
> -BR2_i386=y
> -# BR2_m68k is not set
> -# BR2_mips is not set
> -# BR2_mipsel is not set
> -# BR2_powerpc is not set
> -# BR2_sh is not set
> -# BR2_sparc is not set
> -# BR2_sparc64 is not set
> -# BR2_x86_64 is not set
> -# BR2_x86_i486 is not set
> -# BR2_x86_i586 is not set
> -BR2_x86_i686=y
> -# BR2_x86_pentiumpro is not set
> -# BR2_x86_pentium_mmx is not set
> -# BR2_x86_pentium_m is not set
> -# BR2_x86_pentium2 is not set
> -# BR2_x86_pentium3 is not set
> -# BR2_x86_pentium4 is not set
> -# BR2_x86_prescott is not set
> -# BR2_x86_nocona is not set
> -# BR2_x86_core2 is not set
> -# BR2_x86_k6 is not set
> -# BR2_x86_k6_2 is not set
> -# BR2_x86_athlon is not set
> -# BR2_x86_athlon_4 is not set
> -# BR2_x86_opteron is not set
> -# BR2_x86_opteron_sse3 is not set
> -# BR2_x86_barcelona is not set
> -# BR2_x86_geode is not set
> -# BR2_x86_c3 is not set
> -# BR2_x86_winchip_c6 is not set
> -# BR2_x86_winchip2 is not set
> -BR2_ARCH="i686"
> -BR2_ENDIAN="LITTLE"
> -BR2_GCC_TARGET_TUNE="i686"
> -BR2_GCC_TARGET_ARCH="i686"
> -
> -#
> -# Target options
> -#
> diff --git a/Makefile b/Makefile
> index 9b62da3e40..aa3826b5b4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1037,7 +1037,7 @@ oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmake
>  	@$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN)
>  
>  defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
> -	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
> +	@$(COMMON_CONFIG_ENV) $< --defconfig=$(or $(DEFCONFIG),/dev/null) $(CONFIG_CONFIG_IN)
>  
>  %_defconfig: $(BUILD_DIR)/buildroot-config/conf  outputmakefile
>  	@defconfig=$(or \

The Makefile part looks very familiar:

	Makefile: always use a base config file for defconfig

	https://lore.kernel.org/buildroot/ZjyqwNLypWWS21v5@landeda/

Regards,
Peter
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-10-25  9:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 20:26 [Buildroot] [PATCH 1/4] Revert "Config.in, Makefile: add BR2_HIDE_SECONDARY_TARGET_OPTIONS" Julien Olivain via buildroot
2026-10-20 20:26 ` [Buildroot] [PATCH 2/4] Revert "arch: mark a set of target configurations as secondary" Julien Olivain via buildroot
2026-10-20 20:26 ` [Buildroot] [PATCH 3/4] utils/genrandconfig: implement secondary configurations filter Julien Olivain via buildroot
2026-10-20 20:26 ` [Buildroot] [PATCH 4/4] arch/Config.in: change default target architecture to AArch64 Julien Olivain via buildroot
2026-10-21 19:37   ` Fiona Klute via buildroot
2026-10-22  9:36   ` Arnout Vandecappelle via buildroot
2026-10-22  9:43     ` Baruch Siach via buildroot
2026-10-23 11:23       ` Julien Olivain via buildroot
2026-10-24 17:08         ` [Buildroot] [RFC] Makefile: do defconfig with /dev/null instead of .defconfig Arnout Vandecappelle via buildroot
2026-10-24 21:27           ` Thomas Petazzoni via buildroot
2026-10-25  9:13           ` Peter Seiderer via buildroot [this message]
2026-10-24 17:18       ` [Buildroot] [PATCH 4/4] arch/Config.in: change default target architecture to AArch64 Arnout Vandecappelle via buildroot
2026-10-25 20:57   ` Thomas Petazzoni via buildroot
2026-10-21 19:23 ` [Buildroot] [PATCH 1/4] Revert "Config.in, Makefile: add BR2_HIDE_SECONDARY_TARGET_OPTIONS" Thomas Petazzoni via buildroot

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=20261025101347.34f787e4@pc-1 \
    --to=buildroot@buildroot.org \
    --cc=arnout@rnout.be \
    --cc=ju.o@free.fr \
    --cc=ps.report@gmx.net \
    --cc=thomas.perale@mind.be \
    /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.