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