←back to thread

361 points sbt567 | 4 comments | | HN request time: 0.617s | source
1. fithisux ◴[] No.44385013[source]
There are many innovative OSes that are killed by the lack of Device Drivers.

As a community we must find a way for tackling this issue.

Micro-Kernels are a solution where one can run different OSes but they will reuse the same device driver servers.

But it requires co-ordination and determination.

Rust can be a solution for sure.

replies(2): >>44385177 #>>44387854 #
2. jeroenhd ◴[] No.44385177[source]
Any programming language can be a solution, the programming language itself isn't the problem. Convincing device driver programmers around the world to come up with a universal API that includes all the possible features and works on every OS is.

In this case, the cross-platform libusb should make this code work on either Linux or Windows (if you install the signed Windows drivers). If other operating systems port libusb, they get this code for free.

Most "real" drivers still run in kernel mode, though, and not even Linux can keep their ABI stable (Windows has to, between releases, with the aid of compatibility wrappers that only work for a certain amount of releases).

It would probably be worth it more forbBespoke operating systems to implement either the Windows API (like ReactOS does) or the Linux API (pick an LTS version) to get existing drivers to work. Unless you pay them, most driver programmers aren't going to bother with anything than Windows, maybe Linux, possibly macOS.

replies(1): >>44387342 #
3. sumtechguy ◴[] No.44387342[source]
On a previous project I spent a lot of time trying to figure out a 'generic device driver'. That is actually a decently hard space to crack. As each device has randomly different ways of talking. Some are serial/local bus. Some are memory space. Some have a combination. Some systems broadcast data, some you have to query it, some you have to query then wait for the next broadcast. Some systems mildly follow the spec, some strictly follow it, some strictly follow their own flavor of the spec or an outdated one, some have their totally made up spec that they may or may not give you. Even from the same company you can have two models that on the outside if you use their stuff looks the same but under the hood is sorta different enough that your driver is garbage. I basically ended up here https://xkcd.com/927/
4. yjftsjthsd-h ◴[] No.44387854[source]
Neither microkernels nor rust will help if you can't get everybody to agree on an ABI, which is the hard part in the first place.

That said, if you're willing to deal with other people's APIs, NetBSD's rump kernels are good for providing reusable drivers, and some projects have even had luck pulling drivers out of Linux to reuse, though obviously that's a little bit touchier.