Skip to contentSkip to conversation

Pull request for branch for-2010.11/kconfig-upgrade

GIT PULL New Thomas Petazzoni 2 participants 13 messages Sep 1, 2010 – Sep 5, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 4973632207fd496199298191ada01c8c8ec2bee7:
Yann E. MORIN (1):
packages/atk: fix Makefile

are available in the git repository at:

git://git.busybox.net/~tpetazzoni/git/buildroot for-2010.11/kconfig-upgrade

Thomas Petazzoni (11):
Remove CONFIG_DEFCONFIG
Implement %_defconfig similarly to the kernel
Clean up our patches against kconfig
Bump package/config to 2.6.36-rc1
Add support for the new nconf configuration tool
Remove unnecessary ugly hacks in package/config
Makefile: use long options names for the 'conf' utility Factorize environment variables for config utilities Add support for savedefconfig
Ensure that all config-related files are generated before the build Tell git to ignore the Quilt internal directory in package/config

 Makefile                                           |  104 +-
 package/config/.gitignore                          |   37 +-
 package/config/Makefile                            |  418 +++++-
 package/config/Makefile.br                         |   53 +
 package/config/Makefile.kconfig                    |  303 ----
 package/config/README.buildroot2                   |   14 +-
 package/config/conf.c                              |  226 ++--
 package/config/confdata.c                          |  349 +++--
 package/config/expr.c                              |   33 +-
 package/config/expr.h                              |    8 +-
 package/config/gconf.c                             |  137 +--
 package/config/gconf.glade                         |   30 +-
 package/config/kconfig-language.txt                |  379 -----
 package/config/kconfig-to-buildroot2.patch         |  917 ------------
 package/config/kxgettext.c                         |    4 +-
 package/config/lex.zconf.c_shipped                 |   25 +-
 package/config/lkc.h                               |   19 +-
 package/config/lkc_proto.h                         |    7 +-
 package/config/lxdialog/.gitignore                 |    4 +
 package/config/lxdialog/checklist.c                |   10 +-
 package/config/lxdialog/inputbox.c                 |    4 +-
 package/config/lxdialog/menubox.c                  |   22 +-
 package/config/lxdialog/util.c                     |    2 +
 package/config/mconf.c                             |  120 +--
 package/config/menu.c                              |  137 ++-
 package/config/nconf.c                             | 1570 ++++++++++++++++++++
 package/config/nconf.gui.c                         |  617 ++++++++
 package/config/nconf.h                             |   95 ++
 .../patches/01-kconfig-kernel-to-buildroot.patch   |  298 ++++
 .../patches/02-cpp-comments-to-c-comments.patch    |  178 +++
 .../patches/03-change-config-option-prefix.patch   |  164 ++
 .../patches/05-really-clean-everything.patch       |   29 +
 .../patches/06-br-build-system-integration.patch   |   40 +
 package/config/patches/08-make-write-deps.patch    |  139 ++
 .../patches/09-implement-kconfig-probability.patch |   44 +
 package/config/patches/10-br-build-system.patch    |   80 +
 .../patches/11-use-mktemp-for-lxdialog.patch       |   17 +
 .../config/patches/12-fix-glade-file-path.patch    |   17 +
 .../patches/14-support-out-of-tree-config.patch    |  209 +++
 package/config/patches/series                      |   11 +
 package/config/qconf.cc                            |  121 +-
 package/config/qconf.h                             |   17 +-
 package/config/streamline_config.pl                |  422 ++++++
 package/config/symbol.c                            |  328 ++++-
 package/config/util.c                              |    4 +-
 package/config/zconf.gperf                         |    2 +
 package/config/zconf.hash.c_shipped                |    2 +
 package/config/zconf.l                             |    6 +-
 package/config/zconf.tab.c_shipped                 |  404 +++---
 package/config/zconf.y                             |   38 +-
 50 files changed, 5712 insertions(+), 2502 deletions(-)
 create mode 100644 package/config/Makefile.br
 delete mode 100644 package/config/Makefile.kconfig
 delete mode 100644 package/config/kconfig-language.txt
 delete mode 100644 package/config/kconfig-to-buildroot2.patch
 create mode 100644 package/config/lxdialog/.gitignore
 create mode 100644 package/config/nconf.c
 create mode 100644 package/config/nconf.gui.c
 create mode 100644 package/config/nconf.h
 create mode 100644 package/config/patches/01-kconfig-kernel-to-buildroot.patch
 create mode 100644 package/config/patches/02-cpp-comments-to-c-comments.patch
 create mode 100644 package/config/patches/03-change-config-option-prefix.patch
 create mode 100644 package/config/patches/05-really-clean-everything.patch
 create mode 100644 package/config/patches/06-br-build-system-integration.patch
 create mode 100644 package/config/patches/08-make-write-deps.patch
 create mode 100644 package/config/patches/09-implement-kconfig-probability.patch
 create mode 100644 package/config/patches/10-br-build-system.patch
 create mode 100644 package/config/patches/11-use-mktemp-for-lxdialog.patch
 create mode 100644 package/config/patches/12-fix-glade-file-path.patch
 create mode 100644 package/config/patches/14-support-out-of-tree-config.patch
 create mode 100644 package/config/patches/series
 create mode 100644 package/config/streamline_config.pl

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/11 Remove CONFIG_DEFCONFIG

There's no need to have a .defconfig, when you run make menuconfig, make xconfig or anything else for the first time, it will just start with the default configuration anyway. This is what the kernel does.

---
 Makefile |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
Makefile +0 -5
index d37d81f..e3cebe2 100644
@@ -25,7 +25,6 @@
 # absolute path
 TOPDIR:=$(shell pwd)
 CONFIG_CONFIG_IN=Config.in
-CONFIG_DEFCONFIG=.defconfig
 CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
@@ -465,9 +464,6 @@ export HOSTCFLAGS
 $(BUILD_DIR)/buildroot-config/%onf:
 	mkdir -p $(@D)/lxdialog
 	$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) $(@F)
-	- at if [ ! -f $(CONFIG_DIR)/.config ]; then \
-		cp $(CONFIG_DEFCONFIG) $(CONFIG_DIR)/.config; \
-	fi
 
 xconfig: $(BUILD_DIR)/buildroot-config/qconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
@@ -513,7 +509,6 @@ randconfig: $(BUILD_DIR)/buildroot-config/conf
 		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -r $(CONFIG_CONFIG_IN)
 
 allyesconfig: $(BUILD_DIR)/buildroot-config/conf
-	cat $(CONFIG_DEFCONFIG) > $(CONFIG_DIR)/.config
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/11 Implement %_defconfig similarly to the kernel

In reply to Thomas Petazzoni
---
 Makefile |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
Makefile +7 -5
index e3cebe2..2b5780d 100644
@@ -29,7 +29,7 @@ CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
 noconfig_targets:=menuconfig gconfig xconfig config oldconfig randconfig \
-	defconfig allyesconfig allnoconfig release \
+	defconfig %_defconfig allyesconfig allnoconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check help
 
@@ -553,6 +553,12 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
 		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -d $(CONFIG_CONFIG_IN)
 
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
+		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -D $(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+
 # check if download URLs are outdated
 source-check: allyesconfig
 	$(MAKE) $(EXTRAMAKEARGS) _source-check
@@ -580,10 +586,6 @@ endif
 flush:
 	rm -f $(BUILD_DIR)/tgt-config.cache $(BUILD_DIR)/host-config.cache
 
-%_defconfig: $(TOPDIR)/configs/%_defconfig
-	cp $^ $(CONFIG_DIR)/.config
-	@$(MAKE) $(EXTRAMAKEARGS) oldconfig
-
 configured: dirs host-sed kernel-headers uclibc-config busybox-config linux26-config
 
 prepatch:	gcc-patched binutils-patched gdb-patched uclibc-patched
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/11 Clean up our patches against kconfig

In reply to Thomas Petazzoni

Our kconfig-to-buildroot2.patch hasn't been kept up to date with all the changes made into package/config, and a single patch wasn't very practical to maintain all our changes. Therefore, this commit adds a package/config/patches directory, which contains a Quilt series of patches that correspond to our modifications to the kconfig mechanism.

The huge kconfig-to-buildroot2.patch has been split into 16 smaller patches. The purpose of some of the modifications has been clearly identified, while some others were not identified.

The 16 patches together do match exactly the old kconfig-to-buildroot2.patch. We have been very careful in making sure that we wouldn't loose any of our modifications.

The only modifications made are :

* Instead of renaming the kernel Makefile to Makefile.kconfig and naming the Buildroot Makefile just 'Makefile', we instead keep the original package/config/Makefile from the kernel scripts/kconfig/Makefile and name the Buildroot Makefile package/config/Makefile.br. The main Buildroot Makefile is modified accordingly.

* The documentation README.buildroot2 is updated to explain how to upgrade to a newer version of scripts/kconfig.

* The kconfig-language.txt documentation is removed, as anybody can easily find it in the kernel sources so there's no need to duplicate it here.

---
 Makefile                                           |    2 +-
 package/config/Makefile                            |  356 +++++++--
 package/config/Makefile.br                         |   53 ++
 package/config/Makefile.kconfig                    |  303 -------
 package/config/README.buildroot2                   |   14 +-
 package/config/kconfig-language.txt                |  379 --------
 package/config/kconfig-to-buildroot2.patch         |  917 --------------------
 .../patches/01-kconfig-kernel-to-buildroot.patch   |  299 +++++++
 .../patches/02-cpp-comments-to-c-comments.patch    |  178 ++++
 .../patches/03-change-config-option-prefix.patch   |  176 ++++
 .../config/patches/04-fedora-13-build-fix.patch    |   17 +
 .../patches/05-really-clean-everything.patch       |   28 +
 .../patches/06-br-build-system-integration.patch   |   33 +
 .../config/patches/07-minor-makefile-fixes.patch   |   26 +
 package/config/patches/08-make-write-deps.patch    |  139 +++
 .../patches/09-implement-kconfig-probability.patch |   43 +
 package/config/patches/10-br-build-system.patch    |   80 ++
 .../patches/11-use-mktemp-for-lxdialog.patch       |   17 +
 .../config/patches/12-fix-glade-file-path.patch    |   17 +
 .../patches/13-use-conf-write-autoconf.patch       |   53 ++
 .../patches/14-support-out-of-tree-config.patch    |  253 ++++++
 package/config/patches/15-misc-qconf-changes.patch |  175 ++++
 .../config/patches/16-non-identified-changes.patch |   47 +
 package/config/patches/series                      |   16 +
 24 files changed, 1960 insertions(+), 1661 deletions(-)
 create mode 100644 package/config/Makefile.br
 delete mode 100644 package/config/Makefile.kconfig
 delete mode 100644 package/config/kconfig-language.txt
 delete mode 100644 package/config/kconfig-to-buildroot2.patch
 create mode 100644 package/config/patches/01-kconfig-kernel-to-buildroot.patch
 create mode 100644 package/config/patches/02-cpp-comments-to-c-comments.patch
 create mode 100644 package/config/patches/03-change-config-option-prefix.patch
 create mode 100644 package/config/patches/04-fedora-13-build-fix.patch
 create mode 100644 package/config/patches/05-really-clean-everything.patch
 create mode 100644 package/config/patches/06-br-build-system-integration.patch
 create mode 100644 package/config/patches/07-minor-makefile-fixes.patch
 create mode 100644 package/config/patches/08-make-write-deps.patch
 create mode 100644 package/config/patches/09-implement-kconfig-probability.patch
 create mode 100644 package/config/patches/10-br-build-system.patch
 create mode 100644 package/config/patches/11-use-mktemp-for-lxdialog.patch
 create mode 100644 package/config/patches/12-fix-glade-file-path.patch
 create mode 100644 package/config/patches/13-use-conf-write-autoconf.patch
 create mode 100644 package/config/patches/14-support-out-of-tree-config.patch
 create mode 100644 package/config/patches/15-misc-qconf-changes.patch
 create mode 100644 package/config/patches/16-non-identified-changes.patch
 create mode 100644 package/config/patches/series
Makefile +1 -1
index 2b5780d..73d9335 100644
@@ -463,7 +463,7 @@ export HOSTCFLAGS
 
 $(BUILD_DIR)/buildroot-config/%onf:
 	mkdir -p $(@D)/lxdialog
-	$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) $(@F)
+	$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
 
 xconfig: $(BUILD_DIR)/buildroot-config/qconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
package/config/Makefile +303 -53

356 lines not on this page · raw message

package/config/Makefile.br new file +53 -0

53 lines not on this page · raw message

package/config/Makefile.kconfig deleted +0 -303

303 lines not on this page · raw message

package/config/README.buildroot2 +6 -8
index bd44790..22c50fe 100644
@@ -1,16 +1,12 @@
-This is a copy of the kconfig code in the kernel (currently 2.6.24.4) tweaked
+This is a copy of the kconfig code in the kernel (currently 2.6.30) tweaked
 to suit Buildroot.
 
 To update:
 	cp -r /usr/src/linux/scripts/kconfig package/config.new
 	cd package/config.new
-	cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt .
-	patch -p1 < ../config/kconfig-to-buildroot2.patch
-	mv Makefile Makefile.kconfig
-	cp ../config/README.buildroot2 .
-	cp ../config/foo.h .
-	cp ../config/Makefile .
-	cp ../config/kconfig-to-buildroot2.patch .
+	cp -a ../config/patches ../config/README.buildroot2 .
+	quilt push -a
+	# Fix any conflict
 	cd ..
 	rm -rf config
 	mv config.new config
