diff options
-rw-r--r-- | Vagrantfile | 78 | ||||
-rw-r--r-- | bootstrap.sh | 25 |
2 files changed, 103 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..19a4ea9 --- /dev/null +++ b/Vagrantfile | |||
@@ -0,0 +1,78 @@ | |||
1 | # -*- mode: ruby -*- | ||
2 | # vi: set ft=ruby : | ||
3 | |||
4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure | ||
5 | # configures the configuration version (we support older styles for | ||
6 | # backwards compatibility). Please don't change it unless you know what | ||
7 | # you're doing. | ||
8 | Vagrant.configure(2) do |config| | ||
9 | # The most common configuration options are documented and commented below. | ||
10 | # For a complete reference, please see the online documentation at | ||
11 | # https://docs.vagrantup.com. | ||
12 | |||
13 | # Every Vagrant development environment requires a box. You can search for | ||
14 | # boxes at https://atlas.hashicorp.com/search. | ||
15 | config.vm.box = "drmyersii/ubuntu-desktop-14.04-x64" | ||
16 | |||
17 | # Disable automatic box update checking. If you disable this, then | ||
18 | # boxes will only be checked for updates when the user runs | ||
19 | # `vagrant box outdated`. This is not recommended. | ||
20 | # config.vm.box_check_update = false | ||
21 | |||
22 | config.vm.provision :shell, path: "bootstrap.sh" | ||
23 | |||
24 | # use the desktop! | ||
25 | #config.vm.provider :virtualbox do |vb| | ||
26 | # vb.gui = true | ||
27 | #end | ||
28 | |||
29 | # Create a forwarded port mapping which allows access to a specific port | ||
30 | # within the machine from a port on the host machine. In the example below, | ||
31 | # accessing "localhost:8080" will access port 80 on the guest machine. | ||
32 | # config.vm.network "forwarded_port", guest: 80, host: 8080 | ||
33 | |||
34 | # Create a private network, which allows host-only access to the machine | ||
35 | # using a specific IP. | ||
36 | # config.vm.network "private_network", ip: "192.168.33.10" | ||
37 | |||
38 | # Create a public network, which generally matched to bridged network. | ||
39 | # Bridged networks make the machine appear as another physical device on | ||
40 | # your network. | ||
41 | # config.vm.network "public_network" | ||
42 | |||
43 | # Share an additional folder to the guest VM. The first argument is | ||
44 | # the path on the host to the actual folder. The second argument is | ||
45 | # the path on the guest to mount the folder. And the optional third | ||
46 | # argument is a set of non-required options. | ||
47 | # config.vm.synced_folder "../data", "/vagrant_data" | ||
48 | |||
49 | # Provider-specific configuration so you can fine-tune various | ||
50 | # backing providers for Vagrant. These expose provider-specific options. | ||
51 | # Example for VirtualBox: | ||
52 | # | ||
53 | # config.vm.provider "virtualbox" do |vb| | ||
54 | # # Display the VirtualBox GUI when booting the machine | ||
55 | # vb.gui = true | ||
56 | # | ||
57 | # # Customize the amount of memory on the VM: | ||
58 | # vb.memory = "1024" | ||
59 | # end | ||
60 | # | ||
61 | # View the documentation for the provider you are using for more | ||
62 | # information on available options. | ||
63 | |||
64 | # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies | ||
65 | # such as FTP and Heroku are also available. See the documentation at | ||
66 | # https://docs.vagrantup.com/v2/push/atlas.html for more information. | ||
67 | # config.push.define "atlas" do |push| | ||
68 | # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" | ||
69 | # end | ||
70 | |||
71 | # Enable provisioning with a shell script. Additional provisioners such as | ||
72 | # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the | ||
73 | # documentation for more information about their specific syntax and use. | ||
74 | # config.vm.provision "shell", inline: <<-SHELL | ||
75 | # sudo apt-get update | ||
76 | # sudo apt-get install -y apache2 | ||
77 | # SHELL | ||
78 | end | ||
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..111b248 --- /dev/null +++ b/bootstrap.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | # setup as described here: http://gnuarmeclipse.livius.net/blog/toolchain-install/#GNULinux | ||
4 | |||
5 | # tools for running 32-bit binaries | ||
6 | apt-get update | ||
7 | sudo apt-get install -y lib32z1 lib32ncurses5 lib32bz2-1.0 | ||
8 | |||
9 | # eclipse IDE | ||
10 | # sudo apt-get install -y eclipse | ||
11 | |||
12 | # download the compiler | ||
13 | wget -O /tmp/gcc-arm.tar.bz2 https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q1-update/+download/gcc-arm-none-eabi-4_9-2015q1-20150306-linux.tar.bz2 | ||
14 | |||
15 | # expand and add it to the path (yes, I know it says don't ever do this - but this is a Vagrant box ;) | ||
16 | cd /usr/local | ||
17 | sudo tar xjf /tmp/gcc-arm.tar.bz2 | ||
18 | |||
19 | # cd to the /vagrant dir on login | ||
20 | echo "cd /vagrant" >> /home/vagrant/.bashrc | ||
21 | |||
22 | # set up path to arm gcc on login | ||
23 | echo "export PATH=/usr/local/gcc-arm-none-eabi-4_9-2015q1/bin:$PATH" >> /home/vagrant/.bashrc | ||
24 | |||
25 | |||