Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/microtvm/reference-vm/zephyr/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
Vagrant.configure("2") do |config|
config.vm.box = "tlcpack/microtvm-zephyr-2.5"

if ENV.has_key?("TVM_RVM_NUM_CORES")
num_cores = ENV["TVM_RVM_NUM_CORES"]
else
num_cores = 2
end

if ENV.has_key?("TVM_RVM_RAM_BYTES")
ram_bytes = ENV["TVM_RVM_RAM_BYTES"]
else
ram_bytes = 2048
end

tvm_home = "../../../.."
dirs_to_mount = [Pathname.new(Pathname.new(tvm_home).expand_path())]
if ENV.has_key?("TVM_PROJECT_DIR") then
Expand All @@ -40,6 +52,8 @@ Vagrant.configure("2") do |config|
vm_name = "microtvm-#{Time.now.tv_sec}"
config.vm.provider "virtualbox" do |vb, overrides|
vb.name = vm_name
vb.cpus = num_cores
vb.memory = ram_bytes
vb.customize ["modifyvm", :id, "--usb", "on"]
vb.customize ["modifyvm", :id, "--usbehci", "on"]
vb.customize ["modifyvm", :id, "--usbxhci", "on"]
Expand All @@ -50,6 +64,8 @@ Vagrant.configure("2") do |config|

config.vm.provider "parallels" do |prl, overrides|
prl.name = vm_name
prl.cpus = num_cores
prl.memory = ram_bytes
prl.update_guest_tools = true
prl.customize ["set", :id, "--support-usb30", "on"]
dirs_to_mount.each do |d|
Expand All @@ -58,6 +74,8 @@ Vagrant.configure("2") do |config|
end

config.vm.provider "vmware_desktop" do |vm, overrides|
vm.cpus = num_cores
vm.memory = ram_bytes
vm.vmx["usb_xhci.present"] = "TRUE"
vm.vmx["usb.present"] = "TRUE"
vm.vmx["ehci.present"] = "TRUE"
Expand Down