Hacker News new | ask | show | jobs
by Bananymous 563 days ago
Yeah basically every commonly used device has its protocol standardized. Although there exist some devices where the manufacturer has to provide the drivers. All of the devices I have written drivers have had their specifications publicly available for free (e.g. NVMe at https://nvmexpress.org/specifications).

I'm not really familiar with how Linux nor Windows handle drivers. While compiling the Linux kernel you specify which drivers you want to build into the kernel and which ones you want as modules. Usually most common ones compiled along side the kernel so there isn't really need to install them later, just load the driver modules. There are also devices that work with just a generic driver but would have more features with a specific one (e.g. led settings on a gaming mouse). I think Windows is maybe installing these optional drivers.

1 comments

So here's the kicker.

Microsoft, having the resources it does, was able to design and implement a stable driver ABI. In fact, they also have a stable userspace ABI. Both have evolved, but that's not the point.

Linux conversely (whether by design or by limitation) does not have stable ABIs (although userspace compatibility isn't terrible). Even though you can build kernel drivers as modules (and then load/unload), those modules are unique to each specific kernel build.

Remember those guys didn't write the compiler & linker toolchains they were using like Microsoft was able to do.

I will be honest, I understand why Linus & Co. have decided to keep it this way, because it encourages hardware manufacturers to submit either their drivers or their specifications to the upstream kernel, which promotes software freedom. It is a noble goal and has served them well.

BUT - thieir decision has caused me no small amount of consternation over the years as a system administrator. Once you use Linux for something that is not "server software" (be it auth, file sharing, web, etc.), you are generally using it to drive some piece of hardware (CNCs, industrial tools, cough phone systems cough). Vendors, especially those that deal in low-volume / high-margin products, do not want to release their source code. They're allergic to the idea even. So I have gotten stuck in outdated kernel hell on several occasions because the kernel devs have decided to change internal interfaces in a point-point release that my driver software relied upon.

I so wish that Linux would move to a stable driver ABI. It would make administration & upgrades so much easier, especially on the embedded side.

But I also know that it'll never happen.

FWIW, the "no stable kernel ABI" is unique to Linux, although no one really does this like Microsoft (i.e. the BSDs can break between releases, but I do believe NetBSD is superior to FreeBSD in this respect).