[BRLTTY] BRLTTY in GRUB

Dave Mielke dave at mielke.cc
Thu Mar 15 10:35:54 EDT 2012


[quoted lines by Vladimir 'φ-coder/phcoder' Serbinenko on 2012/03/15 at 15:09 +0100]

>I've pulled as much core as needed cutting at the lines where it was
>the easiest to implement a glue layer

In my opinion, if it's involving looking at individual drivers, rather than 
just at doing what's necessary to make the core work within Grub, then it's 
being done in an unsafe way. I'll be glad to help have a crack at it if you can 
tell me how to set up the right build environment.

>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.

I think I must've misunderstood you, then. Maybe you just said "serial" instead 
of "serial number". If you mean what follows usb: in the device identifier, 
then, yes, it's an optional serial number. I thought you were asking if brltty 
treated the device as a virtual serial device.

>I'll also need to #if-out some part, like anything using float/double
>since GRUB doesn't have those.

Well ... I'd rather have a look at such code (there can't be much) to find if 
there are other ways to implement it.

Basically, I hate hacking. I'd rather use projects like this one to find ways 
to make the code more and more portable. It may be the tougher toad to travel, 
but it's always invariably the one which yields the most fruit. This approach 
has kept brltty's code rather clean in spite of the fact that it's grown to 
support multiple platforms, multiple I/O methods, lots of new features, etc.

>We don't implement libusb

But there'll be some way to do USB operations. They just need to be impemented 
in the correct set of low level functions. As long as autoconf can have a way 
to know that the environment is Grub, then it can select the Grub set of low 
level USB functions and the core will just work.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: dave at mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the BRLTTY mailing list