public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerone Young <jyoung5@us.ibm.com>
To: kvm-devel@lists.sourceforge.net
Cc: kvm-ppc-devel@lists.sourceforge.net, hollisb@us.ibm.com
Subject: [PATCH 1 of 4] Add "make sync" to sync need kernel headers to	kvm-userspace
Date: Mon, 14 Apr 2008 03:37:04 -0500	[thread overview]
Message-ID: <5b1798e467ce791db9ae.1208162224@thinkpadL> (raw)
In-Reply-To: <patchbomb.1208162223@thinkpadL>

2 files changed, 25 insertions(+), 4 deletions(-)
Makefile  |   21 ++++++++++++++++++++-
configure |    8 +++++---


This patch adds ability for kvm-userspace build system to sync needed kernel headers locally without the need of compiled kernel source.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ rpmrelease = devel
 
 .PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt
 
-all: libkvm qemu
+all: sync libkvm qemu
 ifneq '$(filter $(ARCH), x86_64 i386 ia64)' ''
     all: $(if $(WANT_MODULE), kernel) user
 endif
@@ -69,6 +69,24 @@ install:
 	make -C libkvm DESTDIR="$(DESTDIR)" install
 	make -C qemu DESTDIR="$(DESTDIR)" install
 
+
+ASM_DIR=$(ARCH)
+ifneq '$(filter $(ARCH), i386 x86_64)' ''
+	ASM_DIR=x86
+endif
+
+sync:
+	mkdir -p $(INCLUDES_DIR)
+	mkdir -p $(INCLUDES_DIR)/asm-$(ASM_DIR)
+	mkdir -p $(INCLUDES_DIR)/linux
+	cp -f $(KERNELDIR)/include/asm-$(ASM_DIR)/kvm*.h \
+		$(INCLUDES_DIR)/asm-$(ASM_DIR)/
+	cp -f $(KERNELDIR)/include/linux/kvm*.h \
+		$(KERNELDIR)/include/linux/compiler*.h \
+		$(INCLUDES_DIR)/linux
+	ln -sf  $(INCLUDES_DIR)/asm-$(ASM_DIR) $(INCLUDES_DIR)/asm
+
+
 tmpspec = .tmp.kvm.spec
 RPMTOPDIR = $$(pwd)/rpmtop
 
@@ -99,3 +117,4 @@ clean:
 
 distclean: clean
 	rm -f config.mak user/config.mak
+	rm -rf $(INCLUDES_DIR)
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -10,6 +10,7 @@ cross_prefix=
 cross_prefix=
 arch=`uname -m`
 target_exec=
+local_kernel_includes_dir=$PWD/includes
 
 usage() {
     cat <<-EOF
@@ -108,16 +109,16 @@ fi
 fi
 
 #configure user dir
-(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
+(cd user; ./configure --prefix="$prefix" \
           --arch="$arch" \
           ${cross_prefix:+"--cross-prefix=$cross_prefix"})
 
 #configure qemu
 (cd qemu; ./configure --target-list=$target_exec \
     --disable-kqemu \
-    --extra-cflags="-I $PWD/../libkvm $qemu_cflags" \
+    --extra-cflags="-I $PWD/../libkvm $qemu_cflags \
+               -I $local_kernel_includes_dir" \
     --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \
-    --kernel-path="$libkvm_kerneldir" \
     --prefix="$prefix" \
     ${qemu_cc:+"--cc=$qemu_cc"} \
     ${cross_prefix:+"--cross-prefix=$cross_prefix"} \
@@ -131,4 +132,5 @@ KERNELDIR=$kerneldir
 KERNELDIR=$kerneldir
 WANT_MODULE=$want_module
 CROSS_COMPILE=$cross_prefix
+INCLUDES_DIR=$local_kernel_includes_dir
 EOF

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-14  8:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14  8:37 [PATCH 0 of 4] Sync kernel headers to kvm-userspace Jerone Young
2008-04-14  8:37 ` Jerone Young [this message]
2008-04-14  8:50   ` [PATCH 1 of 4] Add "make sync" to sync need " Christoph Hellwig
2008-04-14 11:47     ` Avi Kivity
2008-04-14 11:54       ` Christoph Hellwig
2008-04-14 12:04         ` Avi Kivity
2008-04-14 14:23           ` Anthony Liguori
2008-04-14 14:43             ` Avi Kivity
2008-04-14 14:20     ` Anthony Liguori
2008-04-14 14:18   ` Anthony Liguori
2008-04-15  7:29   ` Avi Kivity
2008-04-14  8:37 ` [PATCH 2 of 4] Fix libfdt to include synced headers Jerone Young
2008-04-14  8:37 ` [PATCH 3 of 4] Fix user to include synced headers & remove kerneldir option Jerone Young
2008-04-14  8:37 ` [PATCH 4 of 4] Remove kvm kernel-path option from qemu Jerone Young
2008-04-15  8:38   ` 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=5b1798e467ce791db9ae.1208162224@thinkpadL \
    --to=jyoung5@us.ibm.com \
    --cc=hollisb@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=kvm-ppc-devel@lists.sourceforge.net \
    /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