]> git.donarmstrong.com Git - qmk_firmware.git/blob - Vagrantfile
Add makefile target 'show_build_options' and 'show_all_features' (#5048)
[qmk_firmware.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 Vagrant.configure(2) do |config|
5   # define a name instead of just 'default'
6   config.vm.define "qmk_firmware"
7
8   # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
9   config.vm.box = "bento/ubuntu-16.04"
10
11   # This section allows you to customize the Virtualbox VM
12   # settings, ie showing the GUI or upping the memory
13   # or cores if desired
14   config.vm.provider "virtualbox" do |vb|
15     # Hide the VirtualBox GUI when booting the machine
16     vb.gui = false
17     # Uncomment the below lines if you want to program
18     # your Teensy via the VM rather than your host OS
19     #vb.customize ['modifyvm', :id, '--usb', 'on']
20     #vb.customize ['usbfilter', 'add', '0',
21     #         '--target', :id,
22     #         '--name', 'teensy',
23     #         '--vendorid', '0x16c0',
24     #         '--productid','0x0478'
25     #        ]
26     # Customize the amount of memory on the VM:
27     vb.memory = "512"
28     # Uncomment the below lines if you have time sync
29     # issues with make and incremental builds
30     #vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
31   end
32
33   # This section allows you to customize the VMware VM
34   # settings, ie showing the GUI or upping the memory
35   # or cores if desired
36   config.vm.provider "vmware_workstation" do |vmw|
37     # Hide the VMware GUI when booting the machine
38     vmw.gui = false
39
40     # Customize the amount of memory on the VM:
41     vmw.memory = "512"
42   end
43
44   config.vm.provider "vmware_fusion" do |vmf|
45     # Hide the vmfare GUI when booting the machine
46     vmf.gui = false
47
48     # Customize the amount of memory on the VM:
49     vmf.memory = "512"
50   end
51
52   # Docker provider pulls from hub.docker.com respecting docker.image if
53   # config.vm.box is nil. Note that this bind-mounts from the current dir to
54   # /vagrant in the guest, so unless your UID is 1000 to match vagrant in the
55   # image, you'll need to: chmod -R a+rw .
56   config.vm.provider "docker" do |docker, override|
57     override.vm.box = nil
58     docker.image = "jesselang/debian-vagrant:jessie"
59     docker.has_ssh = true
60   end
61
62   # This script ensures the required packages for AVR programming are installed
63   # It also ensures the system always gets the latest updates when powered on
64   # If this causes issues you can run a 'vagrant destroy' and then
65   # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
66   # non-updated box and then attempt to troubleshoot or open a Github issue
67   config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
68
69   config.vm.post_up_message = <<-EOT
70
71   Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
72   located at /vagrant
73   To compile the .hex files use make command inside this directory, e.g.
74      cd /vagrant
75      make <keyboard>:default
76
77   Examples:
78      make planck/rev4:default:dfu
79      make planck:default
80
81   EOT
82 end