Skip to content

Instantly share code, notes, and snippets.

@whoisjake
Created March 26, 2014 16:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whoisjake/9787007 to your computer and use it in GitHub Desktop.
Save whoisjake/9787007 to your computer and use it in GitHub Desktop.
Vagrant file that will load an entire Spark development hacking environment. Download this raw and rename it to Vagrantfile
$script = <<SCRIPT
apt-get update --fix-missing
apt-get install -y python-software-properties
add-apt-repository ppa:terry.guo/gcc-arm-embedded
apt-get update
apt-get install -y build-essential
apt-get install -y gcc-arm-none-eabi
apt-get install -y dfu-util
apt-get install -y git-core
cd /tmp
wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz
cd /usr/local && tar --strip-components 1 -xzf /tmp/node-v0.10.26-linux-x64.tar.gz
npm install -g spark-cli --silent
mkdir -p /home/vagrant/src
cd /home/vagrant/src
git clone https://github.com/spark/core-firmware.git
git clone https://github.com/spark/core-communication-lib.git
git clone https://github.com/spark/core-common-lib.git
chown vagrant:vagrant -R /home/vagrant
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provision "shell", inline: $script
end
@whoisjake
Copy link
Author

Gotta rename it from Vagrantfile.spark to Vagrantfile:

mv Vagrantfile.spark Vagrantfile

Download: https://www.virtualbox.org/wiki/Downloads
Download: http://www.vagrantup.com/downloads.html

run:

vagrant up
vagrant ssh

You'll be dropped into an Ubuntu ssh session with all the tools necessary...

cd src/core-firmware/build
make

You'll have the Tinker app firmware built!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment