From c578a455ba84b886b9033d0640741207275da8f7 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 19 Feb 2015 11:59:31 +0100 Subject: [PATCH] vbox: adapt auto run scripts for win8 Issue #1413 --- repos/ports/run/vbox_auto_win7.run | 10 + ...uto_share.run => vbox_auto_win7_share.run} | 3 + repos/ports/run/vbox_auto_win8.run | 12 ++ ...{virtualbox_auto_disk.run => vbox_win.inc} | 27 +-- repos/ports/run/virtualbox_auto.inc | 37 +--- repos/ports/run/vm_auto_disk.vbox | 185 ------------------ repos/ports/run/vm_win7.vbox | 100 ++++++++++ repos/ports/run/vm_win8.vbox | 103 ++++++++++ tool/autopilot.list | 5 +- 9 files changed, 251 insertions(+), 231 deletions(-) create mode 100644 repos/ports/run/vbox_auto_win7.run rename repos/ports/run/{virtualbox_auto_share.run => vbox_auto_win7_share.run} (98%) create mode 100644 repos/ports/run/vbox_auto_win8.run rename repos/ports/run/{virtualbox_auto_disk.run => vbox_win.inc} (71%) delete mode 100644 repos/ports/run/vm_auto_disk.vbox create mode 100644 repos/ports/run/vm_win7.vbox create mode 100644 repos/ports/run/vm_win8.vbox diff --git a/repos/ports/run/vbox_auto_win7.run b/repos/ports/run/vbox_auto_win7.run new file mode 100644 index 000000000..bd877b186 --- /dev/null +++ b/repos/ports/run/vbox_auto_win7.run @@ -0,0 +1,10 @@ +# +# Windows 7 in VirtualBox +# + +set flavor "win7" + +# Write overlay back to harddisk if set to 0 +set use_ram_fs 0 + +source ${genode_dir}/repos/ports/run/vbox_win.inc diff --git a/repos/ports/run/virtualbox_auto_share.run b/repos/ports/run/vbox_auto_win7_share.run similarity index 98% rename from repos/ports/run/virtualbox_auto_share.run rename to repos/ports/run/vbox_auto_win7_share.run index a9e4e1a94..e114c0719 100644 --- a/repos/ports/run/virtualbox_auto_share.run +++ b/repos/ports/run/vbox_auto_win7_share.run @@ -65,8 +65,11 @@ if {[have_include "power_on/qemu"]} { # Tested for nova. assert_spec nova +set flavor "win7" +set vdi_image "${flavor}.vdi" # Write overlay back to harddisk if set to 0 set use_ram_fs 0 +set overlay_image "overlay_${flavor}.vdi" # # Create .bat file to be executed by Win VM diff --git a/repos/ports/run/vbox_auto_win8.run b/repos/ports/run/vbox_auto_win8.run new file mode 100644 index 000000000..d005b1a3a --- /dev/null +++ b/repos/ports/run/vbox_auto_win8.run @@ -0,0 +1,12 @@ +# +# Windows 8 in VirtualBox +# + +assert_spec 64bit + +set flavor "win8" + +# Write overlay back to harddisk if set to 0 +set use_ram_fs 0 + +source ${genode_dir}/repos/ports/run/vbox_win.inc diff --git a/repos/ports/run/virtualbox_auto_disk.run b/repos/ports/run/vbox_win.inc similarity index 71% rename from repos/ports/run/virtualbox_auto_disk.run rename to repos/ports/run/vbox_win.inc index 4e1dfdd81..898e36028 100644 --- a/repos/ports/run/virtualbox_auto_disk.run +++ b/repos/ports/run/vbox_win.inc @@ -6,27 +6,30 @@ if {[have_include "power_on/qemu"]} { exit 0 } -set vdi_image "win7.vdi" -# Write overlay back to harddisk if set to 0 -set use_ram_fs 0 +set vdi_image "${flavor}.vdi" +set vbox_file "vm_${flavor}.vbox" +set overlay_image "overlay_${flavor}.vdi" set build_components { } -set boot_modules { vm_auto_disk.vbox } +set boot_modules { } set config_of_app { - - + } +append config_of_app " + " +append config_of_app { - } + + } append_if [expr $use_ram_fs] config_of_app { } +append config_of_app " + " append config_of_app { - - @@ -49,7 +52,9 @@ append config_of_app { source ${genode_dir}/repos/ports/run/virtualbox_auto.inc # copy vbox configuration to bin directory -exec cp ${genode_dir}/repos/ports/run/vm_auto_disk.vbox bin/. +exec cp ${genode_dir}/repos/ports/run/${vbox_file} bin/. + +append boot_modules " ${vbox_file} " build_boot_image $boot_modules @@ -57,4 +62,4 @@ run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamles run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 170 [output_spawn_id] # cleanup bin directory - remove vbox file -exec rm bin/vm_auto_disk.vbox +exec rm bin/${vbox_file} diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index 1728274d5..6b98d5ea2 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -80,8 +80,9 @@ append_if [expr $use_ram_fs] config { - - + } +append_if [expr $use_ram_fs] config "" +append_if [expr $use_ram_fs] config { @@ -148,38 +149,8 @@ append boot_modules { virtualbox } -# -# Stuff to generate overlay.vdi if required -# -# generate overlay VDI -#proc vdi { } { -# global vdi_image -# return "bin/$vdi_image" -#} -#proc overlay_vdi { } { return "bin/overlay.vdi" } -#proc vdi_size {} { -# catch { -# set result [ exec vboxmanage showhdinfo [vdi] | \ -# grep "^Logical" | sed "s/\[^0-9\]\\+//;s/ .*//" ] -# } -# return $result -#} -# -#file delete -force [overlay_vdi] -#if {$use_vdi} { -# if {![file exists [vdi]]} { -# puts "VDI image [vdi] missing!" -# exit -1 -# } -# catch { -# exec -ignorestderr vboxmanage createhd --filename [overlay_vdi] --size [vdi_size] --format vdi -# exec chmod a+r [overlay_vdi] -# append boot_modules "overlay.vdi" -# } -#} - lappend_if [expr $use_ram_fs] boot_modules ram_fs -lappend_if [expr $use_ram_fs] boot_modules overlay.vdi +lappend_if [expr $use_ram_fs] boot_modules ${overlay_image} # platform-specific modules lappend_if [have_spec ps2] boot_modules ps2_drv diff --git a/repos/ports/run/vm_auto_disk.vbox b/repos/ports/run/vm_auto_disk.vbox deleted file mode 100644 index ad7ca024d..000000000 --- a/repos/ports/run/vm_auto_disk.vbox +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/ports/run/vm_win7.vbox b/repos/ports/run/vm_win7.vbox new file mode 100644 index 000000000..6be56fc15 --- /dev/null +++ b/repos/ports/run/vm_win7.vbox @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/repos/ports/run/vm_win8.vbox b/repos/ports/run/vm_win8.vbox new file mode 100644 index 000000000..c1db59008 --- /dev/null +++ b/repos/ports/run/vm_win8.vbox @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tool/autopilot.list b/tool/autopilot.list index 0163fface..caf644be4 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -42,7 +42,8 @@ blk_cache rump_ext2 thread pthread -virtualbox_auto_disk -virtualbox_auto_share +vbox_auto_win7 +vbox_auto_win7_share +vbox_auto_win8 tz_vmm vmm