Add GDB and GDB Server to bootstrap files
[vpp.git] / build-root / vagrant / bootstrap.centos7.sh
1
2 # Standard update + upgrade dance
3 yum check-update
4 yum update -y
5
6 # Install build tools
7 yum groupinstall 'Development Tools' -y
8 yum install openssl-devel -y
9 yum install glibc-static -y
10
11 # Install development tools
12 yum install gdb -y
13 yum install gdbserver -y
14
15 # Install jdk and maven
16 yum install -y java-1.8.0-openjdk-devel
17
18 # Install EPEL
19 yum install -y epel-release
20
21 # Install components to build Ganglia modules
22 yum install -y apr-devel
23 yum install -y --enablerepo=epel libconfuse-devel
24 yum install -y --enablerepo=epel ganglia-devel
25
26 # PCIutils
27 yum install -y pciutils
28
29 # Load the uio kernel module
30 modprobe uio_pci_generic
31
32 echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf
33
34 # Setup for hugepages using upstart so it persists across reboots
35 sysctl -w vm.nr_hugepages=1024
36 echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf
37 mkdir -p /mnt/huge
38 echo "hugetlbfs       /mnt/huge  hugetlbfs       defaults        0 0" >> /etc/fstab
39 mount /mnt/huge
40
41 # Setup the vpp code
42 cd ~vagrant/
43 sudo -u vagrant mkdir git
44 cd git/
45
46 # Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
47 [ -d vpp ] && rm -rf vpp
48 sudo -H -u vagrant git clone /vpp
49 cd vpp
50
51 # Initial vpp build
52 if [ -d build-root ]; then
53   # Bootstrap vpp
54   cd build-root/
55   sudo -H -u vagrant ./bootstrap.sh
56
57   # Build vpp
58   sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages
59   cd ~vagrant/
60   cat /vagrant/README
61 fi