2014-02-12 12:53:42 +00:00
|
|
|
assert_spec nova
|
|
|
|
|
2015-01-08 21:09:08 +00:00
|
|
|
if {[have_include "power_on/qemu"]} {
|
2014-07-10 06:35:23 +00:00
|
|
|
puts "\nRun script does not support Qemu.\n"
|
2014-02-12 12:53:42 +00:00
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
2014-05-28 12:48:33 +00:00
|
|
|
append build_components {
|
2014-02-12 12:53:42 +00:00
|
|
|
core init virtualbox
|
|
|
|
server/part_blk
|
|
|
|
server/rump_fs
|
2016-01-21 16:03:31 +00:00
|
|
|
server/fs_rom
|
2014-02-12 12:53:42 +00:00
|
|
|
drivers/ahci
|
|
|
|
drivers/framebuffer
|
|
|
|
drivers/timer
|
|
|
|
}
|
|
|
|
|
2015-02-22 18:04:55 +00:00
|
|
|
lappend_if [expr $use_ps2] build_components drivers/input
|
|
|
|
lappend_if [expr $use_usb] build_components drivers/usb
|
2016-01-21 16:03:31 +00:00
|
|
|
lappend_if [expr $use_usb] build_components app/usb_report_filter
|
2014-09-23 11:01:47 +00:00
|
|
|
lappend_if [have_spec x86] build_components drivers/rtc
|
2016-01-21 16:03:31 +00:00
|
|
|
lappend_if [expr $use_ram_fs || $use_usb] build_components server/ram_fs
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
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
|
|
|
|
|
2014-02-12 12:53:42 +00:00
|
|
|
build $build_components
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
set config {
|
2014-07-02 10:11:20 +00:00
|
|
|
<config verbose="yes" prio_levels="4">
|
2014-02-12 12:53:42 +00:00
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="RAM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
2015-03-30 16:00:43 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2014-02-12 12:53:42 +00:00
|
|
|
</default-route>
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
2015-05-28 11:43:13 +00:00
|
|
|
<start name="ahci_drv" priority="-1">
|
2014-02-12 12:53:42 +00:00
|
|
|
<resource name="RAM" quantum="10M" />
|
|
|
|
<provides><service name="Block" /></provides>
|
2015-05-08 17:45:38 +00:00
|
|
|
<config>
|
|
|
|
<policy label="part_blk" device="0" />
|
|
|
|
</config>
|
2014-02-12 12:53:42 +00:00
|
|
|
<route>
|
2015-05-28 11:43:13 +00:00
|
|
|
<service name="IRQ"><child name="acpi_drv" /></service>
|
2014-02-12 12:53:42 +00:00
|
|
|
<any-service> <parent /> <any-child /></any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
2014-07-02 10:11:20 +00:00
|
|
|
<start name="part_blk" priority="-1">
|
2014-02-12 12:53:42 +00:00
|
|
|
<resource name="RAM" quantum="10M" />
|
|
|
|
<provides><service name="Block" /></provides>
|
|
|
|
<route>
|
2015-05-28 11:43:13 +00:00
|
|
|
<any-service><child name="ahci_drv"/> <parent/><any-child/></any-service>
|
2014-02-12 12:53:42 +00:00
|
|
|
</route>
|
|
|
|
<config>
|
|
|
|
<policy label="rump_fs" partition="4"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
2014-07-02 10:11:20 +00:00
|
|
|
<start name="rump_fs" priority="-1">
|
2014-03-10 11:07:49 +00:00
|
|
|
<resource name="RAM" quantum="32M" />
|
2014-02-12 12:53:42 +00:00
|
|
|
<provides><service name="File_system"/></provides>
|
2015-11-18 11:17:32 +00:00
|
|
|
<config fs="ext2fs"><policy root="/" writeable="yes"/></config>
|
2014-02-12 12:53:42 +00:00
|
|
|
<route>
|
|
|
|
<any-service><child name="part_blk"/> <parent/><any-child/></any-service>
|
|
|
|
</route>
|
2014-05-23 07:26:57 +00:00
|
|
|
</start>}
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2014-09-23 11:01:47 +00:00
|
|
|
append_if [expr $use_ram_fs] config {
|
|
|
|
<start name="ram_fs" priority="-1">
|
|
|
|
<resource name="RAM" quantum="512M" />
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<content>
|
2015-02-19 10:59:31 +00:00
|
|
|
<dir name="ram"> }
|
|
|
|
append_if [expr $use_ram_fs] config "<rom name=\"${overlay_image}\"/>"
|
|
|
|
append_if [expr $use_ram_fs] config {
|
2014-09-23 11:01:47 +00:00
|
|
|
</dir>
|
|
|
|
</content>
|
|
|
|
<!-- constrain sessions according to their labels -->
|
|
|
|
<policy label="vbox -> from_ram_fs" root="/ram" writeable="yes" />
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
2015-05-28 11:43:13 +00:00
|
|
|
append_platform_drv_config
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2015-02-22 18:04:55 +00:00
|
|
|
append_if [expr $use_ps2] config {
|
2014-07-02 10:11:20 +00:00
|
|
|
<start name="ps2_drv" priority="-1">
|
2014-02-12 12:53:42 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Input"/></provides>
|
2015-02-22 18:04:55 +00:00
|
|
|
<route>
|
2015-05-28 11:43:13 +00:00
|
|
|
<service name="IRQ"><child name="acpi_drv" /></service>
|
2015-02-22 18:04:55 +00:00
|
|
|
<any-service> <parent /> <any-child /></any-service>
|
|
|
|
</route>
|
2014-05-23 07:26:57 +00:00
|
|
|
</start>}
|
2014-02-12 12:53:42 +00:00
|
|
|
|
2015-02-22 18:04:55 +00:00
|
|
|
append_if [expr $use_usb] config {
|
2016-01-21 16:03:31 +00:00
|
|
|
<start name="usb_config_fs" priority="-1">
|
|
|
|
<binary name="ram_fs"/>
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config verbose="yes">
|
|
|
|
<content>
|
|
|
|
<inline name="usb_drv.config">
|
|
|
|
<config uhci="yes" ehci="yes" xhci="yes">
|
|
|
|
<hid/>
|
|
|
|
<raw>
|
|
|
|
<report devices="yes"/>
|
|
|
|
</raw>
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
<inline name="usb_report_filter.config">
|
|
|
|
<config>
|
|
|
|
<!-- USB device whitelist -->
|
|
|
|
<client label="vbox"/>
|
|
|
|
<device vendor_id="0x13fe" product_id="0x5200"/> <!-- platinum stick -->
|
|
|
|
<device vendor_id="0x148f" product_id="0x2573"/> <!-- ralink wifi -->
|
|
|
|
<device vendor_id="0x1f75" product_id="0x0917"/> <!-- intenso stick -->
|
|
|
|
<device vendor_id="0x04f9" product_id="0x0051"/> <!-- brother printer -->
|
|
|
|
<device vendor_id="0x090c" product_id="0x6000"/> <!-- hama sd/hc reader -->
|
|
|
|
<device vendor_id="0x1b1c" product_id="0x1a09"/> <!-- voyager gt stick -->
|
|
|
|
<device vendor_id="0x1b1c" product_id="0x1a03"/> <!-- voyager stick -->
|
|
|
|
<device vendor_id="0x04b3" product_id="0x310d"/> <!-- lenovo mouse -->
|
|
|
|
<device vendor_id="0x04b3" product_id="0x310c"/> <!-- lenovo mouse -->
|
|
|
|
<device vendor_id="0x04b3" product_id="0x3025"/> <!-- lenovo keyboard -->
|
|
|
|
<device vendor_id="0x046a" product_id="0x0001"/> <!-- cherry keyboard -->
|
|
|
|
<device vendor_id="0x0482" product_id="0x0015"/> <!-- kyo printer -->
|
|
|
|
<device vendor_id="0x04a9" product_id="0x2220"/> <!-- canon scanner -->
|
|
|
|
<device vendor_id="0x067b" product_id="0x2303"/> <!-- prolific serial -->
|
|
|
|
<device vendor_id="0x0583" product_id="0x2060"/> <!-- snes controller -->
|
|
|
|
<device vendor_id="0x045e" product_id="0x028e"/> <!-- x360 controller -->
|
|
|
|
<device vendor_id="0x046d" product_id="0xc00e"/> <!-- logitech mouse -->
|
|
|
|
<device vendor_id="0x0984" product_id="0x0066"/> <!-- lenovo DVDRW -->
|
|
|
|
<device vendor_id="0x174c" product_id="0x5106"/> <!-- delock SATA -->
|
|
|
|
</config>
|
|
|
|
</inline>
|
|
|
|
</content>
|
|
|
|
<policy label_prefix="usb_report_filter" root="/" writeable="yes" />
|
|
|
|
<policy label_prefix="usb_config_rom" root="/"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="usb_config_rom" priority="-1">
|
|
|
|
<binary name="fs_rom"/>
|
2016-04-15 13:19:22 +00:00
|
|
|
<resource name="RAM" quantum="1200K"/>
|
2016-01-21 16:03:31 +00:00
|
|
|
<provides><service name="ROM"/></provides>
|
|
|
|
<route>
|
|
|
|
<service name="File_system"><child name="usb_config_fs"/></service>
|
|
|
|
<any-service><parent/><any-child/></any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="usb_report_filter" priority="-1">
|
2016-04-15 13:19:22 +00:00
|
|
|
<resource name="RAM" quantum="1200K"/>
|
2016-01-21 16:03:31 +00:00
|
|
|
<configfile name="usb_report_filter.config"/>
|
|
|
|
<route>
|
|
|
|
<service name="Report"><child name="report_rom" /></service>
|
|
|
|
<service name="ROM" label="usb_report_filter.config">
|
|
|
|
<child name="usb_config_rom"/>
|
|
|
|
</service>
|
|
|
|
<service name="ROM" label="devices">
|
|
|
|
<child name="report_rom"/>
|
|
|
|
</service>
|
|
|
|
<service name="ROM" label="usb_drv_config">
|
|
|
|
<child name="report_rom"/>
|
|
|
|
</service>
|
|
|
|
<service name="File_system" label="usb_drv.config">
|
|
|
|
<child name="usb_config_fs"/>
|
|
|
|
</service>
|
|
|
|
<any-service><parent/><any-child /></any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
2015-02-22 18:04:55 +00:00
|
|
|
<start name="usb_drv" priority="-1">
|
2016-01-21 16:03:31 +00:00
|
|
|
<resource name="RAM" quantum="16M"/>
|
2015-05-08 17:19:05 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Input"/>
|
|
|
|
<service name="Usb" />
|
|
|
|
</provides>
|
2016-01-21 16:03:31 +00:00
|
|
|
<configfile name="usb_drv.config"/>
|
2015-02-22 18:04:55 +00:00
|
|
|
<route>
|
2015-05-28 11:43:13 +00:00
|
|
|
<service name="IRQ"><child name="acpi_drv" /></service>
|
2015-05-26 18:12:17 +00:00
|
|
|
<service name="Report"><child name="report_rom" /></service>
|
2016-01-21 16:03:31 +00:00
|
|
|
<service name="ROM" label="usb_drv.config"><child name="usb_config_rom"/></service>
|
|
|
|
<any-service><parent /><any-child /></any-service>
|
2015-02-22 18:04:55 +00:00
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
}
|
|
|
|
|
2014-02-12 12:53:42 +00:00
|
|
|
append_if [have_spec framebuffer] config {
|
2014-07-02 10:11:20 +00:00
|
|
|
<start name="fb_drv" priority="-1">
|
2014-02-12 12:53:42 +00:00
|
|
|
<resource name="RAM" quantum="6M"/>
|
|
|
|
<provides><service name="Framebuffer"/></provides>
|
2015-03-30 16:00:43 +00:00
|
|
|
<config buffered="yes" />
|
2014-02-12 12:53:42 +00:00
|
|
|
</start>}
|
|
|
|
|
2014-05-23 07:26:57 +00:00
|
|
|
append_if [have_spec x86] config {
|
2014-07-02 10:11:20 +00:00
|
|
|
<start name="rtc_drv" priority="-1">
|
2014-05-23 07:26:57 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="Rtc"/>
|
|
|
|
</provides>
|
|
|
|
</start>}
|
|
|
|
|
2014-02-12 12:53:42 +00:00
|
|
|
append config $config_of_app
|
|
|
|
|
|
|
|
append config {
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
2014-05-28 12:48:33 +00:00
|
|
|
append boot_modules {
|
2014-02-12 12:53:42 +00:00
|
|
|
core init timer
|
2016-01-21 16:03:31 +00:00
|
|
|
part_blk ahci_drv fs_rom
|
2014-05-23 07:26:57 +00:00
|
|
|
ld.lib.so libc.lib.so libm.lib.so pthread.lib.so
|
|
|
|
libc_lock_pipe.lib.so libc_terminal.lib.so
|
2014-09-23 11:01:47 +00:00
|
|
|
libiconv.lib.so stdcxx.lib.so
|
2014-02-12 12:53:42 +00:00
|
|
|
rump.lib.so rump_fs.lib.so rump_fs
|
2016-01-21 16:03:31 +00:00
|
|
|
virtualbox qemu-usb.lib.so
|
2014-02-12 12:53:42 +00:00
|
|
|
}
|
|
|
|
|
2016-01-21 16:03:31 +00:00
|
|
|
lappend_if [expr $use_ram_fs || $use_usb] boot_modules ram_fs
|
|
|
|
lappend_if [expr $use_ram_fs] boot_modules ${overlay_image}
|
2014-09-23 11:01:47 +00:00
|
|
|
|
2014-02-12 12:53:42 +00:00
|
|
|
# platform-specific modules
|
2015-02-22 18:04:55 +00:00
|
|
|
lappend_if [expr $use_ps2] boot_modules ps2_drv
|
|
|
|
lappend_if [expr $use_usb] boot_modules usb_drv
|
2016-01-21 16:03:31 +00:00
|
|
|
lappend_if [expr $use_usb] boot_modules usb_report_filter
|
2014-02-12 12:53:42 +00:00
|
|
|
lappend_if [have_spec framebuffer] boot_modules fb_drv
|
2014-05-23 07:26:57 +00:00
|
|
|
lappend_if [have_spec x86] boot_modules rtc_drv
|
2015-05-28 11:43:13 +00:00
|
|
|
|
|
|
|
append_platform_drv_boot_modules
|