compat-drivers is the framework that pulls code from Linux kernel releases and strives to backport them automatically for usage on older Linux kernel releases. compat-drivers allows us to make releases of code from newer Linux kernel releases and get the latest drivers to users without having to recompile their entire kernel.
Supported Linux kernel releases
The kernel.org archive hosts all kernel releases. As the Linux kernel development moves on older kernels get deprecated and a few kernels remain supported. It is imperative that end users / system integrators / Linux distributions upgrade to newer supported kernels regularly otherwise they may end up being stuck on unsupported kernels. The compat-drivers project aims at always providing support of newer drivers down to at least all supported Linux kernel releases as listed on kernel.org. As it is though the project currently takes backporting further and it does support a large amount of older unsupported and deprecated Linux kernel releases. As it is right now all 21 older kernels are supported: 2.6.24 - 3.6.
Release types and Legend
There are two release types, linux-stable and linux-next releases, for details refer to the releases page. There are also modifications to releases and an extra set of flags are appended to releases depending on the series of types of patches applied to them. For details on these different type of patches that can be applied onto a release refer to the additional patches section. Below is a Legend map of the meanings of the flags used at the end of each release.
Extra flag meanings:
* -s - get and apply pending-stable/ from linux-next.git * -n - apply the patches linux-next-cherry-picks directory * -p - apply the patches on the linux-next-pending directory * -c - apply the patches on the crap directory
Release with no extra flags are simply vanilla releases of the kernel. Users are encouraged to use the -spn releases as these releases will have extra fixes not yet propagated. The -s flag for example indicates that the release has patches marked as stable which will be released by the next 3.x.y release of the kernel so you might as well get them now. Linux distributions are encouraged to use the extra flagged releases as well. We provide the vanilla releases for those Linux distributions which just want vanilla for whatever reason. The "-c" flag is for "crap" patches, content not yet even posted.
There are three subsystems currently backported through this framework.
* Ethernet * Wireless * Bluetooth
The video drivers are currently on their way to being integrated.
In order to compile and install modules from the compat-drivers releases you will need to have your kernel headers installed on your system. As you get new drivers though you may need to install newer firmware as well so be sure to always have in synch your /lib/firmware/ directly with the latest firmware from the linux-firmware.git tree.
Each backported subsystem may also take advantage of newer userspace APIs and as such you should upgrade each subsystem's recommended userspace as documented here.
Userspace upgrade for wireless
We recommend these the following 802.11 wireless userspace applications should be upgraded:
* wireless-regdb * CRDA * iw * rfkill * linux-firmware * wpa_supplicant * hostapd
Userspace upgrade for bluetooth
Someone should edit this and update this.
Userspace upgrade for ethernet
Someone should edit this and update this.
Building and installing
This section covers how to use build and install compat-drivers.
Selecting your driver
compat-drivers allows you to selectively build only one driver instead of building all backported drivers.
Extract the content of the package:
tar jxvf compat-drivers-$(date -I).tar.bz2
If you know what driver you want you can use driver-select:
Selecting your driver can reduce the amount of time to compile compat-drivers. It may also enable kernel compatibility down to older kernels. If you want to restore compat-drivers to enable all drivers again you can use:
If you do not see your driver in the supported list it means care has not been taken to ensure it works with driver-select and you must just build compat-drivers as a whole.
Building and installing
This section documents how to build and install compat-drivers.
Build the latest backported Linux subsystems:
cd compat-wireless-$(date -I) make
We use the updates/ directory so your distribution's drivers are left intact. By default depmod will search for this directory first, but if you find that it does not then check that your depmod.conf file lists the search order correctly with updates appearing first (before built-in). the package should automatically detect this for you and deploy an update for you.
sudo make install
This nukes our changes to updates/ so you can go back to using your distribution's supported drivers.
sudo make uninstall
Unloading your old distribution drivers
Since you might be replacing your old subsystem drivers you should first try to unload all existing related drivers. We provide a mechanism to unload all drivers:
sudo make unload
If unsure just reboot.
Before loading modules you must first unload your old subsystem modules. Read above how to do this. If you know what module you need you can simply load the module using modprobe. If you are not sure you can just reboot the box.
Building for external kernels
If you have a kernel you do not have installed but yet want to build the compat-drivers for it you can use this syntax:
make KLIB=/home/mcgrof/kernels/linux-18.104.22.168 \ KLIB_BUILD=/home/mcgrof/kernels/linux-22.214.171.124
Read the additional patches section for details of how emergency or critical fixes are dealt with while still prioritizing Linux upstream development.
Please see the reporting bugs section. This cannot be stressed enough: to date we have only have identified 2 backport related bugs, all other reported bugs were real bugs in actual upstream code so be sure to report any bugs found ASAP!
This work is a subset of the Linux kernel as such we keep the kernel's Copyright practice. Some files have their own copyright and in those cases the license is mentioned in the file. All additional work made to building this package is licensed under the GPLv2.
If you'd like to hack on compat-drivers or make your own releases refer to the hacking compat-drivers page.
The way compat-drivers releases are made, where they are kept are detailed in the compat-drivers admin page.