mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
c81af531a3
This patch replaces the use of the "Framebuffer" session interface by the new "Capture" session interface in all framebuffer drivers. Thanks to this change, those drivers have become mere clients of the nitpicker GUI server now, and are no longer critical for the liveliness of the GUI server. The patch touches the following areas: - The actual driver components. The new versions of all drivers have been tested on the respective hardware. Generally, the drivers have become simpler. - The drivers_interactive packages for various boards. The drivers subsystem no longer provides a "Framebuffer" service but needs a valid route to the "Capture" service provided by nitpicker. - The driver manager of Sculpt OS. - This patch changes the role of the test-framebuffer component from a framebuffer client to a capture server so that drivers (capture clients) can be directly connected to the test component without the nitpicker server. - Framebuffer driver no longer support the unbuffered mode. - The fb_bench.run script is no longer very meaningful because it interplays solely with nitpicker, not with the driver directly. - All run scripts for graphical scenarios and the related depot archives got adapted to the change. Fixes #3813
175 lines
5.4 KiB
Plaintext
175 lines
5.4 KiB
Plaintext
if {![have_spec x86] || [have_spec linux]} {
|
|
puts "Platform is unsupported."
|
|
exit 0
|
|
}
|
|
|
|
build { app/driver_manager test/driver_manager lib/ld }
|
|
|
|
create_boot_directory
|
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
[depot_user]/pkg/drivers_managed-pc \
|
|
[depot_user]/src/report_rom \
|
|
[depot_user]/src/dynamic_rom \
|
|
[depot_user]/src/nitpicker \
|
|
[depot_user]/src/init
|
|
|
|
install_config {
|
|
<config prio_levels="2">
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<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>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="100"/>
|
|
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
|
|
<start name="report_rom">
|
|
<binary name="report_rom"/>
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
<config verbose="yes">
|
|
<policy label="test-driver_manager -> block_devices" report="drivers -> block_devices"/>
|
|
<policy label="test-driver_manager -> displays" report="nitpicker -> displays"/>
|
|
</config>
|
|
</start>
|
|
|
|
<start name="drivers" caps="2500">
|
|
<resource name="RAM" quantum="64M" constrain_phys="yes"/>
|
|
<binary name="init"/>
|
|
<route>
|
|
<service name="ROM" label_last="managed/input_filter">
|
|
<parent label="input_filter.config"/> </service>
|
|
<service name="ROM" label_last="numlock_remap">
|
|
<parent label="numlock_remap.config"/> </service>
|
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
|
<service name="ROM" label="capslock"> <child name="dynamic_rom"/> </service>
|
|
<service name="ROM" label="numlock"> <child name="dynamic_rom"/> </service>
|
|
<service name="ROM" label="system"> <child name="dynamic_rom"/> </service>
|
|
<service name="ROM" label="usb_policy"><child name="dynamic_rom"/> </service>
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
<service name="Capture"> <child name="nitpicker"/> </service>
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
<provides>
|
|
<service name="Input"/>
|
|
<service name="Block"/>
|
|
</provides>
|
|
</start>
|
|
|
|
<start name="dynamic_rom">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides> <service name="ROM"/> </provides>
|
|
<config verbose="yes">
|
|
<rom name="capslock">
|
|
<inline> <capslock enabled="no"/> </inline>
|
|
<sleep milliseconds="500" />
|
|
<inline> <capslock enabled="yes"/> </inline>
|
|
<sleep milliseconds="500" />
|
|
</rom>
|
|
<rom name="numlock">
|
|
<inline> <numlock enabled="no"/> </inline>
|
|
<sleep milliseconds="1000" />
|
|
<inline> <numlock enabled="yes"/> </inline>
|
|
<sleep milliseconds="1000" />
|
|
</rom>
|
|
<rom name="system">
|
|
<inline> <system state=""/> </inline>
|
|
<sleep milliseconds="10000" />
|
|
</rom>
|
|
<rom name="numlock_remap">
|
|
<inline> <system state=""/> </inline>
|
|
<sleep milliseconds="10000" />
|
|
</rom>
|
|
</config>
|
|
</start>
|
|
|
|
<start name="nitpicker">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides> <service name="Gui"/> <service name="Capture"/> </provides>
|
|
<config request_framebuffer="no" request_input="no">
|
|
<capture/>
|
|
<report displays="yes"/>
|
|
</config>
|
|
<route>
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
<start name="test-driver_manager">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<config>
|
|
<check_ahci_block_device label="ahci-1" block_count="65536" block_size="512"
|
|
model="QEMU HARDDISK"/>
|
|
<check_input/>
|
|
<check_displays/>
|
|
</config>
|
|
<route>
|
|
<service name="ROM" label="block_devices"> <child name="report_rom"/> </service>
|
|
<service name="ROM" label="displays"> <child name="report_rom"/> </service>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</route>
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
set fd [open [run_dir]/genode/fb_drv.config "w"]
|
|
puts $fd {
|
|
<config width="1024" height="768" buffered="yes"> <!-- used by VESA driver -->
|
|
<report connectors="yes"/>
|
|
<connector name="eDP-36" width="1920" height="1080" enabled="true"/>
|
|
</config>}
|
|
close $fd
|
|
|
|
set fd [open [run_dir]/genode/usb_policy "w"]
|
|
puts $fd {<usb/>}
|
|
close $fd
|
|
|
|
|
|
#
|
|
# Override 'drivers.config' as supplied with the 'drivers_managed-pc' pkg
|
|
# with the (possibly modified) version found in the source tree. This avoids
|
|
# the need to re-create the pkg while testing modifications of this file.
|
|
#
|
|
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.config \
|
|
[run_dir]/genode/drivers.config
|
|
|
|
build_boot_image { driver_manager test-driver_manager ld.lib.so }
|
|
|
|
#
|
|
# Build ext2 file-system images to be supplied to Qemu
|
|
#
|
|
if {[have_include "power_on/qemu"]} {
|
|
|
|
set mke2fs [installed_command mke2fs]
|
|
set dd [installed_command dd]
|
|
|
|
catch { exec $dd if=/dev/zero of=bin/hdd_disk.raw bs=1M count=32 }
|
|
catch { exec $mke2fs -F bin/hdd_disk.raw }
|
|
}
|
|
|
|
#
|
|
# Qemu opts for supplying hdd_disk.raw as AHCI disk
|
|
#
|
|
append qemu_args " -m 128 "
|
|
append qemu_args " -nographic "
|
|
append qemu_args " -device ahci,id=ahci "
|
|
append qemu_args " -drive id=hdd,file=bin/hdd_disk.raw,format=raw,if=none -device ide-hd,drive=hdd,bus=ahci.1 "
|
|
|
|
run_genode_until {.*all expected devices present and accessible.*\n} 120
|
|
|