Skip to contentSkip to conversation

x86/platform: fix "make O=dir kvmconfig"

PATCH In review Antonio Borneo 3 participants 3 messages Apr 13, 2014 – Apr 14, 2014 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/platform: fix "make O=dir kvmconfig"

Running:

	make O=dir x86_64_defconfig
	make O=dir kvmconfig

the second command dirties the source tree with file ".config", symlink "source" and objects in folder "scripts".

Fixed by adding paths in arch Makefile.

---
 arch/x86/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/Makefile +2 -2
index 602f57e..d1b7c37 100644
@@ -250,8 +250,8 @@ archclean:
 PHONY += kvmconfig
 kvmconfig:
 	$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config
-	$(Q)yes "" | $(MAKE) oldconfig
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
+	$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
 
 define archhelp
   echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'
Signature · 1 line
1.9.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Antonio Borneo

Running:

	make O=dir x86_64_defconfig
	make O=dir kvmconfig

the second command dirties the source tree with file ".config", symlink "source" and objects in folder "scripts".

Fixed by adding paths in arch Makefile.

Yes, without this patch and building into another dir with O=, kvmconfig has more problems:

$ make O=/tmp/kernel kvmconfig
Using /tmp/kernel/.config as base
Merging arch/x86/configs/kvm_guest.config
sed: can't read arch/x86/configs/kvm_guest.config: No such file or directory
cat: arch/x86/configs/kvm_guest.config: No such file or directory
#
# merged configuration written to /tmp/kernel/.config (needs make)
#
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config

So, yes, we want it:

Thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#2 lore raw

[tip:x86/urgent] x86/platform: Fix "make O=dir kvmconfig"

In reply to Antonio Borneo
x86/platform: Fix "make O=dir kvmconfig"
Commit-ID:  f96364041ccda63ff4bed96fd06b267d8d841dc0
Gitweb:     http://git.kernel.org/tip/f96364041ccda63ff4bed96fd06b267d8d841dc0
Author:     Antonio Borneo <[email protected]>
AuthorDate: Sun, 13 Apr 2014 16:26:08 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 14 Apr 2014 08:50:36 +0200

x86/platform: Fix "make O=dir kvmconfig"

Running:

	make O=dir x86_64_defconfig
	make O=dir kvmconfig

the second command dirties the source tree with file ".config", symlink "source" and objects in folder "scripts".

Fixed by using properly prefixed paths in the arch Makefile.

---
 arch/x86/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/Makefile +2 -2
index 3b9348a..0db8910 100644
@@ -250,8 +250,8 @@ archclean:
 PHONY += kvmconfig
 kvmconfig:
 	$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
-	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config
-	$(Q)yes "" | $(MAKE) oldconfig
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
+	$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
 
 define archhelp
   echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'