From e1896e3b447e5b4abc2937b9b43100f93a732b86 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 28 May 2015 13:43:13 +0200 Subject: [PATCH] run: add platform_drv include for usage by scripts Related to #765 and used for issue #1542 --- repos/base/run/platform_drv.inc | 94 +++++++++++++++++++++ repos/libports/run/libc_filesystem_test.inc | 46 ++-------- repos/libports/run/lwip.run | 68 ++------------- repos/os/run/demo.run | 44 ++-------- repos/os/run/input.run | 36 ++------ repos/ports-foc/run/l4linux.run | 61 +++---------- repos/ports-foc/run/l4linux_netperf.inc | 39 ++------- repos/ports/run/netperf.inc | 52 ++---------- repos/ports/run/noux_net_netcat.run | 56 ++---------- repos/ports/run/noux_tool_chain.inc | 52 ++---------- repos/ports/run/seoul.inc | 37 ++------ repos/ports/run/virtualbox.run | 39 +++------ repos/ports/run/virtualbox_auto.inc | 59 +++---------- 13 files changed, 197 insertions(+), 486 deletions(-) create mode 100644 repos/base/run/platform_drv.inc diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc new file mode 100644 index 0000000000..53b22cb643 --- /dev/null +++ b/repos/base/run/platform_drv.inc @@ -0,0 +1,94 @@ +proc have_platform_drv {} { + return [expr [have_spec platform_arndale] || [have_spec platform_imx53] || [have_spec platform_rpi]] +} + +proc append_platform_drv_build_components {} { + global build_components + + lappend_if [have_platform_drv] build_components drivers/platform + lappend_if [have_spec acpi] build_components drivers/acpi + lappend_if [have_spec pci] build_components drivers/pci +} + +proc append_platform_drv_boot_modules {} { + global boot_modules + + lappend_if [have_platform_drv] boot_modules platform_drv + lappend_if [have_spec acpi] boot_modules acpi_drv + lappend_if [have_spec pci] boot_modules pci_drv + lappend_if [have_spec nova] boot_modules pci_device_pd +} + +proc platform_drv_policy {} { + + return { + + + + + + } +} + +proc platform_drv_priority {} { return "" } + +proc append_platform_drv_config {} { + global config + + if {[have_platform_drv]} { + append config { + + + + + + + + } + + } + + if {[have_spec acpi]} { + + append config " + " + + append config { + + + + + + + + } + + append config [platform_drv_policy] + + append config { + + } + + } + + if {[expr ![have_spec acpi] && [have_spec pci]]} { + + append config " + " + + append config { + + + + } + + append config [platform_drv_policy] + + append config { + + } + + } + + return $config +} diff --git a/repos/libports/run/libc_filesystem_test.inc b/repos/libports/run/libc_filesystem_test.inc index 7ac7931714..a965c98201 100644 --- a/repos/libports/run/libc_filesystem_test.inc +++ b/repos/libports/run/libc_filesystem_test.inc @@ -39,12 +39,14 @@ set build_components { lappend build_components test/libc_$filesystem -lappend_if [have_spec pci] build_components drivers/pci -lappend_if [have_spec acpi] build_components drivers/acpi lappend_if $use_ahci build_components drivers/ahci lappend_if $use_sd_card_drv build_components drivers/sd_card +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components + build $build_components + create_boot_directory # @@ -91,42 +93,10 @@ append config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - } +append_platform_drv_config append_if $use_ahci config { - - + @@ -166,11 +136,11 @@ append boot_modules test-libc_$filesystem append boot_modules " " append boot_modules libc_$filesystem.lib.so -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if $use_ahci boot_modules ahci_drv lappend_if $use_sd_card_drv boot_modules sd_card_drv +append_platform_drv_boot_modules + build_boot_image $boot_modules # diff --git a/repos/libports/run/lwip.run b/repos/libports/run/lwip.run index 47939be0ca..ee2a92ad77 100644 --- a/repos/libports/run/lwip.run +++ b/repos/libports/run/lwip.run @@ -19,6 +19,7 @@ # TODO: Add support for Linux via user-level networking (using the # tun/tap proxy driver at os/src/drivers/nic/linux) # + set use_usb_driver [expr [have_spec omap4] || [have_spec platform_arndale] || [have_spec platform_rpi]] set use_nic_driver [expr !$use_usb_driver && ![have_spec platform_imx53] && ![have_spec hw_odroid_xu] && ![have_spec linux]] @@ -33,17 +34,16 @@ requires_installation_of lynx set build_components { core init - drivers/pci drivers/timer drivers/nic + drivers/timer drivers/nic test/lwip/http_srv } lappend_if $use_usb_driver build_components drivers/usb -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd -lappend_if [have_spec platform_arndale] build_components drivers/platform -lappend_if [have_spec platform_rpi] build_components drivers/platform lappend_if [have_spec gpio] build_components drivers/gpio +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components + build $build_components create_boot_directory @@ -83,19 +83,6 @@ set config { } -append_if [have_spec platform_arndale] config { - - - - } - -append_if [have_spec platform_rpi] config { - - - - - } - append_if [have_spec gpio] config { @@ -114,48 +101,14 @@ append_if $use_usb_driver config { } +append_platform_drv_config + append_if $use_nic_driver config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - - - - } - append config { } @@ -173,15 +126,12 @@ set boot_modules { } # platform-specific modules -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec pci] boot_modules pci_drv lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec nova] boot_modules pci_device_pd -lappend_if [have_spec platform_arndale] boot_modules platform_drv -lappend_if [have_spec platform_rpi] boot_modules platform_drv lappend_if [have_spec gpio] boot_modules gpio_drv +append_platform_drv_boot_modules + build_boot_image $boot_modules # diff --git a/repos/os/run/demo.run b/repos/os/run/demo.run index a3a60df393..5fa5cb4c20 100644 --- a/repos/os/run/demo.run +++ b/repos/os/run/demo.run @@ -13,15 +13,15 @@ set build_components { server/nitpicker app/pointer app/status_bar server/liquid_framebuffer app/launchpad app/scout test/nitpicker server/nitlog - drivers/framebuffer drivers/pci drivers/input + drivers/framebuffer drivers/input server/report_rom } lappend_if [have_spec usb] build_components drivers/usb lappend_if [have_spec gpio] build_components drivers/gpio -lappend_if [have_spec imx53] build_components drivers/platform -lappend_if [have_spec platform_arndale] build_components drivers/platform -lappend_if [have_spec platform_rpi] build_components drivers/platform + +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components build $build_components @@ -59,16 +59,7 @@ append_if [have_spec sdl] config { } -append_if [have_spec pci] config { - - - - - - - - - } +append_platform_drv_config append_if [have_spec framebuffer] config { @@ -83,26 +74,7 @@ append_if [have_spec gpio] config { } -append_if [have_spec platform_arndale] config { - - - - - } - -append_if [have_spec platform_rpi] config { - - - - - } - append_if [have_spec imx53] config { - - - - - @@ -212,16 +184,14 @@ set boot_modules { # platform-specific modules lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [have_spec usb] boot_modules usb_drv lappend_if [have_spec gpio] boot_modules gpio_drv -lappend_if [have_spec imx53] boot_modules platform_drv -lappend_if [have_spec platform_arndale] boot_modules platform_drv -lappend_if [have_spec platform_rpi] boot_modules platform_drv lappend_if [have_spec imx53] boot_modules input_drv +append_platform_drv_boot_modules + build_boot_image $boot_modules append qemu_args " -m 256 " diff --git a/repos/os/run/input.run b/repos/os/run/input.run index dcadf3ff9a..76c99c57ab 100644 --- a/repos/os/run/input.run +++ b/repos/os/run/input.run @@ -6,10 +6,12 @@ set build_components { core init drivers/input drivers/timer - drivers/pci test/input } +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components + build $build_components create_boot_directory @@ -47,28 +49,6 @@ append config { - - - - - - - - - - - - - - - - - - - - - - @@ -78,7 +58,7 @@ append config { - + @@ -92,8 +72,11 @@ append config { - + } +append_platform_drv_config + +append config { } install_config $config @@ -106,12 +89,11 @@ install_config $config set boot_modules { core init timer - pci_drv ps2_drv test-input } -# platform-specific modules +append_platform_drv_boot_modules build_boot_image $boot_modules diff --git a/repos/ports-foc/run/l4linux.run b/repos/ports-foc/run/l4linux.run index 9c1ad777e2..34b2a95363 100644 --- a/repos/ports-foc/run/l4linux.run +++ b/repos/ports-foc/run/l4linux.run @@ -14,17 +14,17 @@ set build_components { set use_usb_driver [expr [have_spec omap4] || [have_spec platform_arndale]] set use_nic_driver [expr !$use_usb_driver && [expr [have_spec lan9118] || [have_spec x86]]] -set use_platform_drv [expr [have_spec platform_arndale] || [have_spec platform_imx53]] -lappend_if $use_usb_driver build_components drivers/usb -lappend_if $use_nic_driver build_components drivers/nic -lappend_if [have_spec pci] build_components drivers/pci -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec ps2] build_components drivers/input/ps2 -lappend_if $use_platform_drv build_components drivers/platform -lappend_if [have_spec gpio] build_components drivers/gpio +lappend_if $use_usb_driver build_components drivers/usb +lappend_if $use_nic_driver build_components drivers/nic +lappend_if [have_spec ps2] build_components drivers/input/ps2 +lappend_if [have_spec gpio] build_components drivers/gpio + +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components build $build_components + create_boot_directory # @@ -61,36 +61,7 @@ set config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - - } +append_platform_drv_config append_if [have_spec framebuffer] config { @@ -104,15 +75,6 @@ append_if [have_spec ps2] config { } -append_if $use_platform_drv config { - - - - - - - } - append_if [have_spec gpio] config { @@ -159,13 +121,10 @@ install_config $config # Boot modules # set boot_modules { core init timer kdb_uart_drv l4linux initrd.gz } -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if [have_spec ps2] boot_modules ps2_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if $use_nic_driver boot_modules nic_drv lappend_if $use_usb_driver boot_modules usb_drv -lappend_if $use_platform_drv boot_modules platform_drv lappend_if [have_spec gpio] boot_modules gpio_drv if {[have_spec x86]} { @@ -182,6 +141,8 @@ cd bin exec md5sum -c initrd.gz.md5 cd .. +append_platform_drv_boot_modules + build_boot_image [join $boot_modules " "] # diff --git a/repos/ports-foc/run/l4linux_netperf.inc b/repos/ports-foc/run/l4linux_netperf.inc index 8ad96211d7..00b9d0ecac 100644 --- a/repos/ports-foc/run/l4linux_netperf.inc +++ b/repos/ports-foc/run/l4linux_netperf.inc @@ -47,7 +47,6 @@ if {$wrong_version} { exit 1; } - # # Build # @@ -57,15 +56,15 @@ set build_components { drivers/usb drivers/timer drivers/uart - drivers/platform server/nic_bridge l4linux } -lappend_if [have_spec pci] build_components drivers/pci -lappend_if [have_spec acpi] build_components drivers/acpi +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components build $build_components + create_boot_directory # @@ -95,25 +94,7 @@ set config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - } +append_platform_drv_config append config { @@ -141,12 +122,6 @@ append config { } -append_if [have_spec arm] config { - - - - -} append config { @@ -193,10 +168,6 @@ set boot_modules { kdb_uart_drv } -lappend_if [have_spec arm] boot_modules platform_drv -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec acpi] boot_modules acpi_drv - set uri "http://genode.org/files/l4linux/initrd-arm-netperf.gz" if {[have_spec x86]} { set uri "http://genode.org/files/l4linux/busybox-initrd-x86-20140506.gz" @@ -213,6 +184,8 @@ if {![file exists bin/initrd.gz]} { cd .. } +append_platform_drv_boot_modules + build_boot_image $boot_modules diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index 0c532f5d59..5e9a51494c 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -18,7 +18,6 @@ if {![info exists use_usb_driver]} { set use_usb_driver [expr [have_spec omap4] || [have_spec platform_arndale] || [have_spec platform_rpi]] } set use_nic_driver [expr !$use_usb_driver && ![have_spec platform_imx53] && !$use_wifi_driver] -set use_platform_driver [expr [have_spec platform_arndale] || [have_spec platform_imx53] || [have_spec platform_rpi]] if {[expr !$use_usb_driver && !$use_nic_driver && !$use_wifi_driver]} { puts "\n Run script is not supported on this platform. \n"; exit 0 } @@ -66,16 +65,13 @@ if {$use_wifi_driver} { set network_driver "wifi_drv" } set build_components { core init - drivers/pci drivers/timer + drivers/timer } append build_components " $netperf_target " lappend_if $use_nic_driver build_components drivers/nic lappend_if $use_usb_driver build_components drivers/usb -lappend_if $use_platform_driver build_components drivers/platform lappend_if $use_nic_bridge build_components server/nic_bridge -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd lappend_if [have_spec gpio] build_components drivers/gpio append_if $use_wifi_driver build_components { @@ -85,6 +81,9 @@ append_if $use_wifi_driver build_components { server/report_rom } +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components + build $build_components create_boot_directory @@ -119,13 +118,6 @@ set config { } -append_if $use_platform_driver config { - - - - - } - append_if [have_spec gpio] config { @@ -226,35 +218,7 @@ append_if $use_wifi_driver config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - } +append_platform_drv_config append config { @@ -301,13 +265,9 @@ append boot_modules " $netperf_stack " lappend_if $use_nic_bridge boot_modules nic_bridge # platform-specific modules -lappend_if $use_platform_driver boot_modules platform_drv -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec gpio] boot_modules gpio_drv lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules nic_drv -lappend_if [have_spec nova] boot_modules pci_device_pd append_if $use_wifi_driver boot_modules { ram_fs fs_rom report_rom @@ -322,6 +282,8 @@ append_if $use_wifi_driver boot_modules { iwlwifi-7260-8.ucode } +append_platform_drv_boot_modules + build_boot_image $boot_modules # diff --git a/repos/ports/run/noux_net_netcat.run b/repos/ports/run/noux_net_netcat.run index 8b75c60b9b..c557b8d3ce 100644 --- a/repos/ports/run/noux_net_netcat.run +++ b/repos/ports/run/noux_net_netcat.run @@ -1,13 +1,12 @@ set use_usb_driver [expr [have_spec omap4] || [have_spec platform_arndale] || [have_spec platform_rpi]] set use_nic_driver [expr !$use_usb_driver && ![have_spec platform_imx53] && ![have_spec linux] && ![have_spec hw_odroid_xu]] -set use_platform_drv [expr [have_spec platform_arndale] || [have_spec platform_imx53] || [have_spec platform_rpi]] if {[expr !$use_usb_driver && !$use_nic_driver]} { puts "\n Run script is not supported on this platform. \n"; exit 0 } set build_components { core init - drivers/timer drivers/pci + drivers/timer server/tcp_terminal server/nic_bridge noux/net lib/libc_noux @@ -16,11 +15,11 @@ set build_components { lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_nic_driver build_components drivers/nic -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd lappend_if [have_spec gpio] build_components drivers/gpio lappend_if [have_include "power_on/qemu"] build_components drivers/uart -lappend_if $use_platform_drv build_components drivers/platform + +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components build $build_components @@ -107,15 +106,6 @@ append_if $use_nic_driver config { } -append_if $use_platform_drv config { - - - - - - - } - append_if [have_spec gpio] config { @@ -135,38 +125,8 @@ append_if $use_usb_driver config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - - } +append_platform_drv_config -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - } - append config { @@ -205,13 +165,11 @@ set boot_modules { # platform-specific modules lappend_if $use_nic_driver boot_modules nic_drv lappend_if $use_usb_driver boot_modules usb_drv -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [have_include "power_on/qemu"] boot_modules uart_drv -lappend_if $use_platform_drv boot_modules platform_drv lappend_if [have_spec gpio] boot_modules gpio_drv +append_platform_drv_boot_modules + build_boot_image $boot_modules set noux_output_file "noux_output.log" diff --git a/repos/ports/run/noux_tool_chain.inc b/repos/ports/run/noux_tool_chain.inc index fed27e247d..c960f29123 100644 --- a/repos/ports/run/noux_tool_chain.inc +++ b/repos/ports/run/noux_tool_chain.inc @@ -16,12 +16,11 @@ if {[have_spec linux]} { exit 0 } -set use_platform_driver [expr [have_spec platform_arndale] || [have_spec platform_imx53] || [have_spec platform_rpi]] set use_usb_input [expr ![have_spec ps2] && ![have_spec sdl] && [have_spec usb]] set build_components { core init drivers/timer noux/minimal lib/libc_noux - drivers/framebuffer drivers/pci drivers/input + drivers/framebuffer drivers/input server/terminal server/ram_fs test/libports/ncurses } @@ -35,10 +34,9 @@ set build_components { # proc check_xml_syntax {xml_file} { } +source ${genode_dir}/repos/base/run/platform_drv.inc +append_platform_drv_build_components -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd -lappend_if $use_platform_driver build_components drivers/platform lappend_if $use_usb_input build_components drivers/usb set cc_march "" @@ -116,13 +114,6 @@ append config { } -append_if $use_platform_driver config { - - - - - } - append_if [have_spec sdl] config { @@ -132,25 +123,7 @@ append_if [have_spec sdl] config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - } +append_platform_drv_config append_if [have_spec framebuffer] config { @@ -158,17 +131,6 @@ append_if [have_spec framebuffer] config { } -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - } - append_if [have_spec ps2] config { @@ -306,14 +268,12 @@ foreach pkg $platform_pkgs { append boot_modules "$pkg.tar" } # platform-specific modules lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [have_spec ps2] boot_modules ps2_drv -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec nova] boot_modules pci_device_pd -lappend_if $use_platform_driver boot_modules platform_drv lappend_if $use_usb_input boot_modules usb_drv +append_platform_drv_boot_modules + build_boot_image $boot_modules # vi: set ft=tcl : diff --git a/repos/ports/run/seoul.inc b/repos/ports/run/seoul.inc index 303cef554f..2eb33aa949 100644 --- a/repos/ports/run/seoul.inc +++ b/repos/ports/run/seoul.inc @@ -16,19 +16,20 @@ if {![have_spec nova]} { assert_spec acpi +source ${genode_dir}/repos/base/run/platform_drv.inc +# override defaults of platform_drv.inc +proc platform_drv_priority {} { return { priority="-1"} } + set build_components { core init drivers/timer drivers/rtc - drivers/pci drivers/input app/seoul } if {$use_fancy_stuff} { set use_framebuffer 1 } -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci/device_pd lappend_if $use_usb build_components drivers/usb lappend_if $use_block_sata build_components drivers/ahci lappend_if $use_nic_session build_components drivers/nic @@ -44,6 +45,8 @@ lappend_if $use_fancy_stuff build_components server/report_rom lappend_if $use_genode_iso build_components server/iso9660 lappend_if $use_genode_iso build_components server/rom_blk +append_platform_drv_build_components + build $build_components # write Seoul config file @@ -192,28 +195,7 @@ append_if $use_genode_iso config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - - - } - +append_platform_drv_config append_if $use_nic_session config { @@ -415,15 +397,12 @@ install_config $config # generic modules set boot_modules { core init - pci_drv timer rtc_drv seoul vm_seoul.cfg } -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [expr !$use_usb] boot_modules ps2_drv lappend_if $use_usb boot_modules usb_drv lappend_if $use_block_sata boot_modules ahci_drv @@ -478,6 +457,8 @@ if {$use_usb} { append qemu_args " -usb -usbdevice mouse -usbdevice keyboard " } +append_platform_drv_boot_modules + build_boot_image $boot_modules # A copy of the config is placed in the run folder. diff --git a/repos/ports/run/virtualbox.run b/repos/ports/run/virtualbox.run index a172a01e23..b0325df82b 100644 --- a/repos/ports/run/virtualbox.run +++ b/repos/ports/run/virtualbox.run @@ -9,15 +9,19 @@ set build_components { drivers/timer } +source ${genode_dir}/repos/base/run/platform_drv.inc +# override defaults of platform_drv.inc +proc platform_drv_priority {} { return { priority="-1"} } + lappend_if [expr $use_ps2] build_components drivers/input lappend_if [expr $use_usb] build_components drivers/usb lappend_if [expr $use_serial] build_components server/log_terminal -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci lappend_if [have_spec x86] build_components drivers/rtc lappend_if [expr $use_net] build_components drivers/nic +append_platform_drv_build_components + build $build_components create_boot_directory @@ -38,32 +42,14 @@ set config { - + } -append_if [have_spec acpi] config { - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - } +append_platform_drv_config append_if [expr $use_ps2] config { @@ -78,10 +64,6 @@ append_if [expr $use_usb] config { - - - - } append_if [have_spec framebuffer] config { @@ -157,11 +139,8 @@ set boot_modules { core init timer virtualbox test.iso test.vbox } # platform-specific modules lappend_if [expr $use_usb] boot_modules usb_drv lappend_if [expr $use_ps2] boot_modules ps2_drv -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [have_spec x86] boot_modules rtc_drv append boot_modules { @@ -172,6 +151,8 @@ append boot_modules { append_if [expr $use_net] boot_modules { nic_drv } append_if [expr $use_serial] boot_modules { log_terminal } +append_platform_drv_boot_modules + build_boot_image $boot_modules if {[have_include "power_on/qemu"]} { diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index c414640678..71e8b8a6cf 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -16,11 +16,15 @@ append build_components { lappend_if [expr $use_ps2] build_components drivers/input lappend_if [expr $use_usb] build_components drivers/usb -lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec pci] build_components drivers/pci lappend_if [have_spec x86] build_components drivers/rtc lappend_if [expr $use_ram_fs] build_components server/ram_fs +source ${genode_dir}/repos/base/run/platform_drv.inc +# override defaults of platform_drv.inc +proc platform_drv_priority {} { return { priority="-1"} } + +append_platform_drv_build_components + build $build_components create_boot_directory @@ -47,15 +51,14 @@ set config { - - + - + @@ -63,7 +66,7 @@ set config { - + @@ -94,47 +97,14 @@ append_if [expr $use_ram_fs] config { } -append_if [have_spec acpi] config { - - - - - - - - - - - - - - - - - - - - } - -append_if [expr ![have_spec acpi] && [have_spec pci]] config { - - - - - - - - - - - } +append_platform_drv_config append_if [expr $use_ps2] config { - + } @@ -153,7 +123,7 @@ append_if [expr $use_usb] config { - + @@ -198,8 +168,7 @@ lappend_if [expr $use_ram_fs] boot_modules ${overlay_image} # platform-specific modules lappend_if [expr $use_ps2] boot_modules ps2_drv lappend_if [expr $use_usb] boot_modules usb_drv -lappend_if [have_spec acpi] boot_modules acpi_drv -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [have_spec x86] boot_modules rtc_drv + +append_platform_drv_boot_modules