Quote:
Originally Posted by
theKbStockpiler
I find Linux drivers to be the most elusive topic that there is and have enough questions about them that could fill a guide or tutorial if there was one.
They're really not that mysterious. It's a program that either gets built into the kernel, or one or more files that can be loaded later. It's how to get these files that's more complicated.
Quote:
From what I can gather drivers are installed by one of three ways.
1- Recompile the kernel to include a driver that is included in the source code.
2- Create a LKM for a particular driver.
Options 1 and 2 are the same. Building a driver into the kernel uses the same files and scripts that the kernel uses to build itself. The difference is just where the code ends up -- in an external file, or added to the big pile of code they call a kernel.
Quote:
1- How would I obtain the driver if it does not come with the kernel so I could use a LKM?
Well, for starters, to obtain something, it has to actually exist of course.
If it's not in the kernel, it may be provided by the manufacturer.
Understand that open drivers of decent quality usually get incorporated into the kernel fairly rapidly. Drivers that are supplied by the manufacturer but
not built into the kernel are either proprietary, crap, or -- most probably -- both. You'd be astonished at the crap manufacturers call device drivers sometimes. Third party corporations seem to obey no programming standards unless forced to by a Windows IDE.
Quote:
2- Is the Script method actually a Kernel Patch?
A script is a program, and not all scripts do the same thing. Some might just check you have the right features in your kernel to use their program, then copy a pre-built kernel module into /usr/lib/modules/. Others might link in some half-compiled objects with your kernel source to build a kernel module customized for your kernel. Some might build you a new kernel module from scratch.
Quote:
3- Could I get some info or search terms to investigate how Kernel Patches work if this is what a Kernel Patch is for?
Kernel patches are bugfixes. They're built-in, they're not modules you load later.
The important thing for installing kernel drivers is that .ko files end up in /usr/lib/modules/... In the end, that's what really matters.