Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If Linux had stable kernel-to-driver interface, that driver could work today.


If the driver had been mainlined it would still work today.

https://www.kernel.org/doc/Documentation/process/stable-api-...


What if the vendor would prefer not to disclose source code? All drivers cannot be included into the kernel, even if they were, this would be a lot of code and who is going to maintain it?

This document shows how unfriendly is Linux to third-party code. Either you contribute into giant monolitic kernel, or your device won't work with next major kernel release.

> Depending on the version of the C compiler you use, different kernel

> data structures will contain different alignment of structures

That doesn't make sense. How does Microsoft use structures in their API then?

Furthermore, unlike Windows software, you cannot compile Linux kernel with any compiler except for GCC [1]. It doesn't comply with C standards.

> Depending on what kernel build options you select, a wide range of

> different things can be assumed by the kernel

> - different structures can contain different fields

That looks like poor design. Why care about non-standard configuration? Let those who use it solve the problems themselves which would be the true open source way.

> Linux runs on a wide range of different processor architectures.

> There is no way that binary drivers from one architecture will run

> on another architecture properly.

Supporting i386 is enough. Nobody is going to insert a PCI device into a smartphone. If there will be new CPU architectures, one can use i386 emulator.

> As a specific examples of this, the in-kernel USB interfaces have

> undergone at least three different reworks over the lifetime of this

> subsystem

They could make 3 versions of API and adapters that would support drivers written against older versions of API.

I think the real reason is that designing API is hard, and Linux developers have no interest in this. They care only about server platforms and those platforms have open-source drivers because they need Linux. Nobody cares that your USB webcam doesn't work because you don't connect webcam to a server.

I think that Linux could also rely on existing Windows drivers that exist for almost every device. Linux could provide an environment similar to Windows kernel, and run those drivers in a sandbox. For many devices, this is the only sane way to have them working with Linux.

[1] https://stackoverflow.com/questions/20600497/which-c-version...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: