]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.rpmify/cloneconfig.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.rpmify / cloneconfig.diff
CommitLineData
6a930a95
BS
1From: Andreas Gruenbacher <agruen@suse.de>
2Subject: Add ``cloneconfig'' target
3
4Cloneconfig takes the first configuration it finds which appears
5to belong to the running kernel, and configures the kernel sources
6to match this configuration as closely as possible.
7
8Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
9
10 scripts/kconfig/Makefile | 16 ++++++++++++++++
11 1 file changed, 16 insertions(+)
12
13--- a/scripts/kconfig/Makefile
14+++ b/scripts/kconfig/Makefile
15@@ -61,6 +61,22 @@ allnoconfig: $(obj)/conf
16 allmodconfig: $(obj)/conf
17 $< -m $(Kconfig)
18
19+UNAME_RELEASE := $(shell uname -r)
20+CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
21+ /lib/modules/$(UNAME_RELEASE)/.config \
22+ /etc/kernel-config \
23+ /boot/config-$(UNAME_RELEASE)))
24+cloneconfig: $(obj)/conf
25+ $(Q)case "$(CLONECONFIG)" in \
26+ '') echo -e "The configuration of the running" \
27+ "kernel could not be determined\n"; \
28+ false ;; \
29+ *.gz) gzip -cd $(CLONECONFIG) > .config.running ;; \
30+ *) cat $(CLONECONFIG) > .config.running ;; \
31+ esac && \
32+ echo -e "Cloning configuration file $(CLONECONFIG)\n"
33+ $(Q)$< -D .config.running arch/$(SRCARCH)/Kconfig
34+
35 defconfig: $(obj)/conf
36 ifeq ($(KBUILD_DEFCONFIG),)
37 $< -d $(Kconfig)