mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Add device tree binary image support
This is required for correct emulation of ARM devices
This commit is contained in:
parent
98f2eaed5e
commit
dc1a8d421f
@ -49,6 +49,7 @@ module VagrantPlugins
|
|||||||
@cmd_line = config.cmd_line
|
@cmd_line = config.cmd_line
|
||||||
@emulator_path = config.emulator_path
|
@emulator_path = config.emulator_path
|
||||||
@initrd = config.initrd
|
@initrd = config.initrd
|
||||||
|
@dtb = config.dtb
|
||||||
@graphics_type = config.graphics_type
|
@graphics_type = config.graphics_type
|
||||||
@graphics_autoport = config.graphics_autoport
|
@graphics_autoport = config.graphics_autoport
|
||||||
@graphics_port = config.graphics_port
|
@graphics_port = config.graphics_port
|
||||||
|
@ -202,6 +202,20 @@ module VagrantPlugins
|
|||||||
video.attributes['vram'] = config.video_vram
|
video.attributes['vram'] = config.video_vram
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# dtb
|
||||||
|
if config.dtb
|
||||||
|
dtb = REXML::XPath.first(xml_descr,'/domain/os/dtb')
|
||||||
|
if dtb.nil?
|
||||||
|
dtb = REXML::Element.new('dtb', REXML::XPath.first(xml_descr,'/domain/os'))
|
||||||
|
dtb.text = config.dtb
|
||||||
|
else
|
||||||
|
if dtb.text != config.dtb
|
||||||
|
descr_changed = true
|
||||||
|
dtb.text = config.dtb
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Apply
|
# Apply
|
||||||
if descr_changed
|
if descr_changed
|
||||||
begin
|
begin
|
||||||
|
@ -73,6 +73,7 @@ module VagrantPlugins
|
|||||||
attr_accessor :kernel
|
attr_accessor :kernel
|
||||||
attr_accessor :cmd_line
|
attr_accessor :cmd_line
|
||||||
attr_accessor :initrd
|
attr_accessor :initrd
|
||||||
|
attr_accessor :dtb
|
||||||
attr_accessor :emulator_path
|
attr_accessor :emulator_path
|
||||||
attr_accessor :graphics_type
|
attr_accessor :graphics_type
|
||||||
attr_accessor :graphics_autoport
|
attr_accessor :graphics_autoport
|
||||||
@ -148,6 +149,7 @@ module VagrantPlugins
|
|||||||
@volume_cache = UNSET_VALUE
|
@volume_cache = UNSET_VALUE
|
||||||
@kernel = UNSET_VALUE
|
@kernel = UNSET_VALUE
|
||||||
@initrd = UNSET_VALUE
|
@initrd = UNSET_VALUE
|
||||||
|
@dtb = UNSET_VALUE
|
||||||
@cmd_line = UNSET_VALUE
|
@cmd_line = UNSET_VALUE
|
||||||
@emulator_path = UNSET_VALUE
|
@emulator_path = UNSET_VALUE
|
||||||
@graphics_type = UNSET_VALUE
|
@graphics_type = UNSET_VALUE
|
||||||
@ -433,6 +435,7 @@ module VagrantPlugins
|
|||||||
@kernel = nil if @kernel == UNSET_VALUE
|
@kernel = nil if @kernel == UNSET_VALUE
|
||||||
@cmd_line = '' if @cmd_line == UNSET_VALUE
|
@cmd_line = '' if @cmd_line == UNSET_VALUE
|
||||||
@initrd = '' if @initrd == UNSET_VALUE
|
@initrd = '' if @initrd == UNSET_VALUE
|
||||||
|
@dtb = nil if @dtb == UNSET_VALUE
|
||||||
@graphics_type = 'vnc' if @graphics_type == UNSET_VALUE
|
@graphics_type = 'vnc' if @graphics_type == UNSET_VALUE
|
||||||
@graphics_autoport = 'yes' if @graphics_port == UNSET_VALUE
|
@graphics_autoport = 'yes' if @graphics_port == UNSET_VALUE
|
||||||
@graphics_autoport = 'no' if @graphics_port != UNSET_VALUE
|
@graphics_autoport = 'no' if @graphics_port != UNSET_VALUE
|
||||||
|
@ -42,6 +42,9 @@
|
|||||||
<kernel><%= @kernel %></kernel>
|
<kernel><%= @kernel %></kernel>
|
||||||
<initrd><%= @initrd %></initrd>
|
<initrd><%= @initrd %></initrd>
|
||||||
<cmdline><%= @cmd_line %></cmdline>
|
<cmdline><%= @cmd_line %></cmdline>
|
||||||
|
<% if @dtb %>
|
||||||
|
<dtb><%= @dtb %></dtb>
|
||||||
|
<% end %>
|
||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<acpi/>
|
<acpi/>
|
||||||
|
Loading…
Reference in New Issue
Block a user