From: Maik Hentsche <maik.hentsche@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Joerg Roedel <joerg.roedel@amd.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] kvm-userspace: fix module build with --kerneldir
Date: Mon, 1 Dec 2008 15:28:31 +0100 [thread overview]
Message-ID: <20081201152831.63f7ffc0@siegfried> (raw)
In-Reply-To: <1227621454-24385-1-git-send-email-joerg.roedel@amd.com>
[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]
Please find my reworked patch attached. Support for pre-f1d28fb04
kernels was tested with 2.6.16.1. I CC-ed everyone who contributed to
this thread, thanks for your help. I hope the "bureaucracy" is correct.
I'm not a kernel developer and thus only know about the contribution
process what I found in the documentation.
so long
Maik
----
When kvm-userspace is build with a different kernel version than the
running kernel the depmod at the end will fail. This patch fixed the
problem.
Signed-off-by: Maik Hentsche <maik.hentsche@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
--
\ AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
/ General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe,
Thomas McCoy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: kvm_patch.git.diff --]
[-- Type: text/x-patch; name=kvm_patch.git.diff, Size: 1809 bytes --]
diff --git a/configure b/configure
index 63f956c..97a7cb7 100755
--- a/configure
+++ b/configure
@@ -15,6 +15,12 @@ qemu_opts=()
cross_prefix=
arch=`uname -m`
target_exec=
+# don't use uname if kerneldir is set
+no_uname=
+depmod_version=
+if [ -z "TMPDIR" ] ; then
+ TMPDIR=.
+fi
usage() {
cat <<-EOF
@@ -56,6 +62,7 @@ while [[ "$1" = -* ]]; do
;;
--kerneldir)
kerneldir="$arg"
+ no_uname=1
;;
--with-patched-kernel)
want_module=
@@ -112,6 +119,21 @@ if [ -d "$kerneldir/include2" ]; then
kernelsourcedir=${kerneldir%/*}/source
fi
+if [ -n "$no_uname" ]; then
+ if [ -e "$kerneldir/.kernelrelease" ]; then
+ depmod_version=`cat "$kerneldir/.kernelrelease"`
+
+ elif [ -e "$kerneldir/include/config/kernel.release" ]; then
+ depmod_version=`cat "$kerneldir/include/config/kernel.release"`
+ else
+ echo
+ echo "Error: kernelversion not found"
+ echo "Please make sure your kernel is configured"
+ echo
+ exit 1
+ fi
+fi
+
#configure user dir
(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
--arch="$arch" --processor="$processor" \
@@ -143,6 +165,7 @@ CC=$cross_prefix$cc
LD=$cross_prefix$ld
OBJCOPY=$cross_prefix$objcopy
AR=$cross_prefix$ar
+DEPMOD_VERSION=$depmod_version
EOF
cat <<EOF > kernel/config.kbuild
diff --git a/kernel/Makefile b/kernel/Makefile
index 41449d6..8315e3d 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -107,7 +107,7 @@ install:
$(ORIGMODDIR)/arch/$(ARCH_DIR)/kvm/*.ko; do \
if [ -f "$$i" ]; then mv "$$i" "$$i.orig"; fi; \
done
- /sbin/depmod -a
+ /sbin/depmod -a $(DEPMOD_VERSION)
tmpspec = .tmp.kvm-kmod.spec
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-12-01 14:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 13:57 [PATCH] kvm-userspace: fix module build with --kerneldir Joerg Roedel
2008-11-26 10:42 ` Avi Kivity
2008-11-26 10:59 ` Maik Hentsche
2008-11-26 11:14 ` Avi Kivity
2008-11-26 12:14 ` Maik Hentsche
2008-11-26 16:03 ` Avi Kivity
2008-11-26 12:16 ` Jan Kiszka
2008-11-26 16:00 ` Avi Kivity
2008-11-27 14:15 ` Eduardo Habkost
2008-11-27 14:26 ` Avi Kivity
2008-12-01 14:28 ` Maik Hentsche [this message]
2008-12-09 15:02 ` Joerg Roedel
2008-12-10 10:06 ` Avi Kivity
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=20081201152831.63f7ffc0@siegfried \
--to=maik.hentsche@amd.com \
--cc=avi@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=joerg.roedel@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox