Last active
December 19, 2015 00:39
-
-
Save kblomqvist/5870102 to your computer and use it in GitHub Desktop.
Vagrantfile to install AVR32 Toolchain
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# vagrant box add wheezy32 https://dl.dropboxusercontent.com/u/78793012/vagrantup/wheezy32.box | |
$provisioner = <<SCRIPT | |
echo "#!/bin/bash | |
function InstallAVR32 { | |
if [ '$(which /opt/avr32-tools/bin/avr32-gcc)' ]; then | |
echo '-- Already installed.' | |
return | |
fi | |
apt-get install unzip -y -qq | |
mkdir -p ~/temp | |
cd ~/temp | |
wget -q http://www.atmel.com/Images/avr32-gnu-toolchain-3.4.2.435-linux.any.x86.tar.gz | |
wget -q http://www.atmel.com/Images/atmel-headers-6.1.3.1475.zip | |
tar -xzf avr32-gnu-toolchain-3.4.2.435-linux.any.x86.tar.gz | |
unzip -q atmel-headers-6.1.3.1475.zip | |
mv avr32-gnu-toolchain-linux_x86 /opt/avr32-tools | |
mv atmel-headers-6.1.3.1475/avr32 /opt/avr32-tools/avr32/include | |
cd && rm -rf ~/temp | |
echo 'export PATH=$PATH:/opt/avr32-tools/bin' >> /etc/profile | |
} | |
echo 'Installing AVR32 Toolchain...'; InstallAVR32 | |
exit 0" | /bin/bash | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "wheezy32" | |
config.vm.provision :shell, :inline => $provisioner # run as root | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment