USB kernel driver
Hi,
because of not knowing the GRUB 2 architecture very well so far, it would be nice if you could give me some tipps about
- what does the GRUB development enviroment looks like (means how does your test PCs look like, how to put updates on the test PC an so on)
- ways to debug my code
- where in source code should I place my test driver
Thx
Jochen
--- Ursprüngliche Nachricht ---
Datum: 20.10.2005 01:37
Von: The development of GRUB 2 <[email protected]>
An: The development of GRUB 2 <[email protected]>
Betreff: Re: AW: USB kernel driver
Quoted 2 lines · On Wednesday 19 October 2005 08:07 am, [email protected] wrote:
Quoted 1 line
So it seems to me the only way is to write it our own. Or are there
any
Quoted 3 lines
Quoted 1 line
more ideas where to "borrow" code from?
You can refer to other code for a reference purpose, but it is important
to
Quoted 3 lines
keep it in mind that the operating environment of GRUB is fundamentally
different from OS. Since OS wants complete control of hardware, it
usually
Quoted 3 lines
reconfigures many parameters and makes use of hardware interrupts for a
performance reason, while GRUB tries to keep an underlying system as
intact
Quoted 1 line
as possible for safety. So, in GRUB, interrupt-driven code is
inappropriate,
Quoted 3 lines
and a polling-based approach is often nicer.
Quoted 1 line
Writing a own GRUB USB driver seems to be a complicated task,
starting
Quoted 3 lines
Quoted 1 line
with the three standards UHCI, EHCI and OHCI.
It is complicated if you attempt to obtain a perfect thing from the
beginning.
Quoted 1 line
To start a project, the best way is, IMO, to start from what you really
need
Quoted 3 lines
yourself. For example, you should have a system which has one of the USB
systems, but not all of them. So I'd recommend you implementing "just
work
Quoted 6 lines
for me" code as a first step.
Quoted 2 lines
Furthermore I have no experience with GRUB drivers! Is there any documentation besides the source code?
No, but you don't need it, since the environment is quite simple. GRUB
is just
Quoted 1 line
a single task, and there is little concern about security or
performance.
Quoted 9 lines
Okuji
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 5 lines · On Oct 21, 2005, at 1:09 AM, [email protected] wrote:
because of not knowing the GRUB 2 architecture very well so far, it would be nice if you could give me some tipps about
- what does the GRUB development enviroment looks like (means how does your test PCs look like, how to put updates on the test PC an so on)
There is some information in the wiki: http://grub.enbug.org/TestingOnX86 . If you have more specific questions, please ask on the list and then update the wiki with the answers. :)
Quoted 1 line
- ways to debug my code
grub_printf, pretty much exclusively. Also, please consider using grub_dprintf for generally useful debug messages. Consider when somebody runs your code on different hardware and it doesn't work: you can then "set debug=usb" and the debug messages you've left in will be displayed.
I've been thinking about a memory dumping and editing command, but haven't needed it enough to implement it so far.
If you have other suggestions, feel free to make them here...
Quoted 1 line
- where in source code should I place my test driver
There is a top-level "video" directory, so I guess you could make a new directory like "usb". Or we may want to move things into a "drivers" directory, but that should be a small matter compared to getting the code working. :)
-Hollis