@@ -19,4 +15,6 @@ Then verify the toplevel targets work:
 	config
 	defconfig
 	menuconfig
+	xconfig
+	gconfig
 	oldconfig
package/config/kconfig-language.txt deleted +0 -379

379 lines not on this page · raw message

package/config/kconfig-to-buildroot2.patch deleted +0 -917

917 lines not on this page · raw message

package/config/patches/01-kconfig-kernel-to-buildroot.patch new file +299 -0

299 lines not on this page · raw message

package/config/patches/02-cpp-comments-to-c-comments.patch new file +178 -0

178 lines not on this page · raw message

package/config/patches/03-change-config-option-prefix.patch new file +176 -0

176 lines not on this page · raw message

package/config/patches/04-fedora-13-build-fix.patch new file +17 -0
new file mode 100644
index 0000000..4fa72df
@@ -0,0 +1,17 @@
+---
+ Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: config.clean/Makefile
+===================================================================
+--- config.clean.orig/Makefile
++++ config.clean/Makefile
+@@ -165,7 +165,7 @@
+ HOSTLOADLIBES_qconf	= $(KC_QT_LIBS) -ldl
+ HOSTCXXFLAGS_qconf.o	= $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
+ 
+-HOSTLOADLIBES_gconf	= `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
++HOSTLOADLIBES_gconf	= `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
+ HOSTCFLAGS_gconf.o	= `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
+                           -D LKC_DIRECT_LINK
+ 
package/config/patches/05-really-clean-everything.patch new file +28 -0
new file mode 100644
index 0000000..c206f55
@@ -0,0 +1,28 @@
+---
+ Makefile |   13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+Index: config.clean/Makefile
+===================================================================
+--- config.clean.orig/Makefile
++++ config.clean/Makefile
+@@ -142,10 +142,15 @@
+ gconf-objs	:= gconf.o kconfig_load.o zconf.tab.o
+ endif
+ 
+-clean-files	:= lkc_defs.h qconf.moc .tmp_qtcheck \
+-		   .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
+-clean-files     += mconf qconf gconf
+-clean-files     += config.pot linux.pot
++clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
++               .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
++clean-files += config.pot linux.pot
++clean-files += conf $(conf-objs)
++clean-files += mconf $(mconf-objs)
++clean-files += qconf qconf.o
++clean-files += gconf gconf.o
++clean-files += kconfig_load.o zconf.tab.o
++clean-files += $(kxgettext-objs)
+ 
+ # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
+ PHONY += $(obj)/dochecklxdialog
package/config/patches/06-br-build-system-integration.patch new file +33 -0
new file mode 100644
index 0000000..1e340f3
@@ -0,0 +1,33 @@
+---
+ Makefile |   11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+Index: config.clean/Makefile
+===================================================================
+--- config.clean.orig/Makefile
++++ config.clean/Makefile
+@@ -124,14 +124,23 @@
+ ifeq ($(MAKECMDGOALS),menuconfig)
+ 	hostprogs-y += mconf
+ endif
++ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
++       hostprogs-y += mconf
++endif
+ 
+ ifeq ($(MAKECMDGOALS),xconfig)
+ 	qconf-target := 1
+ endif
++ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf)
++	qconf-target := 1
++endif
++
+ ifeq ($(MAKECMDGOALS),gconfig)
+ 	gconf-target := 1
+ endif
+-
++ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf)
++	gconf-target := 1
++endif
+ 
+ ifeq ($(qconf-target),1)
+ qconf-cxxobjs	:= qconf.o
package/config/patches/07-minor-makefile-fixes.patch new file +26 -0
new file mode 100644
index 0000000..f0f68ee
@@ -0,0 +1,26 @@
+---
+ Makefile |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: config.clean/Makefile
+===================================================================
+--- config.clean.orig/Makefile
++++ config.clean/Makefile
+@@ -83,7 +83,7 @@
+ 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
+ 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
+ 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
+-	@echo  '  silentoldconfig - Same as oldconfig, but quietly'
++	@echo  '  silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
+ 	@echo  '  randconfig	  - New config with random answer to all options'
+ 	@echo  '  defconfig	  - New config with default answer to all options'
+ 	@echo  '  allmodconfig	  - New config selecting modules when possible'
+@@ -104,7 +104,7 @@
+ # ===========================================================================
+ # Shared Makefile for the various kconfig executables:
+ # conf:	  Used for defconfig, oldconfig and related targets
+-# mconf:  Used for the mconfig target.
++# mconf:  Used for the menuconfig target
+ #         Utilizes the lxdialog package
+ # qconf:  Used for the xconfig target
+ #         Based on QT which needs to be installed to compile it
package/config/patches/08-make-write-deps.patch new file +139 -0

139 lines not on this page · raw message

package/config/patches/09-implement-kconfig-probability.patch new file +43 -0

43 lines not on this page · raw message

package/config/patches/10-br-build-system.patch new file +80 -0

19 lines not on this page · raw message

package/config/patches/11-use-mktemp-for-lxdialog.patch new file +17 -0
new file mode 100644
index 0000000..16fd8bf

Lines of this file are not shown. View the raw message.

package/config/patches/12-fix-glade-file-path.patch new file +17 -0
new file mode 100644
index 0000000..233809a

Lines of this file are not shown. View the raw message.

package/config/patches/13-use-conf-write-autoconf.patch new file +53 -0

53 lines not on this page · raw message

package/config/patches/14-support-out-of-tree-config.patch new file +253 -0

253 lines not on this page · raw message

package/config/patches/15-misc-qconf-changes.patch new file +175 -0

175 lines not on this page · raw message

package/config/patches/16-non-identified-changes.patch new file +47 -0

47 lines not on this page · raw message

package/config/patches/series new file +16 -0
new file mode 100644
index 0000000..d5ab94c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.0.4

Part of the diff is not shown here. View the raw message.

#4 lore raw

PATCH 4/11 Bump package/config to 2.6.36-rc1

In reply to Thomas Petazzoni

The goal is to be able to use savedefconfig to generate minimal defconfig files.

Four of our patches are removed since the modifications have been merged upstream. The new nconf configuration utility has appeared.

---
 package/config/.gitignore                          |   32 +-
 package/config/Makefile                            |   99 +-
 package/config/README.buildroot2                   |    2 +-
 package/config/conf.c                              |  222 ++--
 package/config/confdata.c                          |  349 +++--
 package/config/expr.c                              |   33 +-
 package/config/expr.h                              |    8 +-
 package/config/gconf.c                             |  137 +--
 package/config/gconf.glade                         |   30 +-
 package/config/kxgettext.c                         |    4 +-
 package/config/lex.zconf.c_shipped                 |   25 +-
 package/config/lkc.h                               |   19 +-
 package/config/lkc_proto.h                         |    7 +-
 package/config/lxdialog/.gitignore                 |    4 +
 package/config/lxdialog/checklist.c                |   10 +-
 package/config/lxdialog/inputbox.c                 |    4 +-
 package/config/lxdialog/menubox.c                  |   22 +-
 package/config/lxdialog/util.c                     |    2 +
 package/config/mconf.c                             |  118 +--
 package/config/menu.c                              |  137 ++-
 package/config/nconf.c                             | 1570 ++++++++++++++++++++
 package/config/nconf.gui.c                         |  617 ++++++++
 package/config/nconf.h                             |   95 ++
 .../patches/01-kconfig-kernel-to-buildroot.patch   |  119 +-
 .../patches/03-change-config-option-prefix.patch   |  118 +-
 .../config/patches/04-fedora-13-build-fix.patch    |   17 -
 .../patches/05-really-clean-everything.patch       |   15 +-
 .../patches/06-br-build-system-integration.patch   |    8 +-
 .../config/patches/07-minor-makefile-fixes.patch   |   26 -
 .../patches/09-implement-kconfig-probability.patch |   25 +-
 .../config/patches/12-fix-glade-file-path.patch    |    8 +-
 .../patches/13-use-conf-write-autoconf.patch       |   26 +-
 .../patches/14-support-out-of-tree-config.patch    |  158 +--
 package/config/patches/15-misc-qconf-changes.patch |  175 ---
 .../config/patches/16-non-identified-changes.patch |   47 -
 package/config/patches/series                      |    4 -
 package/config/qconf.cc                            |  119 +-
 package/config/qconf.h                             |   17 +-
 package/config/streamline_config.pl                |  422 ++++++
 package/config/symbol.c                            |  328 ++++-
 package/config/util.c                              |    4 +-
 package/config/zconf.gperf                         |    2 +
 package/config/zconf.hash.c_shipped                |    2 +
 package/config/zconf.l                             |    6 +-
 package/config/zconf.tab.c_shipped                 |  404 +++---
 package/config/zconf.y                             |   38 +-
 46 files changed, 4298 insertions(+), 1336 deletions(-)
 create mode 100644 package/config/lxdialog/.gitignore
 create mode 100644 package/config/nconf.c
 create mode 100644 package/config/nconf.gui.c
 create mode 100644 package/config/nconf.h
 delete mode 100644 package/config/patches/04-fedora-13-build-fix.patch
 delete mode 100644 package/config/patches/07-minor-makefile-fixes.patch
 delete mode 100644 package/config/patches/15-misc-qconf-changes.patch
 delete mode 100644 package/config/patches/16-non-identified-changes.patch
 create mode 100644 package/config/streamline_config.pl
package/config/.gitignore +23 -9
index 1ea18a2..624f650 100644
@@ -1,9 +1,23 @@
-/conf
-/mconf
-/qconf
-/qconf.moc
-/.tmp_qtcheck
-/lkc_defs.h
-/lex.zconf.c
-/zconf.hash.c
-/zconf.tab.c
+#
+# Generated files
+#
+config*
+lex.*.c
+*.tab.c
+*.tab.h
+zconf.hash.c
+*.moc
+lkc_defs.h
+gconf.glade.h
+*.pot
+*.mo
+
+#
+# configuration programs
+#
+conf
+mconf
+nconf
+qconf
+gconf
+kxgettext
package/config/Makefile +79 -20

172 lines not on this page · raw message

package/config/README.buildroot2 +1 -1
index 22c50fe..8ff0d09 100644
@@ -1,4 +1,4 @@
-This is a copy of the kconfig code in the kernel (currently 2.6.30) tweaked
+This is a copy of the kconfig code in the kernel (currently 2.6.36-rc1) tweaked
 to suit Buildroot.
 
 To update:
package/config/conf.c +131 -91

410 lines not on this page · raw message

package/config/confdata.c +242 -107

475 lines not on this page · raw message

package/config/expr.c +29 -4
index 392c7e9..88aace9 100644
@@ -348,7 +348,7 @@ struct expr *expr_trans_bool(struct expr *e)
 /*
  * e1 || e2 -> ?
  */
-struct expr *expr_join_or(struct expr *e1, struct expr *e2)
+static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
 {
 	struct expr *tmp;
 	struct symbol *sym1, *sym2;
@@ -412,7 +412,7 @@ struct expr *expr_join_or(struct expr *e1, struct expr *e2)
 	return NULL;
 }
 
-struct expr *expr_join_and(struct expr *e1, struct expr *e2)
+static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
 {
 	struct expr *tmp;
 	struct symbol *sym1, *sym2;
@@ -1087,7 +1087,7 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
 
 static void expr_print_file_helper(void *data, struct symbol *sym, const char *str)
 {
-	fwrite(str, strlen(str), 1, data);
+	xfwrite(str, strlen(str), 1, data);
 }
 
 void expr_fprint(struct expr *e, FILE *out)
@@ -1097,7 +1097,32 @@ void expr_fprint(struct expr *e, FILE *out)
 
 static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
 {
-	str_append((struct gstr*)data, str);
+	struct gstr *gs = (struct gstr*)data;
+	const char *sym_str = NULL;
+
+	if (sym)
+		sym_str = sym_get_string_value(sym);
+
+	if (gs->max_width) {
+		unsigned extra_length = strlen(str);
+		const char *last_cr = strrchr(gs->s, '\n');
+		unsigned last_line_length;
+
+		if (sym_str)
+			extra_length += 4 + strlen(sym_str);
+
+		if (!last_cr)
+			last_cr = gs->s;
+
+		last_line_length = strlen(gs->s) - (last_cr - gs->s);
+
+		if ((last_line_length + extra_length) > gs->max_width)
+			str_append(gs, "\\\n");
+	}
+
+	str_append(gs, str);
+	if (sym && sym->type != S_UNKNOWN)
+		str_printf(gs, " [=%s]", sym_str);
 }
 
 void expr_gstr_print(struct expr *e, struct gstr *gs)
package/config/expr.h +5 -3
index 6408fef..6ee2e4f 100644
@@ -83,10 +83,11 @@ struct symbol {
 	tristate visible;
 	int flags;
 	struct property *prop;
+	struct expr_value dir_dep;
 	struct expr_value rev_dep;
 };
 
-#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
+#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
 
 #define SYMBOL_CONST      0x0001  /* symbol is const */
 #define SYMBOL_CHECK      0x0008  /* used during dependency checking */
@@ -108,8 +109,7 @@ struct symbol {
 #define SYMBOL_DEF4       0x80000  /* symbol.def[S_DEF_4] is valid */
 
 #define SYMBOL_MAXLENGTH	256
-#define SYMBOL_HASHSIZE		257
-#define SYMBOL_HASHMASK		0xff
+#define SYMBOL_HASHSIZE		9973
 
 /* A property represent the config options that can be associated
  * with a config "symbol".
@@ -132,6 +132,7 @@ enum prop_type {
 	P_SELECT,   /* select BAR */
 	P_RANGE,    /* range 7..100 (for a symbol) */
 	P_ENV,      /* value from environment variable */
+	P_SYMBOL,   /* where a symbol is defined */
 };
 
 struct property {
@@ -164,6 +165,7 @@ struct menu {
 	struct symbol *sym;
 	struct property *prompt;
 	struct expr *dep;
+	struct expr *dir_dep;
 	unsigned int flags;
 	char *help;
 	struct file *file;
package/config/gconf.c +43 -94

227 lines not on this page · raw message

package/config/gconf.glade +22 -8
index 5656bf7..8e7d99e 100644
@@ -190,26 +190,40 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkCheckMenuItem" id="show_all_options1">
+		    <widget class="GtkRadioMenuItem" id="set_option_mode1">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Show normal options</property>
+		      <property name="label" translatable="yes">Show normal options</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">True</property>
+		      <signal name="activate" handler="on_set_option_mode1_activate"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioMenuItem" id="set_option_mode2">
 		      <property name="visible">True</property>
 		      <property name="tooltip" translatable="yes">Show all options</property>
 		      <property name="label" translatable="yes">Show all _options</property>
 		      <property name="use_underline">True</property>
 		      <property name="active">False</property>
-		      <signal name="activate" handler="on_show_all_options1_activate"/>
+		      <property name="group">set_option_mode1</property>
+		      <signal name="activate" handler="on_set_option_mode2_activate"/>
 		    </widget>
 		  </child>
 
 		  <child>
-		    <widget class="GtkCheckMenuItem" id="show_debug_info1">
+		    <widget class="GtkRadioMenuItem" id="set_option_mode3">
 		      <property name="visible">True</property>
-		      <property name="tooltip" translatable="yes">Show masked options</property>
-		      <property name="label" translatable="yes">Show _debug info</property>
+		      <property name="tooltip" translatable="yes">Show all options with prompts</property>
+		      <property name="label" translatable="yes">Show all prompt options</property>
 		      <property name="use_underline">True</property>
 		      <property name="active">False</property>
-		      <signal name="activate" handler="on_show_debug_info1_activate"/>
+		      <property name="group">set_option_mode1</property>
+		      <signal name="activate" handler="on_set_option_mode3_activate"/>
 		    </widget>
 		  </child>
+
 		</widget>
 	      </child>
 	    </widget>
@@ -547,7 +561,7 @@
 		  <property name="headers_visible">True</property>
 		  <property name="rules_hint">False</property>
 		  <property name="reorderable">False</property>
-		  <property name="enable_search">True</property>
+		  <property name="enable_search">False</property>
 		  <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
 		  <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
 		  <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
@@ -582,7 +596,7 @@
 		      <property name="headers_visible">True</property>
 		      <property name="rules_hint">False</property>
 		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
+		      <property name="enable_search">False</property>
 		      <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
 		      <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
 		      <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
package/config/kxgettext.c +2 -2
index 8d9ce22..dcc3fcc 100644
@@ -166,7 +166,7 @@ static int message__add(const char *msg, char *option, char *file, int lineno)
 	return rc;
 }
 
-void menu_build_message_list(struct menu *menu)
+static void menu_build_message_list(struct menu *menu)
 {
 	struct menu *child;
 
@@ -211,7 +211,7 @@ static void message__print_gettext_msgid_msgstr(struct message *self)
 	       "msgstr \"\"\n", self->msg);
 }
 
-void menu__xgettext(void)
+static void menu__xgettext(void)
 {
 	struct message *m = message__list;
 
package/config/lex.zconf.c_shipped +19 -6
index dc3e818..fdc7113 100644
@@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -802,7 +810,7 @@ static int last_ts, first_ts;
 static void zconf_endhelp(void);
 static void zconf_endfile(void);
 
-void new_string(void)
+static void new_string(void)
 {
 	text = malloc(START_STRSIZE);
 	text_asize = START_STRSIZE;
@@ -810,7 +818,7 @@ void new_string(void)
 	*text = 0;
 }
 
-void append_string(const char *str, int size)
+static void append_string(const char *str, int size)
 {
 	int new_size = text_size + size + 1;
 	if (new_size > text_asize) {
@@ -824,7 +832,7 @@ void append_string(const char *str, int size)
 	text[text_size] = 0;
 }
 
-void alloc_string(const char *str, int size)
+static void alloc_string(const char *str, int size)
 {
 	text = malloc(size + 1);
 	memcpy(text, str, size);
@@ -914,7 +922,12 @@ static int input (void );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -922,7 +935,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
+#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -2060,8 +2073,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
package/config/lkc.h +18 -1
index f379b0b..bdf71bd 100644
@@ -72,6 +72,9 @@ void zconf_nextfile(const char *name);
 int zconf_lineno(void);
 char *zconf_curname(void);
 
+/* conf.c */
+void xfgets(char *str, int size, FILE *in);
+
 /* confdata.c */
 const char *conf_get_configname(void);
 const char *conf_get_autoconfig_name(void);
@@ -80,11 +83,18 @@ void sym_set_change_count(int count);
 void sym_add_change_count(int count);
 void conf_set_all_new_symbols(enum conf_def_mode mode);
 
+/* confdata.c and expr.c */
+static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
+{
+	if (fwrite(str, len, count, out) < count)
+		fprintf(stderr, "\nError in writing or end of file.\n");
+}
+
 /* kconfig_load.c */
 void kconfig_load(void);
 
 /* menu.c */
-void menu_init(void);
+void _menu_init(void);
 void menu_warn(struct menu *menu, const char *fmt, ...);
 struct menu *menu_add_menu(void);
 void menu_end_menu(void);
@@ -106,6 +116,11 @@ int file_write_dep(const char *name);
 struct gstr {
 	size_t len;
 	char  *s;
+	/*
+	* when max_width is not zero long lines in string s (if any) get
+	* wrapped not to exceed the max_width value
+	*/
+	int max_width;
 };
 struct gstr str_new(void);
 struct gstr str_assign(const char *s);
@@ -121,6 +136,8 @@ void sym_init(void);
 void sym_clear_all_valid(void);
 void sym_set_all_changed(void);
 void sym_set_changed(struct symbol *sym);
+struct symbol *sym_choice_default(struct symbol *sym);
+const char *sym_get_string_default(struct symbol *sym);
 struct symbol *sym_check_deps(struct symbol *sym);
 struct property *prop_alloc(enum prop_type type, struct symbol *sym);
 struct symbol *prop_get_symbol(struct property *prop);
package/config/lkc_proto.h +6 -1
index 8e69461..9a948c9 100644
@@ -3,6 +3,7 @@
 P(conf_parse,void,(const char *name));
 P(conf_read,int,(const char *name));
 P(conf_read_simple,int,(const char *name, int));
+P(conf_write_defconfig,int,(const char *name));
 P(conf_write,int,(const char *name));
 P(conf_write_autoconf,int,(void));
 P(conf_get_changed,bool,(void));
@@ -11,12 +12,16 @@ P(conf_set_changed_callback, void,(void (*fn)(void)));
 /* menu.c */
 P(rootmenu,struct menu,);
 
-P(menu_is_visible,bool,(struct menu *menu));
+P(menu_is_visible, bool, (struct menu *menu));
+P(menu_has_prompt, bool, (struct menu *menu));
 P(menu_get_prompt,const char *,(struct menu *menu));
 P(menu_get_root_menu,struct menu *,(struct menu *menu));
 P(menu_get_parent_menu,struct menu *,(struct menu *menu));
 P(menu_has_help,bool,(struct menu *menu));
 P(menu_get_help,const char *,(struct menu *menu));
+P(get_symbol_str, void, (struct gstr *r, struct symbol *sym));
+P(get_relations_str, struct gstr, (struct symbol **sym_arr));
+P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
 
 /* symbol.c */
 P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
package/config/lxdialog/.gitignore new file +4 -0
new file mode 100644
index 0000000..90b08ff
@@ -0,0 +1,4 @@
+#
+# Generated files
+#
+lxdialog
package/config/lxdialog/checklist.c +8 -2
index bcc6f19..a2eb80f 100644
@@ -31,6 +31,10 @@ static int list_width, check_x, item_x;
 static void print_item(WINDOW * win, int choice, int selected)
 {
 	int i;
+	char *list_item = malloc(list_width + 1);
+
+	strncpy(list_item, item_str(), list_width - item_x);
+	list_item[list_width - item_x] = '\0';
 
 	/* Clear 'residue' of last item */
 	wattrset(win, dlg.menubox.atr);
@@ -45,13 +49,14 @@ static void print_item(WINDOW * win, int choice, int selected)
 		wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
 
 	wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
-	mvwaddch(win, choice, item_x, item_str()[0]);
+	mvwaddch(win, choice, item_x, list_item[0]);
 	wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
-	waddstr(win, (char *)item_str() + 1);
+	waddstr(win, list_item + 1);
 	if (selected) {
 		wmove(win, choice, check_x + 1);
 		wrefresh(win);
 	}
+	free(list_item);
 }
 
 /*
@@ -175,6 +180,7 @@ do_resize:
 	check_x = 0;
 	item_foreach()
 		check_x = MAX(check_x, strlen(item_str()) + 4);
+	check_x = MIN(check_x, list_width);
 
 	check_x = (list_width - check_x) / 2;
 	item_x = check_x + 4;
package/config/lxdialog/inputbox.c +2 -2
index 616c601..dd8e587 100644
@@ -180,7 +180,7 @@ do_resize:
 		case KEY_LEFT:
 			switch (button) {
 			case -1:
-				button = 1;	/* Indicates "Cancel" button is selected */
+				button = 1;	/* Indicates "Help" button is selected */
 				print_buttons(dialog, height, width, 1);
 				break;
 			case 0:
@@ -204,7 +204,7 @@ do_resize:
 				print_buttons(dialog, height, width, 0);
 				break;
 			case 0:
-				button = 1;	/* Indicates "Cancel" button is selected */
+				button = 1;	/* Indicates "Help" button is selected */
 				print_buttons(dialog, height, width, 1);
 				break;
 			case 1:
package/config/lxdialog/menubox.c +11 -11
index fa9d633..1d60473 100644
@@ -383,6 +383,10 @@ do_resize:
 		case 'n':
 		case 'm':
 		case '/':
+		case 'h':
+		case '?':
+		case 'z':
+		case '\n':
 			/* save scroll info */
 			*s_scroll = scroll;
 			delwin(menu);
@@ -390,8 +394,10 @@ do_resize:
 			item_set(scroll + choice);
 			item_set_selected(1);
 			switch (key) {
+			case 'h':
+			case '?':
+				return 2;
 			case 's':
-				return 3;
 			case 'y':
 				return 3;
 			case 'n':
@@ -402,18 +408,12 @@ do_resize:
 				return 6;
 			case '/':
 				return 7;
+			case 'z':
+				return 8;
+			case '\n':
+				return button;
 			}
 			return 0;
-		case 'h':
-		case '?':
-			button = 2;
-		case '\n':
-			*s_scroll = scroll;
-			delwin(menu);
-			delwin(dialog);
-			item_set(scroll + choice);
-			item_set_selected(1);
-			return button;
 		case 'e':
 		case 'x':
 			key = KEY_ESC;
package/config/lxdialog/util.c +2 -0
index 86d95cc..f2375ad 100644
@@ -19,6 +19,8 @@
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <stdarg.h>
+
 #include "dialog.h"
 
 struct dialog_info dlg;
package/config/mconf.c +25 -93

177 lines not on this page · raw message

package/config/menu.c +131 -6

210 lines not on this page · raw message

package/config/nconf.c new file +1570 -0

878 lines not on this page · raw message

package/config/nconf.gui.c new file +617 -0

617 lines not on this page · raw message

package/config/nconf.h new file +95 -0

95 lines not on this page · raw message

package/config/patches/01-kconfig-kernel-to-buildroot.patch +59 -60

119 lines not on this page · raw message

package/config/patches/03-change-config-option-prefix.patch +53 -65

118 lines not on this page · raw message

package/config/patches/04-fedora-13-build-fix.patch deleted +0 -17
deleted file mode 100644
index 4fa72df..0000000

Lines of this file are not shown. View the raw message.

package/config/patches/05-really-clean-everything.patch +8 -7
index c206f55..f8d8a39 100644

Lines of this file are not shown. View the raw message.

package/config/patches/06-br-build-system-integration.patch +4 -4
index 1e340f3..a2e634f 100644

Lines of this file are not shown. View the raw message.

package/config/patches/07-minor-makefile-fixes.patch deleted +0 -26
deleted file mode 100644
index f0f68ee..0000000

Lines of this file are not shown. View the raw message.

package/config/patches/09-implement-kconfig-probability.patch +13 -12
index 7adfc0b..7561fbc 100644

Lines of this file are not shown. View the raw message.

package/config/patches/12-fix-glade-file-path.patch +4 -4
index 233809a..10c7e91 100644

Lines of this file are not shown. View the raw message.

package/config/patches/13-use-conf-write-autoconf.patch +13 -13
index 826852d..8297dd9 100644

Lines of this file are not shown. View the raw message.

package/config/patches/14-support-out-of-tree-config.patch +57 -101

158 lines not on this page · raw message

package/config/patches/15-misc-qconf-changes.patch deleted +0 -175

175 lines not on this page · raw message

package/config/patches/16-non-identified-changes.patch deleted +0 -47

47 lines not on this page · raw message

package/config/patches/series +0 -4
index d5ab94c..997befd 100644

Lines of this file are not shown. View the raw message.

package/config/qconf.cc +60 -59

119 lines not on this page · raw message

package/config/qconf.h +12 -5
index b3b5657..636a74b 100644

Lines of this file are not shown. View the raw message.

package/config/streamline_config.pl new file +422 -0

422 lines not on this page · raw message

package/config/symbol.c +280 -48

328 lines not on this page · raw message

package/config/util.c +3 -1
index c382140..b15dbab 100644

Lines of this file are not shown. View the raw message.

package/config/zconf.gperf +2 -0
index 25ef5d0..d8bc742 100644

Lines of this file are not shown. View the raw message.

package/config/zconf.hash.c_shipped +2 -0
index 5c73d51..c1748fa 100644

Lines of this file are not shown. View the raw message.

package/config/zconf.l +3 -3
index 21ff69c..d8f7236 100644

Lines of this file are not shown. View the raw message.

package/config/zconf.tab.c_shipped +191 -213

404 lines not on this page · raw message

package/config/zconf.y +27 -11
index 62eee9c..956add1 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.0.4

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH 5/11 Add support for the new nconf configuration tool

In reply to Thomas Petazzoni
---
 Makefile                                           |   10 +++++++++-
 package/config/Makefile                            |    3 +++
 .../patches/06-br-build-system-integration.patch   |   19 +++++++++++++------
 3 files changed, 25 insertions(+), 7 deletions(-)
Makefile +9 -1
index 73d9335..fd46972 100644
@@ -28,7 +28,7 @@ CONFIG_CONFIG_IN=Config.in
 CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
-noconfig_targets:=menuconfig gconfig xconfig config oldconfig randconfig \
+noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check help
@@ -490,6 +490,14 @@ menuconfig: $(BUILD_DIR)/buildroot-config/mconf
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
+nconfig: $(BUILD_DIR)/buildroot-config/nconf
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
+		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
+	fi
+
 config: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
package/config/Makefile +3 -0
index 7e199bc..d8d44b0 100644
@@ -177,6 +177,9 @@ hostprogs-y := conf qconf gconf kxgettext
 ifeq ($(MAKECMDGOALS),nconfig)
 	hostprogs-y += nconf
 endif
+ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
+       hostprogs-y += nconf
+endif
 
 ifeq ($(MAKECMDGOALS),menuconfig)
 	hostprogs-y += mconf
package/config/patches/06-br-build-system-integration.patch +13 -6
index a2e634f..128bbc0 100644
@@ -1,12 +1,19 @@
 ---
- Makefile |   11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
+ Makefile |   14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
 
-Index: config.new/Makefile
+Index: config/Makefile
 ===================================================================
---- config.new.orig/Makefile
-+++ config.new/Makefile
-@@ -181,14 +181,23 @@
+--- config.orig/Makefile
++++ config/Makefile
+@@ -177,18 +177,30 @@
+ ifeq ($(MAKECMDGOALS),nconfig)
+ 	hostprogs-y += nconf
+ endif
++ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
++       hostprogs-y += nconf
++endif
+ 
  ifeq ($(MAKECMDGOALS),menuconfig)
  	hostprogs-y += mconf
  endif
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 6/11 Remove unnecessary ugly hacks in package/config

In reply to Thomas Petazzoni

Those hacks should not be needed and they even make "mconf" fail to save the configuration file in $(CONFIG_DIR).

---
 package/config/conf.c                              |    4 --
 package/config/mconf.c                             |    2 +-
 .../patches/13-use-conf-write-autoconf.patch       |   53 --------------------
 package/config/patches/series                      |    1 -
 package/config/qconf.cc                            |    2 -
 5 files changed, 1 insertions(+), 61 deletions(-)
 delete mode 100644 package/config/patches/13-use-conf-write-autoconf.patch
package/config/conf.c +0 -4
index 2449ca0..2062b57 100644
@@ -640,10 +640,6 @@ int main(int ac, char **av)
 			fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
 			exit(1);
 		}
-		if (conf_write_autoconf()) {
-			fprintf(stderr, _("\n*** Error during update of the Buildroot configuration.\n\n"));
-			return 1;
-		}
 	}
 	return 0;
 }
package/config/mconf.c +1 -1
index 317e478..3d1ed3a 100644
@@ -862,6 +862,6 @@ int main(int ac, char **av)
 			"\n\n"));
 	}
 
-	return conf_write_autoconf();
+	return 0;
 }
 
package/config/patches/13-use-conf-write-autoconf.patch deleted +0 -53

53 lines not on this page · raw message

package/config/patches/series +0 -1
index 997befd..defdf58 100644
@@ -8,5 +8,4 @@
 10-br-build-system.patch
 11-use-mktemp-for-lxdialog.patch
 12-fix-glade-file-path.patch
-13-use-conf-write-autoconf.patch
 14-support-out-of-tree-config.patch
package/config/qconf.cc +0 -2
index 0fe8fd4..bbda3c8 100644
@@ -1612,7 +1612,6 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
 {
 	if (!conf_get_changed()) {
 		e->accept();
-		conf_write_autoconf();
 		return;
 	}
 	QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning,
@@ -1623,7 +1622,6 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e)
 	switch (mb.exec()) {
 	case QMessageBox::Yes:
 		conf_write(NULL);
-		conf_write_autoconf();
 	case QMessageBox::No:
 		e->accept();
 		break;
Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 7/11 Makefile: use long options names for the 'conf' utility

In reply to Thomas Petazzoni

The short option names have been removed as they were starting to cause too much confusion. See
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4062f1a4c030157216dc8932e27131975cf7253c
for details.

---
 Makefile |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
Makefile +9 -9
index fd46972..77e0fc7 100644
@@ -508,25 +508,25 @@ oldconfig: $(BUILD_DIR)/buildroot-config/conf
 	mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -o $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --oldconfig $(CONFIG_CONFIG_IN)
 
 randconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -r $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
 
 allyesconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -y $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
 
 allnoconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -n $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
 
 randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
@@ -534,7 +534,7 @@ randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -r $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
@@ -543,7 +543,7 @@ allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -y $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
@@ -552,20 +552,20 @@ allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -n $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -d $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< -D $(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
 
 # check if download URLs are outdated
 source-check: allyesconfig
Signature · 1 line
1.7.0.4
#8 lore raw

PATCH 8/11 Factorize environment variables for config utilities

In reply to Thomas Petazzoni

Instead of duplicating the definition of KCONFIG_AUTOCONFIG, KCONFIG_AUTOHEADER and BUILDROOT_CONFIG, let's define them in a COMMON_CONFIG_ENV variable, which is used by all the xconfig, gconfig, menuconfig, nconfig, config, oldconfig, randconfig, allyesconfig, allnoconfig, randpackageconfig, allyespackageconfig, allnopackageconfig, defconfig, %_defconfig targets.

---
 Makefile |   66 +++++++++++++++++++++----------------------------------------
 1 files changed, 23 insertions(+), 43 deletions(-)
Makefile +23 -43
index 77e0fc7..abe1aa0 100644
@@ -465,107 +465,87 @@ $(BUILD_DIR)/buildroot-config/%onf:
 	mkdir -p $(@D)/lxdialog
 	$(MAKE) CC="$(HOSTCC)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
 
+COMMON_CONFIG_ENV = \
+	KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
+	KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+	BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
+
 xconfig: $(BUILD_DIR)/buildroot-config/qconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
 gconfig: $(BUILD_DIR)/buildroot-config/gconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		srctree=$(TOPDIR) \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+	@if ! $(COMMON_CONFIG_ENV) srctree=$(TOPDIR) \
+		$< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
 menuconfig: $(BUILD_DIR)/buildroot-config/mconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
 nconfig: $(BUILD_DIR)/buildroot-config/nconf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@if ! KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN); then \
+	@if ! $(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN); then \
 		test -f $(CONFIG_DIR)/.config.cmd || rm -f $(CONFIG_DIR)/.config; \
 	fi
 
 config: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
 oldconfig: $(BUILD_DIR)/buildroot-config/conf
 	mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --oldconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
 
 randconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
 
 allyesconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
 
 allnoconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
 
 randpackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+	@$(COMMON_CONFIG_ENV) \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --randconfig $(CONFIG_CONFIG_IN)
+		$< --randconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+	@$(COMMON_CONFIG_ENV) \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allyesconfig $(CONFIG_CONFIG_IN)
+		$< --allyesconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+	@$(COMMON_CONFIG_ENV) \
 		KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --allnoconfig $(CONFIG_CONFIG_IN)
+		$< --allnoconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
-		KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
-		BUILDROOT_CONFIG=$(CONFIG_DIR)/.config $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
 
 # check if download URLs are outdated
 source-check: allyesconfig
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 9/11 Add support for savedefconfig

In reply to Thomas Petazzoni

savedefconfig allows to create a minimal defconfig file from an existing configuration. For example :

make O=/path/to/some/buildroot/build/directory savedefconfig

will generate a minimal 'defconfig' file in the main Buildroot source directory.

---
 Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Makefile +5 -1
index abe1aa0..c897db7 100644
@@ -29,7 +29,7 @@ CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
 noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
-	defconfig %_defconfig allyesconfig allnoconfig release \
+	defconfig %_defconfig savedefconfig allyesconfig allnoconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check help
 
@@ -547,6 +547,10 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
 
+savedefconfig: $(BUILD_DIR)/buildroot-config/conf
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	@$(COMMON_CONFIG_ENV) $< --savedefconfig=$(TOPDIR)/defconfig $(CONFIG_CONFIG_IN)
+
 # check if download URLs are outdated
 source-check: allyesconfig
 	$(MAKE) $(EXTRAMAKEARGS) _source-check
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 10/11 Ensure that all config-related files are generated before the build

In reply to Thomas Petazzoni

The previous commit has removed calls to conf_write_autoconf(), which is the function that generates the KCONFIG_AUTOCONF, KCONFIG_AUTOHEADER, KCONFIG_TRISTATE files and the split config (with one file per config item). Therefore, those things were not generated anymore before the build.

In order to get them generated before the build, we use the same mechanism as the kernel: run a silentoldconfig when the .config file is newer than the KCONFIG_AUTOCONF file.

In Buildroot, all those elements are really used today, except the split config which is used a little bit in the toolchain build, in a try to make sure the toolchain gets rebuilt properly when the configuration changes. It does not seem that this work has been completed.

However, as we want to keep the same behaviour as previously, we have to generate all those elements before starting the build.

---
 Makefile |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)
Makefile +12 -7
index c897db7..9cc3c7a 100644
@@ -29,7 +29,7 @@ CONFIG=package/config
 DATE:=$(shell date +%Y%m%d)
 
 noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
-	defconfig %_defconfig savedefconfig allyesconfig allnoconfig release \
+	defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
 	source-check help
 
@@ -322,17 +322,17 @@ TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS))
 # all targets depend on the crosscompiler and it's prerequisites
 $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
 
-$(BR2_DEPENDS_DIR): $(CONFIG_DIR)/.config
-#	rm -rf $@
-#	mkdir -p $(@D)
-#	cp -dpRf $(CONFIG)/buildroot-config $@
-
 dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
 	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
 
 $(BASE_TARGETS): dirs
 
-world: dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
+$(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
+	$(MAKE) $(EXTRAMAKEARGS) silentoldconfig
+
+prepare: $(BUILD_DIR)/buildroot-config/auto.conf
+
+world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
 
 
 .PHONY: all world dirs clean distclean source \
@@ -468,6 +468,7 @@ $(BUILD_DIR)/buildroot-config/%onf:
 COMMON_CONFIG_ENV = \
 	KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
 	KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
+	KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
 	BUILDROOT_CONFIG=$(CONFIG_DIR)/.config
 
 xconfig: $(BUILD_DIR)/buildroot-config/qconf
@@ -539,6 +540,10 @@ allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf
 		$< --allnoconfig $(CONFIG_CONFIG_IN)
 	@rm -f $(CONFIG_DIR)/.config.nopkg
 
+silentoldconfig: $(BUILD_DIR)/buildroot-config/conf
+	@mkdir -p $(BUILD_DIR)/buildroot-config
+	$(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
+
 defconfig: $(BUILD_DIR)/buildroot-config/conf
 	@mkdir -p $(BUILD_DIR)/buildroot-config
 	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 11/11 Tell git to ignore the Quilt internal directory in package/config

In reply to Thomas Petazzoni
---
 package/config/.gitignore |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
package/config/.gitignore +5 -0
index 624f650..106bc12 100644
@@ -21,3 +21,8 @@ nconf
 qconf
 gconf
 kxgettext
+
+#
+# Quilt is being used to handle the patch series
+#
+.pc
Signature · 1 line
1.7.0.4
#12 lore raw
In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The following changes since commit 4973632207fd496199298191ada01c8c8ec2bee7:
Thomas> Yann E. MORIN (1):
Thomas> packages/atk: fix Makefile

Thomas> are available in the git repository at:

Thomas> git://git.busybox.net/~tpetazzoni/git/buildroot for-2010.11/kconfig-upgrade

Pulled, thanks!

Signature · 1 line
Bye, Peter Korsgaard