All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Alexander Graf <agraf@suse.de>
Cc: "kvm@vger.kernel.org list" <kvm@vger.kernel.org>,
	Alexey Eremenko <alexey.eremenko@qumranet.com>,
	"avi@qumranet.com Kivity" <avi@qumranet.com>
Subject: Re: [PATCH] Make KVM compile on split source/object kernel configurations
Date: Mon, 29 Sep 2008 20:32:57 +0200	[thread overview]
Message-ID: <48E11F59.5070102@web.de> (raw)
In-Reply-To: <E9B018A7-32A9-4B67-AF9E-09F401D7D751@suse.de>

[-- Attachment #1: Type: text/plain, Size: 3030 bytes --]

Alexander Graf wrote:
> Any further comments on this? I would really like to see KVM build
> out-of-the-box on SUSE kernels (and kernels built with O= at the same
> time).
>
> Alex

/me, too. And my colleagues @work. We carry around an old hack to build
against SuSE, now waiting for your clean solution to be merged.

Jan

> 
> On 15.09.2008, at 16:19, Alexander Graf wrote:
> 
>> KVM as is assumes that the kernel obj dir and the kernel source dir
>> are at the same location. This is true for most self-built vanilla
>> kernels, but some distributions split these up (e.g. SUSE).
>> To keep compatible and have users have a good experience on building
>> KVM on any distribution, this patch attempts to rebuild the logic from
>> the kernel Makefile as closely as possible. With it I successfully
>> built KVM on a current SUSE system.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>> Please check and see if it breaks the build process for anyone else.
>> Building with IA64 on SUSE-kernels is still broken due to similar but
>> separate problems.
>>
>>
>> diff --git a/configure b/configure
>> index 3bb10ce..5e9cbab 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1,6 +1,7 @@
>> #!/bin/bash
>>
>> prefix=/usr/local
>> +kernelsourcedir=
>> kerneldir=/lib/modules/$(uname -r)/build
>> cc=gcc
>> ld=ld
>> @@ -102,6 +103,11 @@ if [ "$arch" = "powerpc" ]; then
>>     qemu_ldflags="$qemu_ldflags -L $PWD/libfdt"
>> fi
>>
>> +# see if we have split build and source directories
>> +if [ -d "$kerneldir/include2" ]; then
>> +    kernelsourcedir=${kerneldir%/*}/source
>> +fi
>> +
>> #configure user dir
>> (cd user; ./configure --prefix="$prefix"
>> --kerneldir="$libkvm_kerneldir" \
>>           --arch="$arch" \
>> @@ -124,6 +130,7 @@ cat <<EOF > config.mak
>> ARCH=$arch
>> PREFIX=$prefix
>> KERNELDIR=$kerneldir
>> +KERNELSOURCEDIR=$kernelsourcedir
>> LIBKVM_KERNELDIR=$libkvm_kerneldir
>> WANT_MODULE=$want_module
>> CROSS_COMPILE=$cross_prefix
>> diff --git a/kernel/Makefile b/kernel/Makefile
>> index 3f5f6da..d2cf89c 100644
>> --- a/kernel/Makefile
>> +++ b/kernel/Makefile
>> @@ -36,7 +36,9 @@ hack-files = $(hack-files-$(ARCH_DIR))
>> 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 $(KERNELSOURCEDIR),-Iinclude2
>> -I$(KERNELSOURCEDIR)/include) \
>> +        -Iarch/${ARCH_DIR}/include -I`pwd`/include-compat \
>>         -include include/linux/autoconf.h \
>>         -include `pwd`/$(ARCH_DIR)/external-module-compat.h"
>>         "$$@"
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]

  reply	other threads:[~2008-09-29 18:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 14:19 [PATCH] Make KVM compile on split source/object kernel configurations Alexander Graf
2008-09-16 10:01 ` Zhang, Xiantao
2008-09-16 10:24   ` Alexander Graf
2008-09-29 18:13 ` Alexander Graf
2008-09-29 18:32   ` Jan Kiszka [this message]
2008-09-29 21:50   ` Brian Jackson
2008-09-29 22:00     ` Alexander Graf
2008-09-30 13:57       ` Brian Jackson
  -- strict thread matches above, loose matches on Subject: below --
2008-09-16  7:22 Zhang, Xiantao
2008-09-16  7:22 ` Zhang, Xiantao
2008-09-16  9:34 ` Alexander Graf
2008-09-16  9:34   ` Alexander Graf
2008-09-16 10:22 ` Zhang, Xiantao
2008-09-16 10:22   ` Zhang, Xiantao
2008-09-16 10:38 ` Alexander Graf
2008-09-16 10:38   ` Alexander Graf
2008-09-18  2:12 ` Zhang, Xiantao
2008-09-18  2:12   ` Zhang, Xiantao
2008-09-18  2:54 ` Alexander Graf
2008-09-18  2:54   ` Alexander Graf

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=48E11F59.5070102@web.de \
    --to=jan.kiszka@web.de \
    --cc=agraf@suse.de \
    --cc=alexey.eremenko@qumranet.com \
    --cc=avi@qumranet.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.