Skip to content

Instantly share code, notes, and snippets.

@chaeplin
Forked from evianzhow/Vagrantfile
Created September 7, 2017 14:28
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 chaeplin/5e23241512fabbef85b2744d2b9e9074 to your computer and use it in GitHub Desktop.
Save chaeplin/5e23241512fabbef85b2744d2b9e9074 to your computer and use it in GitHub Desktop.
Cross-compile Vagrant box for EdgeRouter
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y qemu-system
# See https://people.debian.org/~aurel32/qemu/mips/ for different archs
wget -nv https://people.debian.org/~aurel32/qemu/mips/vmlinux-3.2.0-4-5kc-malta
wget -nv https://people.debian.org/~aurel32/qemu/mips/debian_wheezy_mips_standard.qcow2
sudo chown vagrant:vagrant vmlinux-3.2.0-4-5kc-malta
sudo chown vagrant:vagrant debian_wheezy_mips_standard.qcow2
sudo sh -c 'echo "qemu-system-mips64 -M malta -kernel $HOME/vmlinux-3.2.0-4-5kc-malta -hda $HOME/debian_wheezy_mips_standard.qcow2 -append "root=/dev/sda1 console=ttyS0" -nographic\n" >> /etc/bash.bashrc'
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment