Skip to content

Instantly share code, notes, and snippets.

@kblomqvist
Last active December 19, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kblomqvist/5870102 to your computer and use it in GitHub Desktop.
Save kblomqvist/5870102 to your computer and use it in GitHub Desktop.
Vagrantfile to install AVR32 Toolchain
# -*- 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