Skip to contentSkip to conversation

BR2_DEFCONFIG not being saved by "make savedefconfig"

Buildroot Grant Edwards 2 participants 3 messages Sep 13, 2024 – Sep 14, 2024

lore
Share & tools
lore
#0 lore raw

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Acked-by Arnout Vandecappelle (Essensium/Mind)
#1 lore raw

Hello,

Quoted 9 lines · On Fri, 13 Sep 2024 14:06:32 -0000 (UTC) Grant Edwards…

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.

Quoted 4 lines

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 <[email protected]>
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]

Not sure I fully grasp the reasoning from back then.

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 31 lines · Thomas Petazzoni via buildroot
Quoted 10 lines · On Fri, 13 Sep 2024 14:06:32 -0000 (UTC) Grant Edwards…

[...]
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 <[email protected]>
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

Quoted 8 lines

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot