|
From: Anthony L. <an...@co...> - 2008-04-14 14:18:43
|
Jerone Young wrote:
> 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.
>
make sync in kernel/ already does this. Why not just add PPC support there.
Regards,
Anthony Liguori
> Signed-off-by: Jerone Young <jy...@us...>
>
> 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
> _______________________________________________
> kvm-devel mailing list
> kvm...@li...
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
|