Greetings,
I agree. The loader I wrote is really just a quick and dirty way to exercize the code for testing.
It souuldn't be too painful to link it in to other loaders and call the ll_read_block function.
block_fill_inbuf.c best demonstrates the interface to the USB stack. init_bytes() shows getting the bus enumerated and finding an appropriate boot device and usb_read() shows grabbing the blocks.
Really, it's just a matter of calling usb_poll(0 in a loop until you see a device you want or it quits finding new devices. usb_poll just checks all known hubs for connect events and enumerates the device that was connected. It returns 1 if it processed an event, 0 for no events and -1 for an error (retryable).
G'day, sjames
-------------------------steven james, director of research, linux labs ... ........ ..... .... 230 peachtree st nw ste 2701 the original linux labs atlanta.ga.us 30303 -since 1995 http://www.linuxlabs.com office 404.577.7747 fax 404.577.7743 -----------------------------------------------------------------------
On Sat, 31 Jan 2004, Peter Lister wrote:
On Thu, 2004-01-29 at 16:24, Steven James wrote:
So far, it only supports uhci, but successfully enumerates the bus and loads an ELF image from some USB drives (It loads from the ones I have anyway).
Congratulations. This is very valuable work. I'll have a look when I can get SF to let me cvs update...
But my immediate comment is that this code should be available to Etherboot, FILO and anything else which needs to pull an image from a USB device without the help of a legacy BIOS.