Page 1 of 1

I/O subsystem

Posted: Mon May 15, 2006 9:56 pm
by LongHorn
I had my multitasking stuff working. Now i want to design my I/O subsystem. My idea is to have a vfs on top and device fs to manage devices which is to be mounted on vfs (like mobius kernel).
I couldn't write device drivers for each and every devices,chipsets. So i would like to use drivers for linux. So how should i modify my I/O subsystem so that linux device drivers fit in here?

Re:I/O subsystem

Posted: Mon May 15, 2006 10:30 pm
by mystran
I think that is best answered by looking the Linux device driver layer.

I'd start with reading some documentation written for Linux driver programmers, and try writing some trivial driver (say, write yet another SB16 driver) to get a better idea of the services that Linux provides. Then take some existing Linux driver, and see what it uses (some simple one first) and see if the interface can be wrapped somehow.

I've never tried to write Linux drivers, nor have I tried to reuse them, but that'd be how I'd approach the problem if I wanted to do that.

I think it might be a good idea to simply design a device driver framework you want, and then make a wrapper for linux drivers. Even an incomplete wrapper would probably be nice, because it'd make it easier to port drivers (just modify the things you can't wrap directly).

Finally, I'd probably try to take a look at some project that has reused Linux drivers. I think Hurd does that, as does the OSLib or whatever it was.. and there might be others.

There's some ideas anyway.