blob: 180230109767176f30c8a5226a2ac009d0dc2a5a [file] [log] [blame]
Matt Johnson3b566bb2016-01-11 12:16:46 -08001# Fix grub-pc on Virtualbox with Ubuntu
2export DEBIAN_FRONTEND=noninteractive
3
Ed Warnickecb9cada2015-12-08 15:45:58 -07004# Standard update + upgrade dance
5apt-get update
6apt-get upgrade -y
7
8# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
9
10sudo update-alternatives --install /bin/sh sh /bin/bash 100
11
12# Install build tools
Matt Johnson3b566bb2016-01-11 12:16:46 -080013apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper emacs
Ed Warnickecb9cada2015-12-08 15:45:58 -070014
15# Install other stuff
16# apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
17
18# Install uio
19apt-get install -y linux-image-extra-`uname -r`
20
21# Install jdk and maven
22apt-get install -y openjdk-7-jdk
23# $$$ comment out for the moment
24# apt-get install -y --force-yes maven3
25
26# Install debian packaging tools
27apt-get install -y debhelper dkms
28
29# Setup for hugepages using upstart so it persists across reboots
30echo "vm.nr_hugepages=1024" >> /etc/sysctl.d/20-hugepages.conf
31sysctl --system
32
33cat << EOF > /etc/init/hugepages.conf
34start on runlevel [2345]
35
36task
37
38script
39 mkdir -p /run/hugepages/kvm || true
40 rm -f /run/hugepages/kvm/* || true
41 rm -f /dev/shm/* || true
42 mount -t hugetlbfs nodev /run/hugepages/kvm
43end script
44EOF
45
46# Make sure we run that hugepages.conf right now
47start hugepages
48
49# Setup the vpp code
50cd ~vagrant/
51sudo -u vagrant mkdir git
52cd git/
53
54# You will need to alter this line to reflect reality.
55sudo -H -u vagrant git clone /vpp
56cd vpp/
57
58# Initial vpp build
59if [ -d build-root ]; then
60 # Bootstrap vpp
61 cd build-root/
62 sudo -H -u vagrant ./bootstrap.sh
63
64 # Build vpp
65 sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-deb
66
Ed Warnickeb463ec82015-12-22 20:04:54 -070067 # Install debian packages
68 dpkg -i *.deb
Ed Warnickecb9cada2015-12-08 15:45:58 -070069
Ed Warnickeb463ec82015-12-22 20:04:54 -070070 # Start vpp
71 start vpp
Ed Warnickecb9cada2015-12-08 15:45:58 -070072
Ed Warnickecb9cada2015-12-08 15:45:58 -070073 cd ~vagrant/
74 cat /vagrant/README
75
76fi