blob: c89f098ce2518057b88ee68d31c4c975f9cb1b16 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# Standard update + upgrade dance
2apt-get update
3apt-get upgrade -y
4
5# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
6
7sudo update-alternatives --install /bin/sh sh /bin/bash 100
8
9# Install build tools
10apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper
11
12# Install other stuff
13# apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
14
15# Install uio
16apt-get install -y linux-image-extra-`uname -r`
17
18# Install jdk and maven
19apt-get install -y openjdk-7-jdk
20# $$$ comment out for the moment
21# apt-get install -y --force-yes maven3
22
23# Install debian packaging tools
24apt-get install -y debhelper dkms
25
26# Setup for hugepages using upstart so it persists across reboots
27echo "vm.nr_hugepages=1024" >> /etc/sysctl.d/20-hugepages.conf
28sysctl --system
29
30cat << EOF > /etc/init/hugepages.conf
31start on runlevel [2345]
32
33task
34
35script
36 mkdir -p /run/hugepages/kvm || true
37 rm -f /run/hugepages/kvm/* || true
38 rm -f /dev/shm/* || true
39 mount -t hugetlbfs nodev /run/hugepages/kvm
40end script
41EOF
42
43# Make sure we run that hugepages.conf right now
44start hugepages
45
46# Setup the vpp code
47cd ~vagrant/
48sudo -u vagrant mkdir git
49cd git/
50
51# You will need to alter this line to reflect reality.
52sudo -H -u vagrant git clone /vpp
53cd vpp/
54
55# Initial vpp build
56if [ -d build-root ]; then
57 # Bootstrap vpp
58 cd build-root/
59 sudo -H -u vagrant ./bootstrap.sh
60
61 # Build vpp
62 sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-deb
63
64 # Stick the dpdk module in the canonical place
65 cp ./install-vpp_debug-native/dpdk/kmod/igb_uio.ko /lib/modules/`uname -r`/kernel/drivers/uio/
66 depmod
67
68 # Load igb_uio into the kernel
69 modprobe igb_uio
70
71 # Make sure igb_uio loads at boot time
72 # Make sure uio loads at boot time
73 echo igb_uio >> /lib/modprobe.d/igb_uio.conf
74 cd ~vagrant/
75 cat /vagrant/README
76
77fi