I took some time and developed a serial console over USB (FTDI) for SeaBIOS.
To make it work, I put in a few changes to the core USB module to allow my USB serial port
driver to patch itself in to the USB stack.
These changes implement a general mechanism for USB device driver extension that might
have other applications, so I thought I would start a dialog on the subject.
Here is a summary of the change (about 5 lines removed and 20 lines added):
1) defined a list structure in usb.h
struct usb_driver_list_s *next; /* the list pointer */
int (*driver_detect)(struct usbdevice_s *usbdev, /
struct usb_device_descriptor *dinfo); /* a function pointer */
2) Added a static list head pointer to usb.c
static struct usb_driver_list_s *usb_driver_list;
3) Added an API function to populate the list with external usb drivers
add_usb_device_handler(struct usb_driver_list_s *add_driver)
3) Modified configure_usb_device() to make it look for external drivers
a) relocated the trap for an unhandled device
b) call the handler init functions in the list until one indicates acceptance
From: Kevin O'Connor [mailto:firstname.lastname@example.org]
Sent: Friday, April 03, 2015 10:58 AM
To: Parker, John M
Subject: Re: [SeaBIOS] USB serial console support?
On Fri, Apr 03, 2015 at 04:54:43PM +0000, Parker, John M wrote:
This is a new-user question.
I am working on a platform bring-up, specifically getting a port of
SeaBIOS sorted out. So far so good, the code has made it all the way
through to the USB enumeration.
The current task is to bring up the boot menu on a 'serial over USB'
Is a serial port boot menu supported?
Is there a serial over USB module in the works?
Unfortunately, this feature isn't currently available. I'm not aware of anyone
working on it.
There are two parts to getting the above to work: forwarding keyboard and video over
serial, and USB serial support.
In the past, we've used sgabios ( https://code.google.com/p/sgabios/
) to provide
keyboard/video over traditional serial ports. However, sgabios wont work with USB serial
ports (or even some PCI serial
adapters) and it's unlikely that support will be added.
Getting USB serial to work is a bit of a pain because there does not appear to be a
standard for initializing USB serial adapters. One possibility would be to target only
one device (and in particular, a device that something like a Beagle Bone Black could
emulate would be very useful).
So, to get the above to work, I think it would require both adding sgabios functionality
into SeaBIOS and adding USB serial support into SeaBIOS.
Thanks for your time
John Parker (john.m.parker(a)intel.com)
PS, please post in plain text only (no html) when sending to the mailing list.