2016-04-07 10:04:16 +07:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure(2) do |config|
|
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
# What box should we base this build on?
|
|
|
|
config.vm.box = "ubuntu/xenial64"
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
#######################################################################
|
|
|
|
# THIS REQUIRES YOU TO INSTALL A PLUGIN. RUN THE COMMAND BELOW...
|
|
|
|
#
|
|
|
|
# $ vagrant plugin install vagrant-disksize
|
|
|
|
#
|
|
|
|
# Default images are not big enough to build Armbian.
|
|
|
|
config.disksize.size = "40GB"
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
#######################################################################
|
2017-01-14 14:42:20 -07:00
|
|
|
# We could sync more folders (that *seems* like the best way to go),
|
2017-01-04 02:57:03 -07:00
|
|
|
# but in many cases builds fail because hardlinks are not supported.
|
|
|
|
# So, a more failproof approach is to just use a larger disk.
|
2017-01-14 14:42:20 -07:00
|
|
|
#
|
|
|
|
# Following the directory structure outlined here:
|
|
|
|
# https://docs.armbian.com/Developer-Guide_Build-Process/#directory-structure
|
|
|
|
|
|
|
|
# So we don't have to download the code a 2nd time.
|
|
|
|
config.vm.synced_folder ".", "/home/ubuntu/lib"
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
# Share folders with the host to make it easy to get our images out.
|
2017-01-14 14:42:20 -07:00
|
|
|
config.vm.synced_folder "../output", "/home/ubuntu/output", create: true
|
|
|
|
|
|
|
|
# Bring over your customizations.
|
|
|
|
config.vm.synced_folder "../userpatches", "/home/ubuntu/userpatches", create: true
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
|
|
vb.name = "Armbian Builder"
|
|
|
|
vb.gui = true
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
# Tweak these to fit your needs.
|
|
|
|
vb.memory = "8192"
|
|
|
|
vb.cpus = "4"
|
2016-04-07 10:04:16 +07:00
|
|
|
|
2017-01-04 02:57:03 -07:00
|
|
|
end
|
|
|
|
end
|