Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] config: make it possible to specify which config file to use for 'make defconfig'
@ 2012-03-11 11:14 Arnout Vandecappelle
  2012-03-12 22:04 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Arnout Vandecappelle @ 2012-03-11 11:14 UTC (permalink / raw)
  To: buildroot

So that this works:

 % make defconfig BR2_DEFCONFIG=~/buildroot-defconfig

Right now we have to do:

 % cp ~/buildroot-defconfig configs/buildroot_defconfig
 % make buildroot_defconfig

That would dirty the buildroot tree and requires it to be writable.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v2:
* Use $(if...) instead of $(patsubst...)
* Add help text
* Fix commit message

 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index d508888..4637d7e 100644
--- a/Makefile
+++ b/Makefile
@@ -602,7 +602,7 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(BR2_DEFCONFIG),=$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
@@ -663,6 +663,7 @@ help:
 	@echo '  oldconfig              - resolve any unresolved symbols in .config'
 	@echo '  randconfig             - New config with random answer to all options'
 	@echo '  defconfig              - New config with default answer to all options'
+	@echo '                             BR2_DEFCONFIG, if set, is used as input'
 	@echo '  savedefconfig          - Save current config as ./defconfig (minimal config)'
 	@echo '  allyesconfig           - New config where all options are accepted with yes'
 	@echo '  allnoconfig            - New config where all options are answered with no'
-- 
tg: (dca6e03..) t/defconfig (depends on: master)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] config: make it possible to specify which config file to use for 'make defconfig'
  2012-03-11 11:14 [Buildroot] [PATCH v2] config: make it possible to specify which config file to use for 'make defconfig' Arnout Vandecappelle
@ 2012-03-12 22:04 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2012-03-12 22:04 UTC (permalink / raw)
  To: buildroot

Le Sun, 11 Mar 2012 12:14:42 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a ?crit :

> So that this works:
> 
>  % make defconfig BR2_DEFCONFIG=~/buildroot-defconfig
> 
> Right now we have to do:
> 
>  % cp ~/buildroot-defconfig configs/buildroot_defconfig
>  % make buildroot_defconfig
> 
> That would dirty the buildroot tree and requires it to be writable.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-12 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-11 11:14 [Buildroot] [PATCH v2] config: make it possible to specify which config file to use for 'make defconfig' Arnout Vandecappelle
2012-03-12 22:04 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox