-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a vagrant file for easy assessment of the example
- Loading branch information
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# All Vagrant configuration is done below. The "2" in Vagrant.configure | ||
# configures the configuration version (we support older styles for | ||
# backwards compatibility). Please don't change it unless you know what | ||
# you're doing. | ||
Vagrant.configure(2) do |config| | ||
# The most common configuration options are documented and commented below. | ||
# For a complete reference, please see the online documentation at | ||
# https://docs.vagrantup.com. | ||
|
||
# Every Vagrant development environment requires a box. You can search for | ||
# boxes at https://atlas.hashicorp.com/search. | ||
config.vm.box = "bento/ubuntu-12.04" | ||
|
||
# Disable automatic box update checking. If you disable this, then | ||
# boxes will only be checked for updates when the user runs | ||
# `vagrant box outdated`. This is not recommended. | ||
# config.vm.box_check_update = false | ||
|
||
# Create a forwarded port mapping which allows access to a specific port | ||
# within the machine from a port on the host machine. In the example below, | ||
# accessing "localhost:8080" will access port 80 on the guest machine. | ||
# config.vm.network "forwarded_port", guest: 80, host: 8080 | ||
|
||
# Create a private network, which allows host-only access to the machine | ||
# using a specific IP. | ||
# config.vm.network "private_network", ip: "192.168.33.10" | ||
|
||
# Create a public network, which generally matched to bridged network. | ||
# Bridged networks make the machine appear as another physical device on | ||
# your network. | ||
# config.vm.network "public_network" | ||
|
||
# Share an additional folder to the guest VM. The first argument is | ||
# the path on the host to the actual folder. The second argument is | ||
# the path on the guest to mount the folder. And the optional third | ||
# argument is a set of non-required options. | ||
# config.vm.synced_folder "../data", "/vagrant_data" | ||
|
||
# Provider-specific configuration so you can fine-tune various | ||
# backing providers for Vagrant. These expose provider-specific options. | ||
# Example for VirtualBox: | ||
# | ||
config.vm.provider "virtualbox" do |vb| | ||
# Display the VirtualBox GUI when booting the machine | ||
#vb.gui = true | ||
|
||
# Customize the amount of memory on the VM: | ||
vb.memory = "4096" | ||
|
||
# Limit CPU load | ||
#vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"] | ||
|
||
# Customize number of CPU cores | ||
vb.cpus = 3 | ||
|
||
vb.customize ["modifyvm", :id, "--usb", "on"] | ||
vb.customize ["modifyvm", :id, "--usbehci", "on"] | ||
end | ||
# | ||
# View the documentation for the provider you are using for more | ||
# information on available options. | ||
|
||
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies | ||
# such as FTP and Heroku are also available. See the documentation at | ||
# https://docs.vagrantup.com/v2/push/atlas.html for more information. | ||
# config.push.define "atlas" do |push| | ||
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" | ||
# end | ||
|
||
# Enable provisioning with a shell script. Additional provisioners such as | ||
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the | ||
# documentation for more information about their specific syntax and use. | ||
# config.vm.provision "shell", inline: <<-SHELL | ||
# sudo apt-get update | ||
# sudo apt-get install -y apache2 | ||
# SHELL | ||
config.vm.provision :shell, path: "bootstrap.sh", privileged: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y git subversion binutils-dev gettext flex bison pkg-config \ | ||
libglib2.0-dev nasm liblua5.1-0-dev libsigc++-2.0-dev \ | ||
texinfo expat libexpat1-dev python2.7-dev \ | ||
automake libusb-dev g++ | ||
mkdir projects | ||
( | ||
cd projects | ||
git clone --branch eurecom/avatar https://github.com/eurecom-s3/s2e.git | ||
mkdir s2e-build | ||
( | ||
cd s2e-build | ||
make -f ../s2e/Makefile | ||
) | ||
git clone --branch eurecom/wip https://github.com/eurecom-s3/gdb.git | ||
mkdir gdb-build | ||
( | ||
cd gdb-build | ||
../gdb/configure --with-python --with-expat=yes --target=arm-none-eabi | ||
make -j4 | ||
) | ||
|
||
# Install Python3 and dependencies | ||
sudo apt-get install -y python3 python3-setuptools | ||
# pip version < 8 required for Python 3.2 | ||
wget https://github.com/pypa/pip/archive/7.1.2.tar.gz | ||
tar -xzf 7.1.2.tar.gz | ||
cd pip-7.1.2/ | ||
sudo python3 setup.py install | ||
cd .. | ||
|
||
# Download Avatar and Avatar samples | ||
git clone --branch master https://github.com/eurecom-s3/avatar-python | ||
cd avatar-python | ||
git checkout cbfaa6bcc8238a580833c02171ee860656daa906 | ||
cd .. | ||
#sudo pip3.2 install git+https://github.com/eurecom-s3/avatar-python.git#egg=avatar | ||
git clone --branch master https://github.com/eurecom-s3/avatar-samples | ||
|
||
git clone --branch eurecom/wip https://github.com/eurecom-s3/openocd | ||
( | ||
cd openocd | ||
./bootstrap | ||
./configure | ||
make | ||
sudo make install | ||
) | ||
) |