* [Buildroot] BR2_DEFCONFIG not being saved by "make savedefconfig"
@ 2024-09-13 14:06 Grant Edwards
2024-09-14 7:48 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Grant Edwards @ 2024-09-13 14:06 UTC (permalink / raw)
To: buildroot
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?
According to the manual "make savedefconfig" is only supposed to
remove config options that are at their default values. BR2_DEFCONFIG
is non-default, yet it is not being saved. What am I doing wrong?
Thanks,
Grant
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] BR2_DEFCONFIG not being saved by "make savedefconfig"
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
2024-09-14 21:44 ` Grant Edwards
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-14 7:48 UTC (permalink / raw)
To: Grant Edwards; +Cc: buildroot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] BR2_DEFCONFIG not being saved by "make savedefconfig"
2024-09-14 7:48 ` Thomas Petazzoni via buildroot
@ 2024-09-14 21:44 ` Grant Edwards
0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2024-09-14 21:44 UTC (permalink / raw)
To: buildroot; +Cc: buildroot
On 2024-09-14, Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> On Fri, 13 Sep 2024 14:06:32 -0000 (UTC)
> Grant Edwards <grant.b.edwards@gmail.com> wrote:
>> [...]
>> 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:
> [...]
> 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
>
> Not sure I fully grasp the reasoning from back then.
I certainly don't. I can work around it by running the buildroot
"make" from a parent make where I export the value of BR2_DEFCONFIG.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-14 21:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-09-14 21:44 ` Grant Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox