[OpenBIOS] usb driver to support usb keyboard
BALATON Zoltan
balaton at eik.bme.hu
Mon May 5 11:26:02 CEST 2014
On Sun, 4 May 2014, Mark Cave-Ayland wrote:
> On 03/05/14 10:56, BALATON Zoltan wrote:
>> On Fri, 3 May 2014, Tarl Neustaedter wrote:
>>> I'm not volunteering to do the work (lest I hear my boss scream in
>>> agony), but I suspect this is a case that it just drops in and works.
>>> Lillian wrote it for the OneLaptop project, and I understand that
>>> implementation and OpenBios haven't diverged all that much.
>>
>> Problem is I don't know where to drop it to try if it works and if it
>> doesn't I don't know how to debug Forth so I could only shoot in the
>> dark. I don't even know where to start with this Forth driver.
As this seems to be the preferred way I looked at it again to see if I can
start trying to integrate the usb2 driver from openfirmwre but I still
don't see where to start.
> Sadly the PCI code in OpenBIOS is still written in C so there would be some
> interface work required there.
>
> In terms of testing the code, Forth is an interpreted language so you can
> literally copy/paste from the source files into a serial console and see what
> happens ;) I suspect that the reality will be slightly different though, for
> example we know that OpenFirmware has behaviours which aren't implemented in
> OpenBIOS.
The usb driver is split into 75 *.fth files so it's not obvious what to
paste in a console. Additionally there are some *.bth files that seem to
build some FCode modules but these are not working on OpenBIOS as they
contain words that I did not find in OpenBIOS. So I don't know how to get
OpenBIOS's Forth at least try to interpret these files to see what is
missing.
The ohci.bth file looks like this:
---begin---
purpose: Load file for OHCI HCD
command: &tokenize &this
build-now
silent on
begin-tokenizing ohci.fc
FCode-version2
" ohci" encode-string " device_type" property
fload ${BP}/dev/usb2/hcd/ohci/loadpkg.fth
end0
end-tokenizing
---end---
and the hcd/ohci/loadpkg.fth referenced here contains more fload commands
that load the other parts. What is the equivalent in OpenBIOS's Forth to
do this?
Regards,
BALATON Zoltan
More information about the OpenBIOS
mailing list