[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8/8] raisin: RFC Add blktap2 as an external tree



On Thu, 16 Apr 2015, George Dunlap wrote:
> Until we start hosting the blktap repo on xenbits, use the one from github.
> 
> Also, we need to pass in the directories where to find the
> libblktapctl headers in the Xen build.
> 
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> ---
> Note: For now use the "upstream" XenServer repo.
> 
> Also, to build with this you need the patches to allow Xen to use an 
> out-of-tree blktap,
> which can be found here:
> 
> git://xenbits.xen.org/people/gdunlap/xen.git  out/blktap25/rfc-v2
> 
> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> ---
>  components/blktap | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  components/series |  1 +
>  components/xen    |  5 +++++
>  defconfig         |  9 ++++++---
>  4 files changed, 59 insertions(+), 3 deletions(-)
>  create mode 100644 components/blktap
> 
> diff --git a/components/blktap b/components/blktap
> new file mode 100644
> index 0000000..3062b2a
> --- /dev/null
> +++ b/components/blktap
> @@ -0,0 +1,47 @@
> +#!/usr/bin/env bash
> +
> +function blktap_check_package() {
> +    local DEP_Debian_common="build-essential autoconf libtool tar libaio-dev 
> uuid-dev openssl-dev"
> +    local DEP_Debian_x86_32="$DEP_Debian_common"
> +    local DEP_Debian_x86_64="$DEP_Debian_x86_32"
> +    local DEP_Debian_arm32="$DEP_Debian_common"
> +    local DEP_Debian_arm64="$DEP_Debian_arm32"
> +
> +    local DEP_Fedora_common="make gcc python-devel autoconf libtool tar file 
> libaio-devel libuuid-devel openssl-devel"
> +    local DEP_Fedora_x86_32="$DEP_Fedora_common"
> +    local DEP_Fedora_x86_64="$DEP_Fedora_x86_32"
> +
> +    local DEP_CentOS_common="make gcc python-devel autoconf libtool tar file 
> libaio-devel libuuid-devel openssl-devel"
> +    local DEP_CentOS_x86_32="$DEP_Redhat_common"
> +    local DEP_CentOS_x86_64="$DEP_Redhat_x86_32"
> +
> +    echo Checking blktap dependencies
> +    eval check-package \$DEP_"$DISTRO"_"$ARCH"
> +}
> +
> +function blktap_build() {
> +    cd "$BASEDIR"
> +    git-checkout $BLKTAP_URL $BLKTAP_REVISION blktap-dir
> +    cd blktap-dir
> +    ./autogen.sh
> +    ./configure --prefix=$PREFIX
> +    $MAKE
> +    $MAKE install DESTDIR="$INST_DIR"
> +    cd "$BASEDIR"
> +}

I think we need to disable the build on architectures other than x86,
see grub for example


> +function blktap_clean() {
> +    cd "$BASEDIR"
> +    if [[ -d blktap-dir ]]
> +    then
> +     rm -rf blktap-dir
> +    fi
> +}
> +
> +function blktap_configure() {
> +    :
> +}
> +
> +function blktap_unconfigure() {
> +    :
> +}
> diff --git a/components/series b/components/series
> index 8f614f0..953800a 100644
> --- a/components/series
> +++ b/components/series
> @@ -1,3 +1,4 @@
> +blktap
>  xen
>  qemu
>  grub
> diff --git a/components/xen b/components/xen
> index f2e1254..03a1970 100644
> --- a/components/xen
> +++ b/components/xen
> @@ -29,7 +29,12 @@ function xen_build() {
>      cd "$BASEDIR"
>      git-checkout $XEN_URL $XEN_REVISION xen-dir
>      cd xen-dir
> +    CFLAGS="-I$INST_DIR/$PREFIX/include/blktap 
> -I$INST_DIR/$PREFIX/include/vhd" \
> +    LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \
>      ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386
> +    CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap 
> -I$INST_DIR/$PREFIX/include/vhd" \
> +    LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \
> +    SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \
>      $RAISIN_MAKE
>      $RAISIN_MAKE install DESTDIR="$INST_DIR"
>      cd "$BASEDIR"
> diff --git a/defconfig b/defconfig
> index 4ec8a0b..283e954 100644
> --- a/defconfig
> +++ b/defconfig
> @@ -1,9 +1,9 @@
>  # Config variables for raisin
>  
>  # Components
> -# All components: xen grub libvirt
> -# Core xen functionality: xen
> -DEFAULT_COMPONENTS="xen grub libvirt"
> +# All components: blktap xen grub libvirt
> +# Core xen functionality: xen blktap
> +DEFAULT_COMPONENTS="blktap xen grub libvirt"
>  
>  # Build config
>  ## Make command to run
> @@ -22,6 +22,8 @@ XEN_URL="git://xenbits.xen.org/xen.git"
>  QEMU_URL="git://git.qemu.org/qemu.git"
>  GRUB_URL="git://git.savannah.gnu.org/grub.git"
>  LIBVIRT_URL="git://libvirt.org/libvirt.git"
> +BLKTAP_URL=https://github.com/xapi-project/blktap.git
> +#BLKTAP_URL=git://xenbits.xen.org/blktap.git
>  
>  # Software versions. Leave blank if you want to avoid the build, like
>  # this: GRUB_REVISION=
> @@ -30,3 +32,4 @@ XEN_REVISION="master"
>  QEMU_REVISION="master"
>  GRUB_REVISION="master"
>  LIBVIRT_REVISION="master"
> +BLKTAP_REVISION="blktap2"
> -- 
> 1.9.1
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.