On 15.03.2012 14:51, Dave Mielke wrote:
[quoted lines by Vladimir 'φ-coder/phcoder' Serbinenko on 2012/03/15 at 12:30
+0100]
I've managed to make baum driver (chosen because of qemu support) compile in
GRUB.
I think it'd be best to find a way to get all of brltty built. The reason is
that the individual drivers use a logial hgh level I/O layer which is
implemented within the core. The core then would just require a set of
grub-specific low level functions. This paradigm is how the core is able to
support Linux, multiple other Unix flavours, Cygwin, Windows, and MS-DOS.
Adding Grub as another platform shouldn't be that difficult if it's done in the
same way.
I've pulled as much core as needed cutting at the lines where it was the
easiest to implement a glue layer
It seems that the driver assumes that for USB devices it's assumed that after
isUsbDevice the device is equal to the USB serial.
No. If brltty is given a USB device then it communicates with it directly using
USB operations.
Then I don't understand following part:
static int
openUsbPort (const char *device) {
...
if ((usbChannel = usbFindChannel(definitions, (void *)device))) {
return 1;
}
and usbFindChannel apparently searches by serial number.
Should I make isQualifiedDevice adjust device to strip usb/ ?
You should not change any core function. Supporting a new platform, like Grub,
shouldn't change more than absolutely necessary. In my opinion, that'd only be
low level system interfacing.
I'll also need to #if-out some part, like anything using float/double
since GRUB doesn't have those.
What are the functions usbReapResponse and usbSetAlternative are supposed to
do?
They're part of the higher level USB interface. What'd need to be done is to
implement a usb_grub.c which implements low level USB operations in the way
that Grub needs them done.
I understand so much but what do they do exactly so I can implement them?
If Grub supports libusb, then that's already been
done.
We don't implement libusb
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty