Last active
April 28, 2021 14:50
-
-
Save chp-io/1fcbc69a96cf73fe6353f06b650f8ab8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Notes: | |
# | |
# Builds on Ubuntu 18.04 with gcc-7 | |
############################################################################### | |
# Get deps on Ubuntu | |
############################################################################### | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt-get install -y wget git bcc bin86 gawk bridge-utils iproute2 libcurl4-openssl-dev bzip2 libpci-dev build-essential make gcc clang libc6-dev linux-libc-dev zlib1g-dev libncurses5-dev patch libvncserver-dev libssl-dev libsdl-dev iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev bison flex ocaml-findlib xz-utils gettext libyajl-dev libpixman-1-dev libaio-dev libfdt-dev cabextract libglib2.0-dev autoconf automake libtool libjson-c-dev libfuse-dev liblzma-dev autoconf-archive kpartx python3-dev python3-pip golang python-dev libsystemd-dev nasm | |
############################################################################### | |
# clone and patch | |
############################################################################### | |
git clone git://xenbits.xen.org/xen.git -b stable-4.12 | |
git clone https://github.com/OpenXT/xenclient-oe | |
cd xenclient-oe | |
git checkout 406b0a531c83f8fb9335d1ac8d5816f7695e7694 | |
sed -i 's/17, "VBD3"/16, "VBD3"/g' recipes-extended/xen/files/libxl-blktap3-support.patch | |
sed -i '/^.*"VWIF".*$/d' recipes-extended/xen/files/libxl-blktap3-support.patch | |
sed -i 's/ ?= / = /g' recipes-extended/xen/files/enable-blktap3-within-tree.patch | |
cd ../xen | |
git clone https://github.com/eric-ch/blktap-1 -b openxt-blktap3-dirty tools/blktap3 | |
patch -p1 < ../xenclient-oe/recipes-extended/xen/files/libxl-blktap3-support.patch || true # ignore 1 failed hunk | |
patch -p1 < ../xenclient-oe/recipes-extended/xen/files/blktap3-build-integration.patch | |
patch -p1 < ../xenclient-oe/recipes-extended/xen/files/enable-blktap3-within-tree.patch | |
# More patches: | |
#libxl-blktap3-support.patch | |
#libxl-crypto-key-dir.patch | |
#libxl-blktap3-do-not-destroy-in-use-tapdevs.patch | |
#libxl-blktap3-iso-hotswap.patch | |
#enable-blktap3-within-tree.patch | |
#blktap3-build-integration.patch | |
############################################################################### | |
# compile | |
############################################################################### | |
cd tools/blktap3 | |
./autogen.sh | |
./configure CPPFLAGS="-DTAP_CTL_NO_DEFAULT_CGROUP_SLICE -DOPEN_XT" | |
cd ../.. | |
./configure --disable-stubdom --enable-blktap2 | |
make -j4 dist-xen | |
make -j4 dist-tools | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment