Using linux drivers in reactos !

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

cruonit
Posts: 250
Joined: Mon Jun 29, 2009 12:57 am

Using linux drivers in reactos !

Post by cruonit » Sat Jan 12, 2013 4:10 pm

I know that sounds funny but look at his:
http://www.elpauer.org/?p=653

would be interesting to integrate such a thing in reactos but it's an emulator and depends on winapi functions :(.

ps. ROSPI(reactos programming interface) means frog could be a green -radioactve frog logo :) i don't like the name windows api for ractos because it's not the same API it's compatible but not the same

Image

PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Using linux drivers in reactos !

Post by PascalDragon » Sun Jan 13, 2013 12:01 pm

cruonit wrote:I know that sounds funny but look at his:
http://www.elpauer.org/?p=653

would be interesting to integrate such a thing in reactos but it's an emulator and depends on winapi functions :(.
They have ported the KVM to Windows by providing Linux' KVM drivers a suitable environment. It's a nice achievement I'd say. But if I personally would do something like this - or integrating Linux drivers in general - I'd use the DDEKit project which was essentially written for exactly this purpose (though it might not yet be suitable to run the KVM drivers).

Regards,
Sven
Free Pascal compiler developer

cruonit
Posts: 250
Joined: Mon Jun 29, 2009 12:57 am

Re: Using linux drivers in reactos !

Post by cruonit » Sun Jan 13, 2013 12:38 pm

just looking for a "hack" (wrappper of an wrapper :) printing is not resource intensive :|

The reactos print win api development stopped in 2007 :|
http://www.reactos.org/wiki/Printing
http://www.reactos.org/wiki/ReactOS_Pri ... _(Spoolsv)

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Re: Using linux drivers in reactos !

Post by Haos » Sun Jan 13, 2013 8:27 pm

What would be a point for running Linux drivers in NT?

gonzoMD
Posts: 1002
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: Using linux drivers in reactos !

Post by gonzoMD » Sun Jan 13, 2013 8:42 pm

Haos wrote:What would be a point for running Linux drivers in NT?
a workaround for thinks that are not implemented yet I think.

PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Using linux drivers in reactos !

Post by PascalDragon » Mon Jan 14, 2013 10:40 am

Haos wrote:What would be a point for running Linux drivers in NT?
  • Older devices for which no NT driver exists (or at least none for Windows 2003+)
  • Support for various devices on non-x86 for which no NT driver exists
  • Sometimes the Linux drivers are better than their Windows equivalents(*)
In my opinion a project that wants to run Linux drivers on NT is independant of ReactOS however as (ideally) it should just look like a NT driver to the kernel which internally wraps a Linux driver. So such a project would be able to run on Windows as well...

(*) This happened to me with a video converter device (analog video to USB): on Windows there were sometimes hickups in the recordings which resulted in shifted audio whereas on Linux I don't have this problem since that device is supported (and I'm using it much more now than I did on Windows).

Regards,
Sven
Free Pascal compiler developer

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Re: Using linux drivers in reactos !

Post by Haos » Wed Jan 16, 2013 12:39 am

So the idea is to port another kernel/driver architecture, almost from scratch, in order to solve certain corner-cases? Really, from what I experienced, its linux that often needs NT drivers, not the other way around. This doesn't sound economical.

PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Using linux drivers in reactos !

Post by PascalDragon » Wed Jan 16, 2013 11:57 am

It would not be completely ported from scratch. The DDEKit consists of two parts: an environment for the drivers and the abstraction layer for the underlying operating system. The former already exists for Linux 2.6 in the various DDE implementations (e.g. the L4 one from TU Dresden) while the latter needs to be implemented for ReactOS/Windows.

While this project might not be economically and very "corner casey" it would also be an interesting research project. And if I'd have more time I'd work on this already. But I have currently too many projects running in parallel (both university and Free Pascal related), so I can't do this now. Maybe when I'm finished with university (should be this summer) I'll give this idea a try. :)

Regards,
Sven
Free Pascal compiler developer

cruonit
Posts: 250
Joined: Mon Jun 29, 2009 12:57 am

Re: Using linux drivers in reactos !

Post by cruonit » Wed Jan 16, 2013 12:48 pm

PascalDragon wrote:It would not be completely ported from scratch. The DDEKit consists of two parts: an environment for the drivers and the abstraction layer for the underlying operating system. The former already exists for Linux 2.6 in the various DDE implementations (e.g. the L4 one from TU Dresden) while the latter needs to be implemented for ReactOS/Windows.

While this project might not be economically and very "corner casey" it would also be an interesting research project. And if I'd have more time I'd work on this already. But I have currently too many projects running in parallel (both university and Free Pascal related), so I can't do this now. Maybe when I'm finished with university (should be this summer) I'll give this idea a try. :)

Regards,
Sven
nice :!: So you already have a thesis title, can you try to do this for your thesis ?

Zc456
Posts: 155
Joined: Fri Feb 11, 2011 10:42 pm

Re: Using linux drivers in reactos !

Post by Zc456 » Wed Jan 16, 2013 5:22 pm

But the kernels are completely different, more so then trying use technique with BSD. It's like trying to stick a car engine in a locomotive.
Stay frosty, Squeaks.

cruonit
Posts: 250
Joined: Mon Jun 29, 2009 12:57 am

Re: Using linux drivers in reactos !

Post by cruonit » Wed Jan 16, 2013 6:26 pm

Zc456 wrote:But the kernels are completely different, more so then trying use technique with BSD. It's like trying to stick a car engine in a locomotive.
pure research :D i think reactos gives many academic/reasearch possibilities

PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Using linux drivers in reactos !

Post by PascalDragon » Wed Jan 16, 2013 6:40 pm

Zc456 wrote:But the kernels are completely different, more so then trying use technique with BSD. It's like trying to stick a car engine in a locomotive.
The DDEKit was originally developed for L4 and it also has been ported for Minix. Both are microkernel operating systems that differ greatly from Linux/BSD/Unix, so ReactOS/Windows should be doable... (also using NDISWrapper one can use Windows' NDIS drivers on Linux; this is just the other way round and in so far easier that all source is available :) )

Regards,
Sven
Free Pascal compiler developer

cruonit
Posts: 250
Joined: Mon Jun 29, 2009 12:57 am

Re: Using linux drivers in reactos !

Post by cruonit » Sun Jan 27, 2013 2:29 pm

there is one situation where this could be important - ReactoOS ARM port, the funny thing is that there are more drivers for linux than for windows(RT) - targeting tablets and mobile phones

PascalDragon
Posts: 123
Joined: Wed Aug 04, 2010 7:34 pm

Re: Using linux drivers in reactos !

Post by PascalDragon » Mon Jan 28, 2013 10:31 am

cruonit wrote:there is one situation where this could be important - ReactoOS ARM port, the funny thing is that there are more drivers for linux than for windows(RT) - targeting tablets and mobile phones
That's exactly my thought as well...

Regards,
Sven
Free Pascal compiler developer

alexei
Posts: 137
Joined: Wed Oct 19, 2005 5:29 pm

Re: Using linux drivers in reactos !

Post by alexei » Sat Mar 30, 2013 8:39 am

As I understand, "using" Linux drivers may be implemented as running Linux kernel in parallel with ROS in a way linux would handle selected devices and interface corresponfing drivers in ROS (in a way similar to para-virtualization), something like
device <==> linux driver <==> linux application (interface) <==> linux driver (interface) <==> ROS driver (interface) <==> . . .
I see several ways of doing that (though some/all of them may be incorrect/idiotic :( )
Linux and ROS may run on designated CPU cores (there are some RTOS+Windows projects that do it this way).
Linux and ROS may run under relatively simple hypervisor.
Linux may run in VM running under ROS(*).
CPU schedulers in Linux and ROS may be tweaked to share same CPU.
Whole Linux may be wrapped as a single ROS driver.
BTW, ROS doesn't even need to see physical memory and phisical devices given to Linux and vise versa, just share some pages to exchange data. Of course, there is an issue with interrupts, though I don't believe it could not be resolved.
(*) A while ago I gave network adapter (USB) to VM (VMware) and disabled its Windows driver. That means I gave VM full control over this device. Obviously, IP forwarding on VM provided network communications for the host. Actually that's kind of proof of concept for the "ROS+Liinux" idea above.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], DotBot [Crawler] and 3 guests