Turn USB HID drivers into event-session clients

Issue #3845
This commit is contained in:
Norman Feske 2020-08-13 16:03:59 +02:00
parent 974118acec
commit a2381c7e4c
26 changed files with 105 additions and 186 deletions

View File

@ -39,12 +39,14 @@ Configuration snippet:
!<start name="usb_drv">
! <resource name="RAM" quantum="12M"/>
! <provides><service name="Input"/></provides>
! <config uhci="yes" ohci="yes" ehci="yes" xhci="yes">
! <hid/>
! </config>
!</start>
With '<hid>' config node in place, the USB driver requests an "Event" session
for reporting input events.
Note: It has been observed that certain 1.0 versions of Qemu do not generate
mouse interrupts. The mouse driver should work correctly on Qemu 1.0.93 and
above.
@ -92,7 +94,6 @@ Configuration snippet:
! <resource name="RAM" quantum="12M"/>
! <provides>
! <service name="Nic"/>
! <service name="Input"/>
! </provides>
! <config ehci="yes" xhci="yes">
! <nic mac="2e:60:90:0c:4e:01" />

View File

@ -1,5 +1,4 @@
_/src/imx8_fb_drv
_/src/usb_host_drv
_/src/usb_hid_drv
_/src/input_event_client
_/raw/drivers_interactive-imx8q_evk

View File

@ -1,5 +1,4 @@
_/src/platform_drv
_/src/usb_drv
_/src/rpi_fb_drv
_/src/input_event_client
_/raw/drivers_interactive-rpi

View File

@ -46,6 +46,7 @@
<config use_report="yes"/>
<route>
<service name="ROM" label="report"> <child name="report_rom"/> </service>
<service name="Event"> <parent/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
@ -67,13 +68,4 @@
</route>
</start>
<start name="input_event_client" caps="90">
<resource name="RAM" quantum="1M"/>
<config/>
<route>
<service name="Event"> <parent/> </service>
<service name="Input"> <child name="usb_hid_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>

View File

@ -51,7 +51,6 @@
<start name="input_drv" caps="120">
<binary name="rpi_usb_drv"/>
<resource name="RAM" quantum="14M"/>
<provides> <service name="Input"/> </provides>
<config uhci="yes" ehci="yes" xhci="no"> <hid/> </config>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
@ -63,16 +62,8 @@
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
<service name="Event"> <parent/> </service>
</route>
</start>
<start name="input_event_client" caps="90">
<resource name="RAM" quantum="1M"/>
<config/>
<route>
<service name="Event"> <parent/> </service>
<service name="Input"> <child name="input_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>

View File

@ -3,7 +3,7 @@ os
nic_session
usb_session
gpio_session
input_session
event_session
block_session
platform_session
timer_session

View File

@ -1,6 +1,6 @@
base
os
input_session
event_session
report_session
usb_session
timer_session

View File

@ -68,7 +68,7 @@ proc usb_drv_binary { } {
set build_components {
core init timer
drivers/usb
test/input
server/event_dump
server/dynamic_rom
}
@ -115,7 +115,6 @@ append config {
<binary name="} [usb_drv_binary] {"/>
<resource name="RAM" quantum="12M"/>
<resource name="CPU" quantum="80"/>
<provides><service name="Input"/></provides>
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes"
capslock_led="rom" numlock_led="rom" scrlock_led="rom"
bios_handoff="yes">
@ -136,6 +135,7 @@ append config {
<service name="Platform"> <any-child/> </service>
<service name="Regulator"> <child name="platform_drv"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<service name="Event"> <child name="event_dump"/> </service>
</route>
</start>
@ -171,8 +171,10 @@ append config {
</route>
</start>
<start name="test-input" priority="-1">
<start name="event_dump" priority="-1">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Event"/> </provides>
<config/>
</start>
</config>}
@ -184,7 +186,7 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init timer test-input dynamic_rom
core ld.lib.so init timer event_dump dynamic_rom
}
append boot_modules [usb_drv_binary]
@ -202,12 +204,12 @@ if { [have_include "power_on/qemu"] || ![get_cmd_switch --autopilot] } { run_gen
# autopilot test
run_genode_until {\[init -\> test-input\] Input event #0\t} 60
run_genode_until {\[init -\> event_dump\] Input event #0\t} 60
# remove everything before the first interesting line
regexp {(\[init -\> test-input\] Input event #0\t.*)} $output all output
regexp {(\[init -\> event_dump\] Input event #0\t.*)} $output all output
run_genode_until {\[init -\> test-input\] Input event #11.*\n} 40 [output_spawn_id]
run_genode_until {\[init -\> event_dump\] Input event #11.*\n} 40 [output_spawn_id]
# pay only attention to the output of init and its children
grep_output {^\[init }
@ -222,22 +224,22 @@ filter_out_color_escape_sequences
trim_lines
compare_output_to {
[init -> test-input] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> test-input] Input event #1 RELEASE KEY_X key count: 0
[init -> test-input] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> test-input] Input event #3 REL_MOTION -1+0 key count: 1
[init -> test-input] Input event #4 REL_MOTION +0+1 key count: 1
[init -> test-input] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> event_dump] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> event_dump] Input event #1 RELEASE KEY_X key count: 0
[init -> event_dump] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> event_dump] Input event #3 REL_MOTION -1+0 key count: 1
[init -> event_dump] Input event #4 REL_MOTION +0+1 key count: 1
[init -> event_dump] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> usb_drv] dev_info: USB disconnect, device
[init -> usb_drv] dev_info: new full-speed USB device
[init -> usb_drv] dev_info: D L
[init -> usb_drv] dev_info: input: USB HID v1.11 Keyboard [D L]
[init -> usb_drv] dev_info: D L
[init -> usb_drv] dev_info: input: USB HID v1.11 Mouse [D L]
[init -> test-input] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> test-input] Input event #7 RELEASE KEY_X key count: 0
[init -> test-input] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> test-input] Input event #9 REL_MOTION -1+0 key count: 1
[init -> test-input] Input event #10 REL_MOTION +0+1 key count: 1
[init -> test-input] Input event #11 RELEASE BTN_LEFT key count: 0
[init -> event_dump] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> event_dump] Input event #7 RELEASE KEY_X key count: 0
[init -> event_dump] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> event_dump] Input event #9 REL_MOTION -1+0 key count: 1
[init -> event_dump] Input event #10 REL_MOTION +0+1 key count: 1
[init -> event_dump] Input event #11 RELEASE BTN_LEFT key count: 0
}

View File

@ -66,7 +66,7 @@ set build_components {
core init timer
drivers/usb_host
drivers/usb_hid
test/input
server/event_dump
server/dynamic_rom
server/report_rom
}
@ -141,13 +141,13 @@ append config {
<start name="usb_hid_drv" caps="140">
<resource name="RAM" quantum="11M"/>
<provides><service name="Input"/></provides>
<config use_report="yes" capslock_led="rom" numlock_led="rom" scrlock_led="rom"/>
<route>
<service name="ROM" label="capslock"> <child name="dynamic_rom"/> </service>
<service name="ROM" label="numlock"> <child name="dynamic_rom"/> </service>
<service name="ROM" label="scrlock"> <child name="dynamic_rom"/> </service>
<service name="ROM" label="report"> <child name="report_rom"/> </service>
<service name="Event"> <child name="event_dump"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
@ -184,8 +184,10 @@ append config {
</route>
</start>
<start name="test-input">
<start name="event_dump">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Event"/> </provides>
<config/>
</start>
</config>}
@ -197,7 +199,7 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init timer usb_hid_drv test-input dynamic_rom report_rom
core ld.lib.so init timer usb_hid_drv event_dump dynamic_rom report_rom
}
append boot_modules [usb_host_drv_binary]
@ -215,12 +217,12 @@ if { [have_include "power_on/qemu"] || ![get_cmd_switch --autopilot] } { run_gen
# autopilot test
run_genode_until {\[init -\> test-input\] Input event #0\t} 60
run_genode_until {\[init -\> event_dump\] Input event #0\t} 60
# remove everything before the first interesting line
regexp {(\[init -\> test-input\] Input event #0\t.*)} $output all output
regexp {(\[init -\> event_dump\] Input event #0\t.*)} $output all output
run_genode_until {\[init -\> test-input\] Input event #11.*\n} 40 [output_spawn_id]
run_genode_until {\[init -\> event_dump\] Input event #11.*\n} 40 [output_spawn_id]
# pay only attention to the output of init and its children
grep_output {^\[init }
@ -235,20 +237,20 @@ filter_out_color_escape_sequences
trim_lines
compare_output_to {
[init -> test-input] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> test-input] Input event #1 RELEASE KEY_X key count: 0
[init -> test-input] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> test-input] Input event #3 REL_MOTION -1+0 key count: 1
[init -> test-input] Input event #4 REL_MOTION +0+1 key count: 1
[init -> test-input] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> event_dump] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> event_dump] Input event #1 RELEASE KEY_X key count: 0
[init -> event_dump] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> event_dump] Input event #3 REL_MOTION -1+0 key count: 1
[init -> event_dump] Input event #4 REL_MOTION +0+1 key count: 1
[init -> event_dump] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> usb_drv] dev_info: USB disconnect, device
[init -> usb_drv] dev_info: new full-speed USB device
[init -> usb_hid_drv] dev_info: input: USB HID v1.11 Keyboard [HID 03eb:204d]
[init -> usb_hid_drv] dev_info: input: USB HID v1.11 Mouse [HID 03eb:204d]
[init -> test-input] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> test-input] Input event #7 RELEASE KEY_X key count: 0
[init -> test-input] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> test-input] Input event #9 REL_MOTION -1+0 key count: 1
[init -> test-input] Input event #10 REL_MOTION +0+1 key count: 1
[init -> test-input] Input event #11 RELEASE BTN_LEFT key count: 0
[init -> event_dump] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> event_dump] Input event #7 RELEASE KEY_X key count: 0
[init -> event_dump] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> event_dump] Input event #9 REL_MOTION -1+0 key count: 1
[init -> event_dump] Input event #10 REL_MOTION +0+1 key count: 1
[init -> event_dump] Input event #11 RELEASE BTN_LEFT key count: 0
}

View File

@ -27,7 +27,7 @@ if { [get_cmd_switch --autopilot] && ![have_spec x86_64] } {
set build_components {
core init timer
drivers/usb
test/input
server/event_dump
server/dynamic_rom
}
@ -69,7 +69,6 @@ append config {
<start name="usb_drv" caps="120">
<resource name="RAM" quantum="12M"/>
<provides><service name="Input"/></provides>
<config uhci="no" ohci="no" ehci="no" xhci="yes"
capslock_led="rom" numlock_led="rom" scrlock_led="rom"
bios_handoff="yes">
@ -88,6 +87,7 @@ append config {
<service name="RM"> <parent/> </service>
<service name="Platform"> <any-child/> </service>
<service name="Timer"> <child name="timer"/> </service>
<service name="Event"> <child name="event_dump"/> </service>
</route>
</start>
@ -123,8 +123,10 @@ append config {
</route>
</start>
<start name="test-input">
<start name="event_dump">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Event"/> </provides>
<config/>
</start>
</config>}
@ -136,7 +138,7 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init timer usb_drv test-input dynamic_rom
core ld.lib.so init timer usb_drv event_dump dynamic_rom
}
append_platform_drv_boot_modules

View File

@ -3194,7 +3194,7 @@ void genode_input_register(genode_input_event_cb handler, unsigned long res_x,
void genode_evdev_event(struct input_handle *handle, unsigned int type,
unsigned int code, int value);
void start_input_service(void *ep, void *);
void start_input_service(void *);
/******************

View File

@ -14,7 +14,7 @@
*/
#include <base/rpc_server.h>
#include <input/root.h>
#include <event_session/connection.h>
#include <os/ring_buffer.h>
#include <lx_emul.h>
@ -28,13 +28,7 @@ using namespace Genode;
/**
* Singleton instance of input-session component
*/
static Genode::Constructible<Input::Session_component> _input_session;
/**
* Singleton instance of input-root component
*/
static Genode::Constructible<Input::Root_component> _input_root;
static Genode::Constructible<Event::Connection> _event_session;
/**
@ -43,9 +37,12 @@ static Genode::Constructible<Input::Root_component> _input_root;
static void input_callback(enum input_event_type type,
unsigned code, int ax, int ay, int rx, int ry)
{
using namespace Input;
auto submit = [&] (Input::Event const &ev) {
_event_session->with_batch([&] (Event::Session_client::Batch &batch) {
batch.submit(ev); });
};
auto submit = [&] (Event const &ev) { _input_session->submit(ev); };
using namespace Input;
switch (type) {
case EVENT_TYPE_PRESS: submit(Press{Keycode(code)}); break;
@ -71,16 +68,12 @@ static void input_callback(enum input_event_type type,
}
void start_input_service(void *ep_ptr, void * service_ptr)
void start_input_service(void *service_ptr)
{
Rpc_entrypoint *ep = static_cast<Rpc_entrypoint *>(ep_ptr);
Services *service = static_cast<Services *>(service_ptr);
Env &env = service->env;
_input_session.construct(env, env.ram());
_input_root.construct(*ep, *_input_session);
env.parent().announce(ep->manage(&*_input_root));
_event_session.construct(env);
genode_input_register(input_callback, service->screen_width,
service->screen_height, service->multitouch);

View File

@ -45,8 +45,6 @@ extern "C" void module_mt_driver_init();
extern "C" void module_raw_driver_init();
extern "C" void module_led_init();
extern "C" void start_input_service(void *ep, void *services);
struct workqueue_struct *system_power_efficient_wq;
struct workqueue_struct *system_wq;
struct workqueue_struct *tasklet_wq;
@ -122,7 +120,7 @@ void start_usb_driver(Genode::Env &env)
static Services services(env);
if (services.hid)
start_input_service(&env.ep().rpc_ep(), &services);
start_input_service(&services);
Storage::init(env);
Nic::init(env);

View File

@ -1,15 +1,14 @@
USB HID driver
##############
Supports keyboard and mouse connected via USB.
It connects to one or multiple USB sessions. A run script can be found
under 'run/usb_hid.run'.
Supports keyboard and mouse connected via USB. It connects to one or multiple
USB sessions and reports input events to an event session. A run script can be
found under 'run/usb_hid.run'.
Configuration snippet:
!<start name="usb_hid_drv">
! <resource name="RAM" quantum="10M"/>
! <provides><service name="Input"/></provides>
! <config use_report="yes"/>
!</start>

View File

@ -17,8 +17,8 @@
#include <base/allocator_avl.h>
#include <base/attached_rom_dataspace.h>
#include <base/heap.h>
#include <input/root.h>
#include <usb_session/connection.h>
#include <event_session/connection.h>
#include <lx_kit/scheduler.h>
struct usb_device_id;
@ -97,8 +97,7 @@ struct Driver
Genode::Entrypoint &ep { env.ep() };
Genode::Heap heap { env.ram(), env.rm() };
Genode::Allocator_avl alloc { &heap };
Input::Session_component session { env, env.ram() };
Input::Root_component root { env.ep().rpc_ep(), session };
Event::Connection event { env };
Genode::Constructible<Task> main_task;
Genode::Constructible<Genode::Attached_rom_dataspace> report_rom;

View File

@ -184,8 +184,6 @@ void Driver::main_task_entry(void * arg)
Genode::log("Configured HID screen with ", screen_x, "x", screen_y,
" (multitouch=", multi_touch ? "true" : "false", ")");
driver->env.parent().announce(driver->ep.manage(driver->root));
for (;;) {
if (!use_report)
static Device dev(*driver, Label(""));
@ -237,9 +235,13 @@ void Driver::scan_report()
void Driver::input_callback(Input_event type, unsigned code,
int ax, int ay, int rx, int ry)
{
using namespace Input;
auto submit = [&] (Input::Event const &ev)
{
driver->event.with_batch([&] (Event::Session_client::Batch &batch) {
batch.submit(ev); });
};
auto submit = [&] (Event const &ev) { driver->session.submit(ev); };
using namespace Input;
switch (type) {
case EVENT_TYPE_PRESS: submit(Press{Keycode(code)}); break;

View File

@ -13,5 +13,4 @@ _/src/init
_/src/driver_manager
_/src/rom_filter
_/src/rom_reporter
_/src/input_event_client
_/raw/drivers_managed-pc

View File

@ -122,9 +122,10 @@
<start name="usb_drv" caps="200" priority="-1">
<resource name="RAM" quantum="16M"/>
<provides> <service name="Input"/> <service name="Usb"/> </provides>
<provides> <service name="Usb"/> </provides>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="ROM" label="config">
<child name="report_rom"/> </service>
<service name="ROM" label="capslock"> <parent label="capslock"/> </service>
@ -184,17 +185,6 @@
</route>
</start>
<start name="usb" caps="90">
<resource name="RAM" quantum="1M"/>
<binary name="input_event_client"/>
<config/>
<route>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="Input"> <child name="usb_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="driver_manager" priority="-1">
<resource name="RAM" quantum="1M"/>
<route>

View File

@ -3,5 +3,4 @@ _/src/ps2_drv
_/src/usb_drv
_/src/vesa_drv
_/src/event_filter
_/src/input_event_client
_/raw/drivers_interactive-muen

View File

@ -5,5 +5,4 @@ _/src/usb_drv
_/src/vesa_drv
_/src/report_rom
_/src/event_filter
_/src/input_event_client
_/raw/drivers_interactive-pc

View File

@ -71,10 +71,10 @@
<start name="usb_drv" caps="150">
<resource name="RAM" quantum="14M"/>
<provides> <service name="Input"/> </provides>
<config uhci="yes" ehci="yes" xhci="yes"> <hid/> </config>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
@ -98,15 +98,4 @@
</route>
</start>
<start name="usb" caps="90">
<resource name="RAM" quantum="1M"/>
<binary name="input_event_client"/>
<config/>
<route>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="Input"> <child name="usb_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>

View File

@ -104,10 +104,10 @@
<start name="usb_drv" caps="150">
<resource name="RAM" quantum="14M"/>
<provides> <service name="Input"/> </provides>
<config uhci="yes" ehci="yes" xhci="yes"> <hid/> </config>
<route>
<service name="Platform"> <child name="platform_drv"/> </service>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
@ -131,15 +131,4 @@
</route>
</start>
<start name="usb" caps="90">
<resource name="RAM" quantum="1M"/>
<binary name="input_event_client"/>
<config/>
<route>
<service name="Event"> <child name="event_filter" label="usb"/> </service>
<service name="Input"> <child name="usb_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
</config>

View File

@ -399,7 +399,6 @@ append config {
append_if $use_usb config {
<start name="usb_drv" priority="-1" caps="120">
<resource name="RAM" quantum="12M"/>
<provides><service name="Input"/></provides>
<config uhci="yes" ehci="yes" xhci="yes">
<hid/>
</config>

View File

@ -274,12 +274,12 @@ if { ![get_cmd_switch --autopilot] } { run_genode_until forever }
# autopilot test
run_genode_until {\[init -\> log_terminal\] \[init -\> test-input\] Input event #0\t} 90
run_genode_until {\[init -\> log_terminal\] \[init -\> event_dump\] Input event #0\t} 90
# remove everything before the first interesting line
regexp {(\[init -\> log_terminal\] \[init -\> test-input\] Input event #0\t.*)} $output all output
regexp {(\[init -\> log_terminal\] \[init -\> event_dump\] Input event #0\t.*)} $output all output
run_genode_until {.*\[init -\> test-input\] Input event #11.*\n} 60 [output_spawn_id]
run_genode_until {.*\[init -\> event_dump\] Input event #11.*\n} 60 [output_spawn_id]
unify_output { number [0-9]+} ""
unify_output {(?n)on usb-dummy.*$} ""
@ -294,12 +294,12 @@ filter_out_color_escape_sequences
trim_lines
compare_output_to {
[init -> log_terminal] [init -> test-input] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> log_terminal] [init -> test-input] Input event #1 RELEASE KEY_X key count: 0
[init -> log_terminal] [init -> test-input] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> log_terminal] [init -> test-input] Input event #3 REL_MOTION -1+0 key count: 1
[init -> log_terminal] [init -> test-input] Input event #4 REL_MOTION +0+1 key count: 1
[init -> log_terminal] [init -> test-input] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> log_terminal] [init -> event_dump] Input event #0 PRESS KEY_X 65534 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #1 RELEASE KEY_X key count: 0
[init -> log_terminal] [init -> event_dump] Input event #2 PRESS BTN_LEFT 65534 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #3 REL_MOTION -1+0 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #4 REL_MOTION +0+1 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> usb_drv] dev_info: USB disconnect, device
[init -> log_terminal] [init -> usb_drv] dev_info: USB disconnect, device
[init -> usb_drv] dev_info: new full-speed USB device
@ -309,10 +309,10 @@ compare_output_to {
[init -> log_terminal] [init -> usb_drv] dev_info: input: USB HID v1.11 Keyboard [D L]
[init -> log_terminal] [init -> usb_drv] dev_info: D L
[init -> log_terminal] [init -> usb_drv] dev_info: input: USB HID v1.11 Mouse [D L]
[init -> log_terminal] [init -> test-input] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> log_terminal] [init -> test-input] Input event #7 RELEASE KEY_X key count: 0
[init -> log_terminal] [init -> test-input] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> log_terminal] [init -> test-input] Input event #9 REL_MOTION -1+0 key count: 1
[init -> log_terminal] [init -> test-input] Input event #10 REL_MOTION +0+1 key count: 1
[init -> log_terminal] [init -> test-input] Input event #11 RELEASE BTN_LEFT key count: 0
[init -> log_terminal] [init -> event_dump] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #7 RELEASE KEY_X key count: 0
[init -> log_terminal] [init -> event_dump] Input event #8 PRESS BTN_LEFT 65534 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #9 REL_MOTION -1+0 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #10 REL_MOTION +0+1 key count: 1
[init -> log_terminal] [init -> event_dump] Input event #11 RELEASE BTN_LEFT key count: 0
}

View File

@ -91,8 +91,7 @@ append_if [expr $use_ps2] config {
append_if [expr $use_usb] config {
<start name="usb_drv" priority="-1" caps="120">
<resource name="RAM" quantum="12M"/>
<provides><service name="Input"/></provides>}
<resource name="RAM" quantum="12M"/>}
append_if [expr $use_usb] config {
<config uhci="yes" ehci="yes" xhci="yes">
@ -114,7 +113,6 @@ append_if [have_spec framebuffer] config {
append_if [have_spec sdl] config {
<start name="fb_sdl" priority="-1" ld="no">
<resource name="RAM" quantum="4M"/>
<provides> <service name="Input"/> </provides>
</start>}
append_if [have_spec x86] config {
@ -172,9 +170,6 @@ append config {
<route>
<service name="Report"> <child name="report_rom" /> </service>}
append_if [expr $use_usb] config {
<service name="Input"> <child name="usb_drv"/> </service>}
append config {
<any-service> <parent/> <any-child /> </any-service>
</route>
@ -222,8 +217,6 @@ append_if [expr $use_gui] config {
<service name="Nic"> <child name="nic_bridge"/> </service>
<service name="Report" label="shape"> <child name="pointer" label="gui_fb2 -> shape"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Framebuffer"> <child name="gui_fb2" /> </service>
<service name="Input"> <child name="gui_fb2" /> </service>
<any-service> <parent /> <any-child /> </any-service>
</route>
</start>}
@ -256,8 +249,6 @@ append_if [expr $use_bridge] config {
append config {
<service name="Report" label="shape"> <child name="pointer" label="gui_fb1 -> shape"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Framebuffer"> <child name="gui_fb1" /> </service>
<service name="Input"> <child name="gui_fb1" /> </service>
<any-service> <parent /> <any-child /> </any-service>
</route>
</start>

View File

@ -35,7 +35,6 @@ append build_components {
server/fs_rom
drivers/ahci
drivers/framebuffer
app/input_event_client
}
lappend_if [expr $use_serial] build_components server/log_terminal
@ -340,28 +339,15 @@ append_if [expr $use_usb] config {
<start name="usb_drv" priority="-1" caps="120">
<resource name="RAM" quantum="20M"/>
<provides>
<service name="Input"/>
<service name="Usb"/>
</provides>
<provides> <service name="Usb"/> </provides>
<route>
<service name="Report"><child name="report_rom"/></service>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Event"> <child name="event_filter" label="usb_hid"/> </service>
<service name="ROM" label="config">
<child name="usb_config_rom" label="usb_drv.config"/> </service>
<any-service><parent/><any-child/></any-service>
</route>
</start>
<start name="usb" caps="90">
<resource name="RAM" quantum="1M"/>
<binary name="input_event_client"/>
<config/>
<route>
<service name="Event"> <child name="event_filter" label="usb_hid"/> </service>
<service name="Input"> <child name="usb_drv"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
}
append_if [have_spec framebuffer] config {
@ -400,7 +386,6 @@ append boot_modules {
libc.lib.so vfs.lib.so libm.lib.so
libiconv.lib.so stdcxx.lib.so
qemu-usb.lib.so
input_event_client
}
lappend_if [expr $use_rumpfs] boot_modules rump.lib.so