Virtual Device Driver Framework

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
zydon
Posts: 160
Joined: Tue Dec 18, 2007 9:03 am

Virtual Device Driver Framework

Post by zydon »

Is there any possibility to in cooperate some kind of a Virtual Device Driver Framework into ROS to use Win7, Win8 or Win10 drivers. Device Drivers is hardly developed by any other developer than the device manufactures. Without device drivers ROS seem stuck in the moment to progress in hardware compatibility department.

If ROS capable utilize device drivers for the latest Windows OS, it might open an opportunity for the OS users using latest hardware while keeping the classic PC OS familiarity intact. PC hardware has been increasingly affordable and portable like the smartphones. Would ROS able to take advantage to utilize these latest hardware?
User avatar
Swyter
Posts: 114
Joined: Sun Apr 10, 2011 11:21 am
Location: Spain ← Europe ← Planet Earth ← Milky Way ← Universe

Re: Virtual Device Driver Framework

Post by Swyter »

First we should get actual XP/2003 drivers made by third parties working. I have read horror stories in JIRA about the poor hacks and obscene quality of many of such drivers. Seems to be a bit more complex than mirroring the documented API as there are quirks being taken for granted.
External patch contributor for ux/user-mode/l10n/winapi. Sometimes I fix a bit of everything everywhere.
justincase
Posts: 441
Joined: Sat Nov 15, 2008 4:13 pm

Re: Virtual Device Driver Framework

Post by justincase »

It might be kind of interesting (after we have one [basically] fully functional Driver Framework, to build some kind of compatibility layer (think wine-style translate and pass to core functions) to support Windows Vista+ drivers, but it also might be too big/slow/complex/etc. to be feasible.

It's not a particularly bad idea (for the future, not for now), but it may not be a particularly good idea either.
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.
zydon
Posts: 160
Joined: Tue Dec 18, 2007 9:03 am

Re: Virtual Device Driver Framework

Post by zydon »

justincase wrote:...(think wine-style translate and pass to core functions)...
It makes me wonder what if ROS do the other way around by adopting all those Android drivers. It would make ROS has more devices to play with especially the hardware accelerations.
MadWolf
Posts: 688
Joined: Sat Dec 31, 2005 4:19 am
Contact:

Re: Virtual Device Driver Framework

Post by MadWolf »

zydon wrote:
justincase wrote:...(think wine-style translate and pass to core functions)...
It makes me wonder what if ROS do the other way around by adopting all those Android drivers. It would make ROS has more devices to play with especially the hardware accelerations.
hi i am no developer but Android is Linux so the drivers cannot be used in reactos is NT not linux
Pi_User5
Posts: 752
Joined: Thu May 01, 2014 4:18 am
Location: United States

Re: Virtual Device Driver Framework

Post by Pi_User5 »

MadWolf wrote:
zydon wrote:
justincase wrote:...(think wine-style translate and pass to core functions)...
It makes me wonder what if ROS do the other way around by adopting all those Android drivers. It would make ROS has more devices to play with especially the hardware accelerations.
hi i am no developer but Android is Linux so the drivers cannot be used in reactos is NT not linux
Things can be ported, worked on, etc.
I use ReactOS on real hardware. Will you? My Computers: https://www.reactos.org/wiki/PC_ROS_Rigs Go all the way to the bottom.

[ external image ]
MadWolf
Posts: 688
Joined: Sat Dec 31, 2005 4:19 am
Contact:

Re: Virtual Device Driver Framework

Post by MadWolf »

http://www.reactos.org/forum/viewtopic.php?p=77358
Z98 wrote:When it comes to drivers, a "port" is effectively a rewrite. The Linux devs reversing Windows USB drivers was to figure out the protocol such devices were using I believe, not so they could use any code in the drivers. And note that the need to reverse it by definition means there's not going to be much, if any, code sharing going on, since they did not have the source code to begin with. It would generally be easier to just look at a piece of hardware's specifications and write a driver from scratch. The only useful information a Linux driver could provide is if there's something missing in the spec that the Linux devs have discovered and they incorporated a workaround. But that workaround would still have to be rewritten against the Windows driver API. It is, conventionally, very difficult to port an already existing driver to another OS architecture. The only way to "share" significant amounts of code is to isolate all of the code that works on the device and the code that handles I/O through the OS from each other. But this must be done at the start of development. Trying to do it afterward is again, a rewrite.
viewtopic.php?p=37974
Z98 wrote:The last time the developers attempted to port something from Linux, it took something like three years. That was for the USB stack. The kernel interfaces are completely different and often it's better to just write the thing from scratch, possibly using the Linux driver as a reference.
User avatar
Konata
Posts: 391
Joined: Sun Apr 20, 2014 8:54 pm

Re: Virtual Device Driver Framework

Post by Konata »

I suppose one could make some kind of API mapper or emulator or something, I don't really know anything about drivers either, but FreeBSD has an emulation stack that allows it to use both Linux and even some odd Windows drivers. [link]

I don't know how easy this would be to implement (though I'd imagine it would be a nightmare with how many API calls there would be), and I know it goes outside of the project's scope anyway. Just pointing it out.

Personally I absolutely hate OS-specific driver APIs, I think they're disgusting and people really need to adopt a single framework. There is a "universal driver framework" project but it's really underground and nobody outside of no-name hobby OS projects adhere to it. I really don't care, everyone just copy the Windows driver framework, just please world, use one thing!
If fact, if you asked me what I thought the absolutely perfect driver solution aught to be, it's that not only does everyone use a single API, but the drivers are in the hardware themselves, so the OS can be light as a feather with absolutely zero drivers. It would also enforce OSes to use some kind of kernel module system, so broken OSes (OpenBSD for one, since they took out kernel modules) literally just wouldn't work.
A man can dream.
Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: Virtual Device Driver Framework

Post by Z98 »

As someone who has done low level system and driver development, no, no you really don't want drivers embedded into hardware devices somehow. You're just shifting the problem and potentially even making it worse by pushing the responsibility to engineers that are completely unqualified to write production code. Even ignoring the impossibility of having a single driver API shared across all OSes, seeing as by their very nature a driver API reflects the architecture of the OS, and so by asking for a single API, assuming you want it to be performant and not running through layers and layers of abstraction and translation libraries, you are asking for everyone in the world to use a single OS.
User avatar
Swyter
Posts: 114
Joined: Sun Apr 10, 2011 11:21 am
Location: Spain ← Europe ← Planet Earth ← Milky Way ← Universe

Re: Virtual Device Driver Framework

Post by Swyter »

Well, I agree that for many intents and purposes drivers could be inter-operable, but with the hegemonic ruling of Windows on PC there has been just no competition to even suggest a standard.
See NDIS drivers, for example, in Linux there's NDISwrapper for running your favorite wireless card off the Windows driver, which works pretty well for very old hardware.

Now that I think about it, the closest thing in the PC space would be EFI drivers. Which yes, are an actual thing.
External patch contributor for ux/user-mode/l10n/winapi. Sometimes I fix a bit of everything everywhere.
User avatar
Konata
Posts: 391
Joined: Sun Apr 20, 2014 8:54 pm

Re: Virtual Device Driver Framework

Post by Konata »

Z98's gotta get his daily dream crushing in, can't make it though the day otherwise.

Actually I envisioned the driver ROM actually being writable so drivers can still be updated/replaced. And I thought pretty much all hardware had drivers written especially for it?
Also I would have thought someone with intimate knowledge of NT would know, with enough abstractions, anything is possible ;)
Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Re: Virtual Device Driver Framework

Post by Z98 »

You're thinking about firmware, not drivers. Drivers expose a hardware device's resources and capabilities to an OS and reside in the operating system whereas firmware resides on the devices and run directly on said devices. At the same time a driver allows a device to make use of other resources on a computer that the OS mediates access to. This by virtue has to be specific to the architecture of your host operating system. And while anything is possible with enough abstractions, you'd have to find people sufficiently competent to create abstractions that are both performant and not leaky. If the mentality of the developers of several major components of the Linux-based stack are anything to go by, they're too lazy to do either well and would prefer to pretend that everything runs on Linux and expect everyone else to do things their way.

PS: The robotics team I am a senior member of has a robot named Dream Crusher from several years ago that we are in the process of reviving.
User avatar
Konata
Posts: 391
Joined: Sun Apr 20, 2014 8:54 pm

Re: Virtual Device Driver Framework

Post by Konata »

Ah, yes, I guess I was thinking of firmware, not sure why I was even using a convoluted explanation.

Yeah, Linux is mainly why this whole driver thing bothers me. Linux and the fact that Windows has gigabytes of useless drivers in it. But the fissure that Android created is beginning to seem like a huge problem for me. And, yeah, naturally I don't actually expect the linux foundation to do any real work, just spend all their time answering their emails criticizing their lack of quality with more criticism. I actually find it funny Linus' most famous quote is "talk is cheap, show me the code" when it directly translates to "I don't like doing work, please do it for me"

I'd also like to see that robot some time ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests