You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.9 KiB

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