Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.