Re: Linux vs Windows Drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Luciano Rocha wrote:
On Wed, Dec 26, 2007 at 12:48:52PM -0500, Bit wrote:
Thanks to both of you for the reply. Good information, but that still doesn't really answer my question. I'm more interested in the technical side of things. What I really want to understand boils down to this:

Why is it that in Windows I can install ATI drivers once and never worry about it again, while in Linux I may have to *reinstall* the drivers at a later date after a system update to get my card working with them again? Experience has proven to me that in Windows I can install the ATI drivers once, leave those same drivers on there for eternity, update the system over and over with Automatic Updates, and never worry about it breaking my video card. In Linux, every time I see a kernel update, I've learned to be braced for impact and just be ready with my ATI drivers to reinstall to get my card working again. I've never understood this. I'd like a technical explanation for why this is so.


Linux doesn't have a stable ABI (for drivers, userland is a different
thing), but Windows does.

That means that drivers compiled for your kernel today may not install
on newer (or older) kernels. You'll have to recompile it. Also, changes
like support for more than 4GB, how the lower 4GB is split, architecture
options, gcc version, function calling convections, etc., creates
dependencies that have to be met by the binary driver.

Windows guarantees that the exposed interface doesn't change, so there's
no need to recompile things if something internal changes.

But Linux doesn't even have a stable API, so the module may not compile
on your newer kernels.

Please see Documentation/stable_api_nonsense.txt, in the kernel sources,
or online at:
<http://scienceblogs.com/gregladen/2007/12/linux_stable_api_vs_not.php>

Note that without a stable API, there is no change of a stable ABI.


Luciano, thank you very much. I read your post, the link you provided, and a few other things from that link, and I at least understood enough to realize that it answers my question. I think I *kind of* get it now.

I think understanding the answer to my question really revolves around understanding an API and an ABI. Would you please read the following and let me know if I at least get the gist of what these two things are?

An API influences what your source code will look like. If they change the Linux kernel API, then you may need to make changes to your source code such as making "myLinuxKernelAPIFunctionCall( myparam1, myparam2 )" look something more like "myUpdatedLinuxKernelAPIFunctionCall( myparam1 )" in order to even make your code compile.

The ABI is the interface between a compiled binary kernel module and the kernel. It determines if an already compiled binary will properly interface with the kernel and run. If the ABI changes and you find your kernel module won't run properly, you just need to recompile from source to get a kernel module that will run. Hopefully the API hasn't changed and you won't need to change your source code to make it recompile...

BOTH kinds of changes happen with some degree of frequency in Linux.

Did I get at least this much right?
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux