diff --git a/repos/ports/lib/mk/spec/foc/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/foc/virtualbox-hwaccl.mk
deleted file mode 100644
index 2c1958cb6f..0000000000
--- a/repos/ports/lib/mk/spec/foc/virtualbox-hwaccl.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(REP_DIR)/lib/mk/virtualbox-hwaccl-off.inc
diff --git a/repos/ports/lib/mk/spec/hw_x86_64/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/hw_x86_64/virtualbox-hwaccl.mk
deleted file mode 100644
index 2c1958cb6f..0000000000
--- a/repos/ports/lib/mk/spec/hw_x86_64/virtualbox-hwaccl.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(REP_DIR)/lib/mk/virtualbox-hwaccl-off.inc
diff --git a/repos/ports/lib/mk/spec/linux/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/linux/virtualbox-hwaccl.mk
deleted file mode 100644
index 2c1958cb6f..0000000000
--- a/repos/ports/lib/mk/spec/linux/virtualbox-hwaccl.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(REP_DIR)/lib/mk/virtualbox-hwaccl-off.inc
diff --git a/repos/ports/lib/mk/spec/muen/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/muen/virtualbox-muen.mk
similarity index 100%
rename from repos/ports/lib/mk/spec/muen/virtualbox-hwaccl.mk
rename to repos/ports/lib/mk/spec/muen/virtualbox-muen.mk
diff --git a/repos/ports/lib/mk/spec/nova/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/nova/virtualbox-nova.mk
similarity index 100%
rename from repos/ports/lib/mk/spec/nova/virtualbox-hwaccl.mk
rename to repos/ports/lib/mk/spec/nova/virtualbox-nova.mk
diff --git a/repos/ports/lib/mk/spec/okl4/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/okl4/virtualbox-hwaccl.mk
deleted file mode 100644
index 2c1958cb6f..0000000000
--- a/repos/ports/lib/mk/spec/okl4/virtualbox-hwaccl.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(REP_DIR)/lib/mk/virtualbox-hwaccl-off.inc
diff --git a/repos/ports/lib/mk/spec/pistachio/virtualbox-hwaccl.mk b/repos/ports/lib/mk/spec/pistachio/virtualbox-hwaccl.mk
deleted file mode 100644
index 2c1958cb6f..0000000000
--- a/repos/ports/lib/mk/spec/pistachio/virtualbox-hwaccl.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(REP_DIR)/lib/mk/virtualbox-hwaccl-off.inc
diff --git a/repos/ports/lib/mk/virtualbox-hwaccl-off.inc b/repos/ports/lib/mk/virtualbox-hwaccl-off.mk
similarity index 100%
rename from repos/ports/lib/mk/virtualbox-hwaccl-off.inc
rename to repos/ports/lib/mk/virtualbox-hwaccl-off.mk
diff --git a/repos/ports/run/vbox_auto_genode_usb_hid.run b/repos/ports/run/vbox_auto_genode_usb_hid.run
index c7e36ef461..8d06b69a08 100644
--- a/repos/ports/run/vbox_auto_genode_usb_hid.run
+++ b/repos/ports/run/vbox_auto_genode_usb_hid.run
@@ -162,6 +162,7 @@ append config {
+
@@ -217,7 +218,7 @@ set boot_modules {
fs_rom
ram_fs
report_rom
- virtualbox
+ virtualbox-nova
usb_hid.iso
vm_genode_usb_hid.vbox
ld.lib.so libc.lib.so libm.lib.so pthread.lib.so libc_pipe.lib.so
diff --git a/repos/ports/run/vbox_auto_win7_share.run b/repos/ports/run/vbox_auto_win7_share.run
index a5126c40e9..2fab807d71 100644
--- a/repos/ports/run/vbox_auto_win7_share.run
+++ b/repos/ports/run/vbox_auto_win7_share.run
@@ -68,6 +68,10 @@ if {(![have_spec nova] && ![have_spec muen])} {
exit 0
}
+set virtualbox_binary "virtualbox-rem"
+if {[have_spec muen]} { set virtualbox_binary "virtualbox-muen" }
+if {[have_spec nova]} { set virtualbox_binary "virtualbox-nova" }
+
set flavor "win7"
set use_vbox4 1
@@ -207,8 +211,10 @@ set config_of_app {
-
-
+ }
+append config_of_app "
+ "
+append config_of_app {
diff --git a/repos/ports/run/vbox_win.inc b/repos/ports/run/vbox_win.inc
index c6066396b9..7cc63cf8a6 100644
--- a/repos/ports/run/vbox_win.inc
+++ b/repos/ports/run/vbox_win.inc
@@ -41,6 +41,10 @@ set boot_modules {
dynamic_rom
}
+set virtualbox_binary "virtualbox-rem"
+if {[have_spec muen]} { set virtualbox_binary "virtualbox-muen" }
+if {[have_spec nova]} { set virtualbox_binary "virtualbox-nova" }
+
set config_of_app {
@@ -236,8 +240,8 @@ append config_of_app {
for { set i 1} { $i <= $use_vms } { incr i} {
append config_of_app "
"
- append_if [expr $use_vbox4] config_of_app {
- }
+ append_if [expr $use_vbox4] config_of_app "
+ "
append_if [expr $use_vbox5] config_of_app {
}
diff --git a/repos/ports/run/virtualbox.run b/repos/ports/run/virtualbox.run
index 6983f515fa..906cf92952 100644
--- a/repos/ports/run/virtualbox.run
+++ b/repos/ports/run/virtualbox.run
@@ -3,6 +3,10 @@ set use_ps2 [have_spec ps2]
set use_usb 0
set use_serial 0
+set virtualbox_binary "virtualbox-rem"
+if {[have_spec muen]} { set virtualbox_binary "virtualbox-muen" }
+if {[have_spec nova]} { set virtualbox_binary "virtualbox-nova" }
+
set build_components {
core init virtualbox
drivers/framebuffer
@@ -116,7 +120,10 @@ append_if [expr $use_serial] config {
}
append config {
-
+ }
+append config "
+ "
+append config {
@@ -139,7 +146,9 @@ install_config $config
exec cp ${genode_dir}/repos/ports/run/test.vbox bin/.
-set boot_modules { core ld.lib.so init timer virtualbox test.iso test.vbox }
+set boot_modules { core ld.lib.so init timer test.iso test.vbox }
+
+append boot_modules $virtualbox_binary
# platform-specific modules
lappend_if [expr $use_usb] boot_modules usb_drv
diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc
index 0d910e4905..f61c93a264 100644
--- a/repos/ports/run/virtualbox_auto.inc
+++ b/repos/ports/run/virtualbox_auto.inc
@@ -324,10 +324,10 @@ append boot_modules {
lappend_if [expr $use_rumpfs] boot_modules rump.lib.so
lappend_if [expr $use_rumpfs] boot_modules rump_fs.lib.so
lappend_if [expr $use_rumpfs] boot_modules rump_fs
-lappend_if [expr $use_vbox4] boot_modules virtualbox
+lappend_if [expr $use_vbox4] boot_modules $virtualbox_binary
lappend_if [expr $use_vbox5] boot_modules virtualbox5
lappend_if [expr $use_ram_fs || $use_usb] boot_modules ram_fs
-lappend_if [expr $use_ram_fs && !$use_overlay_from_disk] boot_modules ${overlay_image}
+lappend_if [expr $use_ram_fs && !$use_overlay_from_disk] boot_modules $overlay_image
lappend_if [expr $use_cpu_load] boot_modules trace_subject_reporter
lappend_if [expr $use_cpu_load] boot_modules cpu_load_display
diff --git a/repos/ports/src/virtualbox/muen/target.mk b/repos/ports/src/virtualbox/muen/target.mk
new file mode 100644
index 0000000000..de1ef1ab4f
--- /dev/null
+++ b/repos/ports/src/virtualbox/muen/target.mk
@@ -0,0 +1,9 @@
+TARGET = virtualbox-muen
+REQUIRES = muen
+
+LIBS += virtualbox-muen
+
+include $(REP_DIR)/src/virtualbox/target.inc
+
+vpath frontend/% $(REP_DIR)/src/virtualbox/
+vpath %.cc $(REP_DIR)/src/virtualbox/
diff --git a/repos/ports/src/virtualbox/nova/target.mk b/repos/ports/src/virtualbox/nova/target.mk
new file mode 100644
index 0000000000..07a94f04cc
--- /dev/null
+++ b/repos/ports/src/virtualbox/nova/target.mk
@@ -0,0 +1,9 @@
+TARGET = virtualbox-nova
+REQUIRES = nova
+
+LIBS += virtualbox-nova
+
+include $(REP_DIR)/src/virtualbox/target.inc
+
+vpath frontend/% $(REP_DIR)/src/virtualbox/
+vpath %.cc $(REP_DIR)/src/virtualbox/
diff --git a/repos/ports/src/virtualbox/target.inc b/repos/ports/src/virtualbox/target.inc
new file mode 100644
index 0000000000..2f0e519436
--- /dev/null
+++ b/repos/ports/src/virtualbox/target.inc
@@ -0,0 +1,60 @@
+VBOX_CC_OPT += -DVBOX_WITH_HARDENING
+VBOX_CC_OPT += -DVBOX_WITH_GENERIC_SESSION_WATCHER
+
+include $(REP_DIR)/lib/mk/virtualbox-common.inc
+
+#
+# Prevent inclusion of the Genode::Log definition after the vbox #define
+# of 'Log'. Otherwise, the attemt to compile base/log.h will fail.
+#
+VBOX_CC_OPT += -include base/log.h
+
+CC_WARN += -Wall
+
+SRC_CC = frontend/main.cc frontend/console.cc \
+ frontend/VBoxAPIWrap/MediumFormatWrap.cpp \
+ frontend/VBoxAPIWrap/TokenWrap.cpp \
+ frontend/VirtualBoxErrorInfoImpl.cpp \
+ devices.cc drivers.cc dummies.cc libc.cc \
+ logger.cc mm.cc pdm.cc rt.cc sup.cc iommio.cc ioport.cc \
+ hm.cc thread.cc dynlib.cc unimpl.cc
+
+LIBS += base
+LIBS += stdcxx
+
+LIBS += virtualbox-bios virtualbox-recompiler virtualbox-runtime \
+ virtualbox-vmm virtualbox-devices virtualbox-drivers \
+ virtualbox-storage virtualbox-zlib virtualbox-liblzf \
+ virtualbox-xml virtualbox-main
+
+LIBS += pthread libc_terminal libc_pipe libiconv
+
+LIBS += qemu-usb
+
+INC_DIR += $(call select_from_repositories,src/lib/libc)
+INC_DIR += $(call select_from_repositories,src/lib/pthread)
+
+INC_DIR += $(VBOX_DIR)/Runtime/include
+
+SRC_CC += HostServices/SharedFolders/service.cpp
+SRC_CC += HostServices/SharedFolders/mappings.cpp
+SRC_CC += HostServices/SharedFolders/vbsf.cpp
+SRC_CC += HostServices/SharedFolders/shflhandle.cpp
+
+SRC_CC += HostServices/SharedClipboard/service.cpp
+
+SRC_CC += frontend/dummy/errorinfo.cc frontend/dummy/virtualboxbase.cc
+SRC_CC += frontend/dummy/autostart.cc frontend/dummy/rest.cc
+SRC_CC += frontend/dummy/host.cc
+
+INC_DIR += $(VBOX_DIR)/Main/include
+INC_DIR += $(VBOX_DIR)/VMM/include
+
+INC_DIR += $(REP_DIR)/src/virtualbox/frontend
+INC_DIR += $(REP_DIR)/src/virtualbox/frontend/VBoxAPIWrap
+
+INC_DIR += $(VBOX_DIR)/Main/xml
+INC_DIR += $(VBOX_DIR)/HostServices
+
+# search path to 'scan_code_set_2.h'
+INC_DIR += $(call select_from_repositories,src/drivers/input/spec/ps2)
diff --git a/repos/ports/src/virtualbox/target.mk b/repos/ports/src/virtualbox/target.mk
index d7e7cc63a0..cfbcee3fd6 100644
--- a/repos/ports/src/virtualbox/target.mk
+++ b/repos/ports/src/virtualbox/target.mk
@@ -1,61 +1,5 @@
-VBOX_CC_OPT += -DVBOX_WITH_HARDENING
-VBOX_CC_OPT += -DVBOX_WITH_GENERIC_SESSION_WATCHER
+TARGET = virtualbox-rem
-include $(REP_DIR)/lib/mk/virtualbox-common.inc
+LIBS += virtualbox-hwaccl-off
-#
-# Prevent inclusion of the Genode::Log definition after the vbox #define
-# of 'Log'. Otherwise, the attemt to compile base/log.h will fail.
-#
-VBOX_CC_OPT += -include base/log.h
-
-CC_WARN += -Wall
-
-TARGET = virtualbox
-SRC_CC = frontend/main.cc frontend/console.cc \
- frontend/VBoxAPIWrap/MediumFormatWrap.cpp \
- frontend/VBoxAPIWrap/TokenWrap.cpp \
- frontend/VirtualBoxErrorInfoImpl.cpp \
- devices.cc drivers.cc dummies.cc libc.cc \
- logger.cc mm.cc pdm.cc rt.cc sup.cc iommio.cc ioport.cc \
- hm.cc thread.cc dynlib.cc unimpl.cc
-
-LIBS += base
-LIBS += stdcxx
-
-LIBS += virtualbox-bios virtualbox-recompiler virtualbox-runtime \
- virtualbox-vmm virtualbox-devices virtualbox-drivers \
- virtualbox-storage virtualbox-zlib virtualbox-liblzf \
- virtualbox-hwaccl virtualbox-xml virtualbox-main
-
-LIBS += pthread libc_terminal libc_pipe libiconv
-
-LIBS += qemu-usb
-
-INC_DIR += $(call select_from_repositories,src/lib/libc)
-INC_DIR += $(call select_from_repositories,src/lib/pthread)
-
-INC_DIR += $(VBOX_DIR)/Runtime/include
-
-SRC_CC += HostServices/SharedFolders/service.cpp
-SRC_CC += HostServices/SharedFolders/mappings.cpp
-SRC_CC += HostServices/SharedFolders/vbsf.cpp
-SRC_CC += HostServices/SharedFolders/shflhandle.cpp
-
-SRC_CC += HostServices/SharedClipboard/service.cpp
-
-SRC_CC += frontend/dummy/errorinfo.cc frontend/dummy/virtualboxbase.cc
-SRC_CC += frontend/dummy/autostart.cc frontend/dummy/rest.cc
-SRC_CC += frontend/dummy/host.cc
-
-INC_DIR += $(VBOX_DIR)/Main/include
-INC_DIR += $(VBOX_DIR)/VMM/include
-
-INC_DIR += $(REP_DIR)/src/virtualbox/frontend
-INC_DIR += $(REP_DIR)/src/virtualbox/frontend/VBoxAPIWrap
-
-INC_DIR += $(VBOX_DIR)/Main/xml
-INC_DIR += $(VBOX_DIR)/HostServices
-
-# search path to 'scan_code_set_2.h'
-INC_DIR += $(call select_from_repositories,src/drivers/input/spec/ps2)
+include $(REP_DIR)/src/virtualbox/target.inc