From: Iain Paton <devnull@darkvoyage.org.uk>
To: kvm@vger.kernel.org
Subject: Re: [ANNOUNCE] kvm-74 release
Date: Mon, 01 Sep 2008 19:21:35 +0100 [thread overview]
Message-ID: <48BC32AF.6000809@darkvoyage.org.uk> (raw)
In-Reply-To: <48BBC560.2090508@qumranet.com>
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
next prev parent reply other threads:[~2008-09-01 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 10:02 [ANNOUNCE] kvm-74 release Avi Kivity
2008-08-29 0:05 ` Iain Paton
2008-09-01 10:35 ` Avi Kivity
2008-09-01 18:21 ` Iain Paton [this message]
2008-08-29 6:46 ` Charles Duffy
2008-09-01 10:36 ` Avi Kivity
2008-09-02 10:24 ` Henrik Holst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48BC32AF.6000809@darkvoyage.org.uk \
--to=devnull@darkvoyage.org.uk \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox