Patchwork [2/2] support/kconfig: add support for olddefconfig

login
register
mail settings
Submitter Thomas Petazzoni
Date April 4, 2013, 9:24 p.m.
Message ID <1365110666-3080-3-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/233948/
State Accepted
Commit 9db3b47ea1b37b1ac52561f94ca39fa9cf4ae74c
Headers show

Comments

Thomas Petazzoni - April 4, 2013, 9:24 p.m.
olddefconfig is a new target available in kconfig that allows to take
an old .config file, and update it to the latest version of the code,
without being asked for questions: it automatically assumes the
default value for options whose value was not defined.

It for example allows to take a minimal defconfig, copy it as .config,
and do 'make olddefconfig' to get the full .config.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Gustavo Zacarias - April 4, 2013, 10:01 p.m.
On 04/04/2013 06:24 PM, Thomas Petazzoni wrote:

> olddefconfig is a new target available in kconfig that allows to take
> an old .config file, and update it to the latest version of the code,
> without being asked for questions: it automatically assumes the
> default value for options whose value was not defined.
> 
> It for example allows to take a minimal defconfig, copy it as .config,
> and do 'make olddefconfig' to get the full .config.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Peter Korsgaard - April 11, 2013, 8:10 a.m.
On Thu, Apr 4, 2013 at 11:24 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> olddefconfig is a new target available in kconfig that allows to take
> an old .config file, and update it to the latest version of the code,
> without being asked for questions: it automatically assumes the
> default value for options whose value was not defined.
>
> It for example allows to take a minimal defconfig, copy it as .config,
> and do 'make olddefconfig' to get the full .config.

Committed, thanks.

--
Bye, Peter Korsgaard

Patch

diff --git a/Makefile b/Makefile
index c95bb1e..0a91658 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@  export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setloca
 noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	%_defconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
-	source-check print-version
+	source-check print-version olddefconfig
 
 # Strip quotes and then whitespaces
 qstrip=$(strip $(subst ",,$(1)))
@@ -693,6 +693,10 @@  silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	$(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
 
+olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
+
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
@@ -758,6 +762,8 @@  help:
 	@echo '  xconfig                - interactive Qt-based configurator'
 	@echo '  gconfig                - interactive GTK-based configurator'
 	@echo '  oldconfig              - resolve any unresolved symbols in .config'
+	@echo '  silentoldconfig        - Same as oldconfig, but quietly, additionally update deps'
+	@echo '  olddefconfig           - Same as silentoldconfig but sets new symbols to their default value'
 	@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'