-
-
Save chaeplin/5e23241512fabbef85b2744d2b9e9074 to your computer and use it in GitHub Desktop.
Cross-compile Vagrant box for EdgeRouter
This file contains 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
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