From mboxrd@z Thu Jan 1 00:00:00 1970 From: Iain Paton Subject: Re: [ANNOUNCE] kvm-74 release Date: Mon, 01 Sep 2008 19:21:35 +0100 Message-ID: <48BC32AF.6000809@darkvoyage.org.uk> References: <48B677A6.5000307@qumranet.com> <48B73D35.4090402@lkml.darkvoyage.org.uk> <48BBC560.2090508@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from defiant.darkvoyage.org.uk ([81.187.177.18]:44536 "EHLO defiant.darkvoyage.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbYIAS2U (ORCPT ); Mon, 1 Sep 2008 14:28:20 -0400 In-Reply-To: <48BBC560.2090508@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > If the kernel was built, installed, and is now running, it's not. change control, downtime windows and such like nonsense prevent me from doing things that way. The target systems don't have any development tools installed and the build system will never run the kernel being built. catch 22. > ./configure; > make should suffice. I've never tested this though. Have you tried this? yes this does work, just not in the environment I'm in. >> I don't have enough understanding of kernel makefile magic to see what >> I'm >> missing, so any help would be appreciated. > > Me neither. > Ok, so after some digging it appears that to support building with O= you need some modifications to LINUXINCLUDE within the makefile. Looking at what's done in the toplevel kernel makefile they do the following # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option LINUXINCLUDE := -Iinclude \ $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \ -include include/linux/autoconf.h KBUILD_SRC is calculated from what's passed in to make by O= So something like the following change to the KVM makefile works happily. I'm quite sure this isn't the correct way to do it, but perhaps it can point someone with more of a clue than me in the right direction :) --- kernel/Makefile.org 2008-09-01 18:46:15.272561974 +0100 +++ kernel/Makefile 2008-09-01 18:51:14.629935513 +0100 @@ -36,7 +36,9 @@ all:: header-link prerequisite # include header priority 1) $LINUX 2) $KERNELDIR 3) include-compat $(MAKE) -C $(KERNELDIR) M=`pwd` \ - LINUXINCLUDE="-I`pwd`/include -Iinclude -Iarch/${ARCH_DIR}/include -I`pwd`/include-compat \ + LINUXINCLUDE="-I`pwd`/include -Iinclude \ + $(if $(O),-Iinclude2 -I$(KERNELDIR)/include) \ + -Iarch/${ARCH_DIR}/include -I`pwd`/include-compat \ -include include/linux/autoconf.h \ -include `pwd`/$(ARCH_DIR)/external-module-compat.h" "$$@" With the above patch I can get some working modules using the following: ./configure --kerneldir=/home/ilp/kernels/v2.6/linux-2.6.26-org make O=/home/ilp/kernels/v2.6/linux-2.6.26-dv