-
Notifications
You must be signed in to change notification settings - Fork 0
OpenXT Build Machine
The recommended OpenXT build environment is 32-bit debian squeeze. For those that are using 64-bit and/or newer distros, one way to get a debian squeeze build environment up and running is using linux containers (LXC).
You may follow the instructions to configure LXC, available at: https://wiki.debian.org/LXC
Setup cgroup:
sudo sh -c "echo cgroup /sys/fs/cgroup cgroup defaults 0 0 >> /etc/fstab"
sudo mount /sys/fs/cgroup
Install required packages:
sudo aptitude install lxc
sudo aptitude install bridge-utils libvirt-bin debootstrap
Build 32-bit squeeze container:
sudo MIRROR=http://mirror.steadfast.net/debian lxc-create -n openxt-buildvm-i386 -t debian -- --arch i386 --release squeeze
Setup NAT networking for container:
sudo apt-get install libvirt-bin
sudo virsh net-start default
sudo sed -i 's/lxc.network.type\ =.*/lxc.network.type\ =\ veth/g' /var/lib/lxc/openxt-buildvm-i386/config
sudo sh -c 'echo "lxc.network.flags = up" >> /var/lib/lxc/openxt-buildvm-i386/config'
sudo sh -c 'echo "lxc.network.link = virbr0" >> /var/lib/lxc/openxt-buildvm-i386/config'
Start the container:
sudo lxc-start --name openxt-buildvm-i386
Login to the container with root/root
Get the required packages installed:
apt-get install vim sed wget cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath cpio sudo rpm curl
apt-get install ghc guilt iasl quilt bin86 bcc libsdl1.2-dev liburi-perl genisoimage policycoreutils unzip
Add your user account:
adduser yourusername
Fixup default shell to bash (hit 'n' when prompted):
dpkg-reconfigure dash
Fake uname output for packages using it (cough) xen-tools (cough):
mv /bin/uname /bin/uname.real
echo '#!/bin/bash' > /bin/uname
echo '/bin/uname.real $@ | sed 's/amd64/i686/g' | sed 's/x86_64/i686/g'' >> /bin/uname
chmod +x /bin/uname
Switch to your user account:
su yourusername
Download the repo:
git clone git://github.com/OpenXT/openxt.git
cd openxt
cp example-config .config
Generate certs:
mkdir certs # make a certs directory inside the openxt directory
openssl genrsa -out certs/prod-cakey.pem 2048
openssl genrsa -out certs/dev-cakey.pem 2048
openssl req -new -x509 -key certs/prod-cakey.pem -out certs/prod-cacert.pem -days 1095
openssl req -new -x509 -key certs/dev-cakey.pem -out certs/dev-cacert.pem -days 1095
Fixup cert paths in .config:
REPO_PROD_CACERT="/home/yourusername/openxt/certs/prod-cacert.pem"
REPO_DEV_CACERT="/home/yourusername/openxt/certs/dev-cacert.pem"
REPO_DEV_SIGNING_CERT="/home/yourusername/openxt/certs/dev-cacert.pem"
REPO_DEV_SIGNING_KEY="/home/yourusername/openxt/certs/dev-cakey.pem"
Make output directory:
mkdir ~/openxt-build
Setup OE:
./do_build.sh -s setupoe
Make sure OE builds for x32 (running kernel uname shows x86_64):
echo 'BUILD_ARCH="i686"' >> ~/openxt/build/oe/xenclient/conf/local.conf
Kick off build:
./do_build.sh -d ~/openxt-build | tee -a build.log