savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
PATCH 1/1 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 mentionned in config.in (default is BR2_DEFCONFIG from environnement).
On savedefconfig recipe, simply remove BR2_DEFCONFIG from generated file
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -777,6 +777,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< \ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ $(CONFIG_CONFIG_IN) + @sed -i '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) .PHONY: defconfig savedefconfig
Signature · 1 line
1.7.9.5
PATCH 1/1 savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
Quoted 8 lines · Herve Codina
BR2_DEFCONFIGshould not be present in saved defconfig file.The use case is:
makeqemu_arm_versatile
make savedefconfig BR2_DEFCONFIG=my_custom_defconfig
BR2_DEFCONFIGis set inmy_custom_defconfigwith an absolute path toqemu_arm_versatile(value present in .config) and set in
Although that behaviour is clearly wrong, I thought long and hard about what
the appropriate behaviour would be. And indeed, even if you _don't_ change the value of BR2_DEFCONFIG, it should not be saved into the defconfig file itself.
I also thought Yann had a similar patch pending but couldn't find anything.
So yes, this gets my
except for some small nits below.
Quoted 1 line
my_custom_defconfigas it is different from default mentionned in
mentioned
Quoted 1 line
config.in (default is
BR2_DEFCONFIGfrom environnement).
environment
Quoted 13 lines
On savedefconfig recipe, simply remove
BR2_DEFCONFIGfrom generated fileSigned-off-by Herve Codina <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0
Makefile savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile · line 780
Quoted 4 lines
Makefile +1
-0@@ -777,6 +777,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @$(COMMON_CONFIG_ENV) $< \ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ $(CONFIG_CONFIG_IN) + @sed -i '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
sed -i -> $(SED)
Now I see this, I wonder whether the condition is really needed. savedefconfig
only makes sense if there already is a .config, and if there is a .config, it will have BR2_DEFCONFIG defined. But that's for a separate patch.
Regards,
Arnout
Quoted 4 lines
Makefile +0
-0.PHONY: defconfig savedefconfig
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 savedefconfig: Remove BR2_DEFCONFIG from saved defconfig file
In reply to Herve CodinaQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Herve" == Herve Codina <[email protected]> writes:
BR2_DEFCONFIGshould not be present in saved defconfig file. The use case is:
makeqemu_arm_versatile
make savedefconfig BR2_DEFCONFIG=my_custom_defconfig
Quoted 8 lines
BR2_DEFCONFIGis set inmy_custom_defconfigwith an absolute path toqemu_arm_versatile(value present in .config) and set inmy_custom_defconfigas it is different from default mentionned in config.in (default isBR2_DEFCONFIGfrom environnement).On savedefconfig recipe, simply remove
BR2_DEFCONFIGfrom generated fileSigned-off-by Herve Codina <[email protected]>
Committed with the issues pointed out by Arnout fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard