From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: patch to respect kerneldir when building kernel modules Date: Tue, 6 Feb 2007 08:51:24 +0200 Message-ID: <20070206065124.GJ3621@rhun.ibm.com> References: <2e59e6970702052132l33612315h1d2310272822ee83@mail.gmail.com> <2e59e6970702052201y61a7c71bvac5b35cd97fea410@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "richardvoigt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Return-path: Content-Disposition: inline In-Reply-To: <2e59e6970702052201y61a7c71bvac5b35cd97fea410-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Tue, Feb 06, 2007 at 12:01:20AM -0600, richardvoigt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > On 2/5/07, richardvoigt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > >Currently the kerneldir option to configure is ignored by the > >kernel/Makefile > > > >This patch fixes that, so you can build modules for your new kernel > >before booting with it. > > > > I'd put the line in the wrong place, this is better. I prefer this version which I sent a couple of days ago: If the user specifies kerneldir, use it. Without the patch: muli@cluwyn:~/kvm/hg$ ./configure --qemu-cc=gcc-3.4 --kerneldir=/home/muli/iommu/calgary/obj.linux/ [snip] muli@cluwyn:~/kvm/hg$ make make -C kernel make[1]: Entering directory `/home/muli/kvm/hg/kernel' make -C /lib/modules/2.6.17-2-amd64/build M=`pwd` "$@" <======= With the patch: muli@cluwyn:~/kvm/hg$ ./configure --qemu-cc=gcc-3.4 --kerneldir=/home/muli/iommu/calgary/obj.linux/ [snip] muli@cluwyn:~/kvm/hg$ make make -C kernel make[1]: Entering directory `/home/muli/kvm/hg/kernel' make -C /home/muli/iommu/calgary/obj.linux M=`pwd` "$@" <====== To support building directly from kernel/, we don't complain if we can't find config.mak. Signed-off-by: Muli Ben-Yehuda diff -r 0df0a31d8154 kernel/Makefile --- a/kernel/Makefile Sun Feb 04 08:38:53 2007 +0000 +++ b/kernel/Makefile Sun Feb 04 12:30:53 2007 +0200 @@ -1,4 +1,6 @@ KERNELDIR := /lib/modules/$(shell uname -KERNELDIR := /lib/modules/$(shell uname -r)/build +-include ../config.mak + +KERNELDIR ?= /lib/modules/$(shell uname -r)/build KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR)) DESTDIR= ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642