XEN FROM SCRATCH

slackware | from source | multilib | xen-nox | tarballs

EVEN MORE DEPRECATED

there’s now a package for that.

15.0 > System > xen-nox (4.16.1) https://slackbuilds.org/repository/15.0/system/xen-nox/

and here’s how the tarballs where prepared.

Tarballs for XEN and QEMU-XEN https://pub.nethence.com/tarballs/xen-nox


DEPRECATED

see the new guide for building all this on current.

this guide was working well a few years ago with slackware 14.2. but with recent XEN versions, python 3 is required. also, we now have GCC 11 in slackware current. also, python-ninja is now required by xen or qemu-xen.


How many cores?

Compilation was done on some enterprise-class IBM servers dating 2007 with 4x4 Xeon processors and 96 GB to 128 GB of RAM. For 16 cores in total and with 1 thread per core (lscpu), I obtained the fastest results with -j16 for xen versus -j24 for tools and stubdom. Anyway, tune the number of make jobs according to your hardware.

Overall requirements (xen + tools + stubdom)

assuming the essential tools for building software installed already

in case you’re running a minimal system

    slackpkg install \
        bison \
        dev86 \
        cmake-3 \
        flex \
        gc \
        git \
        glibc-2 \
        libarchive \
        lzo \
        openssl \
        patch-2 \
        pixman \
        pciutils \
        python3 \
        texinfo \
        zlib-1

    pexpect \
    ptyprocess \
    python3-ninja \
    python3-skbuild \

    syslinux \
    ucl \
    upx \

    wheel \

and additional packages from SBo

    sbopkg -i acpica
    sbopkg -i yajl

Building the micro-kernel

ver=4.x.x

fetch the latest release tarball

wget https://downloads.xenproject.org/release/xen/$ver/xen-$ver.tar.gz
wget https://downloads.xenproject.org/release/xen/$ver/xen-$ver.tar.gz.sig
gpg --keyserver keyserver.ubuntu.com --recv-key 57E82BD9
gpg xen-$ver.tar.gz.sig

with fingerpring

Primary key fingerprint: 23E3 222C 145F 4475 FA80  60A7 83FE 14C9 57E8 2BD9

extract and build the release with the good old cxenstored instead of oxenstored

tar xzf xen-$ver.tar.gz
cd xen-$ver/
./configure \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --with-xenstored=xenstored \
  --disable-sdl \
  --disable-xsmpolicy \
  --disable-systemd \
  --disable-seabios \
  --disable-stubdom \
  --disable-ioemu-stubdom \
  --disable-pv-grub \
  --disable-xenstore-stubdom \
  --disable-ocamltools \
  --disable-qemu-traditional \
  --disable-ovmf \
  --with-extra-qemuu-configure-args="--sysconfdir=/etc --audio-drv-list= --disable-slirp --disable-blobs --without-default-features"

and since we are using a minimal system

--disable-docs \

more options

#  --disable-rombios already disabled by --disable-qemu-traditional
#  --disable-debug
#  --disable-pvshim

finally proceed with the build!

echo $MAKEFLAGS
# make clean-xen >/dev/null && echo CLEAN
time make xen > ../xen.log && echo BUILT
# 0m34.370s on bravo

make install-xen > ../install-xen-${HOSTNAME%%.*}.log && echo DEPLOYED

ln -s boot/xen.gz /xen.gz
cd ../

Multilib

slackware-multilib

Requirements for tools

slackpkg install gettext-tools pkg-config glib2 pcre google-go-lang

Fetch ipxe & seabios GIT repos through https://

export PATH=$PATH:/usr/lib64/bcc
which bcc-cpp

installing the latest ACPICA for xen tools to build

wget https://acpica.org/sites/acpica/files/acpica-unix2-20210730.tar.gz
tar xzf acpica-unix2-20210730.tar.gz
cd acpica-unix2-20210730/

echo $MAKEFLAGS
make > ../acpica.log && echo BUILT

make install > ../make.acpica.install.log && echo INSTALLED
cd ../

Building the tools

(configure was done above)

#make distclean
#time make world > ../world.$HOSTNAME.log && echo WORLD

#make clean-tools

echo $MAKEFLAGS
time make tools > ../tools.log && echo BUILT
make install-tools > ../install-tools.log && echo DEPLOYED

#make clean-stubdom
#time make stubdom > stubdom.log && echo BUILT
#time make install-stubdom

cp -pi /etc/ld.so.conf /etc/ld.so.conf.dist
cat >> /etc/ld.so.conf <<-EOF
/usr/local/lib
EOF
cat /etc/ld.so.conf
ldconfig

Resources

Compiling Xen https://wiki.xenproject.org/wiki/Compiling_Xen

Compiling Xen From Source https://wiki.xenproject.org/wiki/Compiling_Xen_From_Source

Xen Project Repositories https://wiki.xenproject.org/wiki/Xen_Project_Repositories


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2022 Pierre-Philipp Braun