2010-07-07 11:12:45 +00:00
|
|
|
From: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
Subject: Add ``cloneconfig'' target
|
2011-04-19 20:09:59 +00:00
|
|
|
Patch-mainline: Submitted 24 Feb 2011
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
Cloneconfig takes the first configuration it finds which appears
|
|
|
|
to belong to the running kernel, and configures the kernel sources
|
|
|
|
to match this configuration as closely as possible.
|
|
|
|
|
|
|
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
2011-04-19 20:09:59 +00:00
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
---
|
2010-07-07 11:12:45 +00:00
|
|
|
|
2011-04-19 20:09:59 +00:00
|
|
|
scripts/kconfig/Makefile | 17 +++++++++++++++++
|
|
|
|
1 file changed, 17 insertions(+)
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
--- a/scripts/kconfig/Makefile
|
|
|
|
+++ b/scripts/kconfig/Makefile
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -99,6 +99,23 @@ PHONY += allnoconfig allyesconfig allmod
|
2010-07-07 11:12:45 +00:00
|
|
|
|
2011-04-19 20:09:59 +00:00
|
|
|
allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
|
|
|
|
$< --$@ $(Kconfig)
|
|
|
|
+
|
2010-07-07 11:12:45 +00:00
|
|
|
+UNAME_RELEASE := $(shell uname -r)
|
|
|
|
+CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
|
|
|
|
+ /lib/modules/$(UNAME_RELEASE)/.config \
|
|
|
|
+ /etc/kernel-config \
|
|
|
|
+ /boot/config-$(UNAME_RELEASE)))
|
|
|
|
+cloneconfig: $(obj)/conf
|
|
|
|
+ $(Q)case "$(CLONECONFIG)" in \
|
|
|
|
+ '') echo -e "The configuration of the running" \
|
|
|
|
+ "kernel could not be determined\n"; \
|
|
|
|
+ false ;; \
|
|
|
|
+ *.gz) gzip -cd $(CLONECONFIG) > .config.running ;; \
|
|
|
|
+ *) cat $(CLONECONFIG) > .config.running ;; \
|
|
|
|
+ esac && \
|
|
|
|
+ echo -e "Cloning configuration file $(CLONECONFIG)\n"
|
2011-04-19 20:09:59 +00:00
|
|
|
+ $(Q)$< --defconfig=.config.running arch/$(SRCARCH)/Kconfig
|
2010-07-07 11:12:45 +00:00
|
|
|
+
|
2011-04-19 20:09:59 +00:00
|
|
|
|
|
|
|
PHONY += listnewconfig oldnoconfig savedefconfig defconfig
|
|
|
|
|