[vbox-dev] VBox guest mouse driver for Haiku

Michael Thayer Michael.Thayer at Sun.COM
Mon Oct 5 10:45:09 GMT 2009


Hello Stéphane,

Stéphane Charette wrote:
> I'm hoping to get the vbox guest mouse driver working in Haiku, and I
> have a few newbie questions.
You chose a slightly unfortunate time to ask, as one of our developers
is a Haiku fan, and was looking at precisely this issue last week (I
believe he was considering doing an after-hours port of the GAs to
Haiku), but he is away for three weeks as of today.  I will forward your
mail to him though, in case he reads it in the mean-time.

> Couple of questions:
> 
> 1) Is it likely -- or highly unlikely? -- that the mouse driver can be
> compiled and built separately from everything else?  Worded
> differently:  are the guest additions all intertwined where I would
> need "all or nothing"?
On our current guest systems, the Additions are structured as a kernel
driver which is in charge of the communication between guest and host
and a set of drivers using the services provided by that driver.  On
X.Org guest systems, the mouse driver is an X.Org driver which talks to
the kernel driver (VBoxGuest/vboxadd) via a device node (/dev/vboxguest,
/dev/vboxadd...).  So in order to use other GA facilities than just
mouse integration, you would need a port of the kernel driver.  However,
it is written for portability, with a cross-platform library-like driver
core and small-ish driver modules which do the platform-specific bits
and use the core for all else.  The source for this is in
src/VBox/Additions/common/VBoxGuest in the VBox source tree.

> 2) I extracted the VBoxLinuxAdditions-x86.run file thinking I'd find
> the source code for the various parts of the guest additions, but I
> was surprised to see see a bunch of .so files.  I see "mouse"
> mentioned in some of the linux/module/vboxadd/include files, but I
> don't see an obvious "*mouse*.c" file as I expected.  Have I missed
> something obvious?
See src/VBox/Additions/x11/VBoxMouse in the VBox source code.  In
particular, vboxmouse_15.c, as that is relatively free of unrelated bits
(the older ones contain lots of code from the X.Org mouse driver which
is mainly irrelevant to VBox).  Note that the way the mouse driver works
in X.Org 1.5+ is that is is loaded in addition to the standard X.Org
mouse driver.  When it is loaded, it tells VBox to stop sending mouse
movement information via the virtual PS/2 device, and instead reads
absolute mouse position information from VBox and passes it on to X.Org.
 The standard X.Org PS/2 driver continues to handle mouse click information.

> 3) Is there documentation available on how to get started with
> building guest additions for new OSes that aren't supported?
> Something which at least will point me in the right direction?
I hope that the above should help to get you started.  See also
http://www.virtualbox.org/wiki/Technical_documentation .

Regards,

Michael
-- 
Sun Microsystems GmbH        Michael Thayer
Werkstrasse 24               VirtualBox engineer
71384 Weinstadt, Germany     mailto:michael.thayer at sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering




More information about the vbox-dev mailing list