1 ################################################################################
5 ################################################################################
7 # Buildroot version to use
10 ### Change here for more memory/cores ###
14 Vagrant.configure('2') do |config|
15 config.vm.box = 'bento/ubuntu-16.04'
17 config.vm.provider :vmware_fusion do |v, override|
18 v.vmx['memsize'] = VM_MEMORY
19 v.vmx['numvcpus'] = VM_CORES
22 config.vm.provider :virtualbox do |v, override|
26 required_plugins = %w( vagrant-vbguest )
27 required_plugins.each do |plugin|
28 system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
32 config.vm.provision 'shell' do |s|
33 s.inline = 'echo Setting up machine name'
35 config.vm.provider :vmware_fusion do |v, override|
36 v.vmx['displayname'] = "Buildroot #{RELEASE}"
39 config.vm.provider :virtualbox do |v, override|
40 v.name = "Buildroot #{RELEASE}"
44 config.vm.provision 'shell', inline:
45 "sudo dpkg --add-architecture i386
46 sudo apt-get -q update
47 sudo apt-get purge -q -y snapd lxcfs lxd ubuntu-core-launcher snap-confine
48 sudo apt-get -q -y upgrade
49 sudo apt-get -q -y install build-essential libncurses5-dev \
50 git bzr cvs mercurial subversion libc6:i386 unzip bc
51 sudo apt-get -q -y autoremove
52 sudo apt-get -q -y clean
53 sudo update-locale LC_ALL=C"
55 config.vm.provision 'shell', privileged: false, inline:
56 "echo 'Downloading and extracting buildroot #{RELEASE}'
57 wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz
58 tar axf buildroot-#{RELEASE}.tar.gz"