Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Grant Edwards <grant.b.edwards@gmail.com>
Cc: buildroot@uclibc.org
Subject: Re: [Buildroot] BR2_DEFCONFIG not being saved by "make savedefconfig"
Date: Sat, 14 Sep 2024 09:48:02 +0200	[thread overview]
Message-ID: <20240914094802.6ee528ae@windsurf> (raw)
In-Reply-To: <vc1gt7$8pe$1@ciao.gmane.io>

Hello,

On Fri, 13 Sep 2024 14:06:32 -0000 (UTC)
Grant Edwards <grant.b.edwards@gmail.com> wrote:

> NB: I'm currently using 2020.02.7 as provided by a silicon
>     vendor. Once I get that all set up and working as desired, I do
>     plan on upgrading.
> 
> In my external default config file, I have BR2_DEFCONFIG set to point
> to the location in my external buildroot tree where the default
> configuration file is located. When I do "make savedefconfig", the
> current working configuration is saved to that location has expected.
> 
> However, the BR2_DEFCONFIG setting has vanished from that saved
> configuration.
> 
> Is that expected behavior?

It is, see the main Makefile:

savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
	@$(COMMON_CONFIG_ENV) $< \
		--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
		$(CONFIG_CONFIG_IN)
	@$(SED) '/^BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)

it explicitly removes BR2_DEFCONFIG.

The reasoning is:

commit f71a621d91ec27f175fc84012962f88b1107305f
Author: Herve Codina <Herve.CODINA@celad.com>
Date:   Thu Jun 4 10:16:33 2015 +0200

    savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
    
    BR2_DEFCONFIG should not be present in saved defconfig file.
    
    The use case is:
    make qemu_arm_versatile
    make savedefconfig BR2_DEFCONFIG=my_custom_defconfig
    
    BR2_DEFCONFIG is set in my_custom_defconfig with an absolute path
    to qemu_arm_versatile (value present in .config) and set in
    my_custom_defconfig as it is different from default mentioned in
    config.in (default is BR2_DEFCONFIG from environment).
    
    On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file
    
    [Peter: fixup typos and use SED as noted by Arnout]
    Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
    Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
    Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Not sure I fully grasp the reasoning from back then.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-09-14  7:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 14:06 [Buildroot] BR2_DEFCONFIG not being saved by "make savedefconfig" Grant Edwards
2024-09-14  7:48 ` Thomas Petazzoni via buildroot [this message]
2024-09-14 21:44   ` Grant Edwards

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=20240914094802.6ee528ae@windsurf \
    --to=buildroot@buildroot.org \
    --cc=buildroot@uclibc.org \
    --cc=grant.b.edwards@gmail.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox