Linux Driver Porting Information
Moderator: Moderator Team
Linux Driver Porting Information
Hello everyone, I'm looking for information on how to port drivers from Linux to React OS. Of course this includes documents intended for windows as they should be the same in terms of interfaces.
Now first off(really second I guess) I have never written a driver before so documents on how windows drivers work in general would also be helpful.
The reason I want to port drivers from Linux to React OS is because Linux has drivers for allot of hardware all of which(in kernel anyhow) are open source.
I realize Linux and windows work differently but the Linux drivers should at least work as examples of how to use a piece of hardware.
Anyway my plan is as follows. I wanted to boot my test box in some version of Linux find out what drivers it uses and port those to React OS then use that box as a test bed for my ported drivers and anything else I develop. I have some random NICs and such that I may also port drivers for if I am able to pull off the first part.
I know this will take quite some time specially considering my inexperience but I'm willing to give it a shot.
Now first off(really second I guess) I have never written a driver before so documents on how windows drivers work in general would also be helpful.
The reason I want to port drivers from Linux to React OS is because Linux has drivers for allot of hardware all of which(in kernel anyhow) are open source.
I realize Linux and windows work differently but the Linux drivers should at least work as examples of how to use a piece of hardware.
Anyway my plan is as follows. I wanted to boot my test box in some version of Linux find out what drivers it uses and port those to React OS then use that box as a test bed for my ported drivers and anything else I develop. I have some random NICs and such that I may also port drivers for if I am able to pull off the first part.
I know this will take quite some time specially considering my inexperience but I'm willing to give it a shot.
Talk is cheap. Show me the code. - Linus Torvalds
-
- Posts: 651
- Joined: Mon Mar 28, 2005 6:59 pm
- Location: New Hampshire of United States of America
- Contact:
depends on the driver/software
With some drivers/software, one might have to rewrite the parts or the whole thing. Would it not be better to start from scratch?
* * * * * * * * * * * * *
Tom Lee M / BigGoofyGuy
* * * * * * * * * * * * *
Tom Lee M / BigGoofyGuy
* * * * * * * * * * * * *
possibly
Possibly like I said this is new ground for me. However hardware manufacturers are not always willing to provide documentation for developing drivers and Linux driver developers have already done the work of figuring out how to make the hardware work. So I have to believe there is some parts of the drivers that can be reused. Even if it is just basic information on how to communicate with the hardware.
I have seen drivers ported from windows to Linux so I don't know why the reverse can't be done.
I have seen drivers ported from windows to Linux so I don't know why the reverse can't be done.
Talk is cheap. Show me the code. - Linus Torvalds
-
- Posts: 651
- Joined: Mon Mar 28, 2005 6:59 pm
- Location: New Hampshire of United States of America
- Contact:
depends on the drive/software
It would depend on the driver that one is porting or trying to create. If the source code is there to port, one can port it; otherwise, one has to start from scratch. 8)
* * * * * * * * * * * * *
Tom Lee M / BigGoofyGuy
* * * * * * * * * * * * *
Tom Lee M / BigGoofyGuy
* * * * * * * * * * * * *
Point Taken
Ok, point taken this might be harder than it sounds.
But what about article & book recommendations. If writing from scratch and only using the Linux driver as a reference is what I need to do I still need documentation to tell me how to write a driver.
Thank you all for taking the time to reply to my newbie questions.
But what about article & book recommendations. If writing from scratch and only using the Linux driver as a reference is what I need to do I still need documentation to tell me how to write a driver.
Thank you all for taking the time to reply to my newbie questions.
Talk is cheap. Show me the code. - Linus Torvalds
http://www.codeproject.com/system/driverdev.asp
Programming the Microsoft Windows Driver Model, Second Edition
Developing Drivers with the Windows Driver Foundation
Enjoy.
Programming the Microsoft Windows Driver Model, Second Edition
Developing Drivers with the Windows Driver Foundation
Enjoy.
-
- Posts: 475
- Joined: Sun Jun 10, 2007 3:56 am
actually
Actually I do enjoy this type of thing although I will have to admit this is probably the hardest thing I have ever attempted.
Not only do I have to learn more about how windows works but also how hardware works.
However it is a little easier than I thought. I thought I would be communicating directly with hardware but from what I have read thus far it is more like communicating with the hal & kernel.
I decided to poke around inside one of the current React OS drivers to see if it was starting to make sense yet. But other than a few prints & checks it remains an enigma.
Anyway realistically I think this is going to take me some time to be able to make anything useful. The good news is I now get the Ke/Kernel/Ketchup joke.
Not only do I have to learn more about how windows works but also how hardware works.
However it is a little easier than I thought. I thought I would be communicating directly with hardware but from what I have read thus far it is more like communicating with the hal & kernel.
I decided to poke around inside one of the current React OS drivers to see if it was starting to make sense yet. But other than a few prints & checks it remains an enigma.
Anyway realistically I think this is going to take me some time to be able to make anything useful. The good news is I now get the Ke/Kernel/Ketchup joke.
Talk is cheap. Show me the code. - Linus Torvalds
-
- Posts: 475
- Joined: Sun Jun 10, 2007 3:56 am
nope
No, I don't know assembly. I was under the impression that windows didn't support assembly drivers. Is that different in React OS or were you asking for a different reason?
Talk is cheap. Show me the code. - Linus Torvalds
-
- Posts: 475
- Joined: Sun Jun 10, 2007 3:56 am
odd
Linux drivers in assembly seems odd though. Because Linux is very portable. I mean they have versions for x86,x86_64,PowerPC, and sparc. I know they also work on many embedded or specialized devices like Xbox & some PDA type systems.
I don't see how that would be possible if they were assembly unless they ported the drivers each time.
I don't see how that would be possible if they were assembly unless they ported the drivers each time.
Talk is cheap. Show me the code. - Linus Torvalds
Who is online
Users browsing this forum: No registered users and 16 guests