mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-04 06:10:16 +03:00
support/misc: Adding Vagrant file for provisioning
This patch adds a Vagrant file to buildroot. With this file you can provision a complete buildroot developing environment in minutes on all major platforms (Linux/Mac/Windows). [Peter: bump to 2GB RAM, hardcode Buildroot release, add unzip, drop website update and tweak manual text as suggested by Yann] Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
e6d1a2073b
commit
778026b94d
56
support/misc/Vagrantfile
vendored
Normal file
56
support/misc/Vagrantfile
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
################################################################################
|
||||
#
|
||||
# Vagrantfile
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Buildroot version to use
|
||||
RELEASE='2015.11.1'
|
||||
|
||||
### Change here for more memory/cores ###
|
||||
VM_MEMORY=2048
|
||||
VM_CORES=1
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'ubuntu/trusty64'
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx['memsize'] = VM_MEMORY
|
||||
v.vmx['numvcpus'] = VM_CORES
|
||||
end
|
||||
|
||||
config.vm.provider :virtualbox do |v, override|
|
||||
v.memory = VM_MEMORY
|
||||
v.cpus = VM_CORES
|
||||
|
||||
required_plugins = %w( vagrant-vbguest )
|
||||
required_plugins.each do |plugin|
|
||||
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision 'shell' do |s|
|
||||
s.inline = 'echo Setting up machine name'
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx['displayname'] = "Buildroot #{RELEASE}"
|
||||
end
|
||||
|
||||
config.vm.provider :virtualbox do |v, override|
|
||||
v.name = "Buildroot #{RELEASE}"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision 'shell', inline:
|
||||
"sudo dpkg --add-architecture i386
|
||||
sudo apt-get -q update
|
||||
sudo apt-get -q -y install build-essential libncurses5-dev \
|
||||
git bzr cvs mercurial subversion libc6:i386 unzip
|
||||
sudo apt-get -q -y autoremove
|
||||
sudo apt-get -q -y clean"
|
||||
|
||||
config.vm.provision 'shell', privileged: false, inline:
|
||||
"echo 'Downloading and extracting buildroot #{RELEASE}'
|
||||
wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz
|
||||
tar axf buildroot-#{RELEASE}.tar.gz"
|
||||
end
|
||||
Reference in New Issue
Block a user