Documentation

From Driver Backports Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
The Linux kernel backports project aims at backporting Linux '''upstream''' device drivers for usage on older kernels. The point of the project is to provide a central mechanism for backporting device drivers for ''any'' subsystem and enable ''both'' users '''and''' developers to always focus on upstream Linux kernel development. The backports project shall '''never''' include proprietary drivers and by design does not allow usage of itself with proprietary drivers. Every backports release has been test compiled ''for usage'' against  all supported kernels, currently 2.6.24 - latest. Note that Linux kernel releases can become deprecated. Right now we provide backport support for all kernels 2.6.24 up to the latest release inclusive even if a kernel is deprecated however you are encouraged to follow the best practices and at the '''very''' least be on a supported Linux kernel. Supported stable kernels are annotated on [http://kernel.org kernel.org].
+
The Linux kernel backports project aims at backporting Linux '''upstream''' device drivers for usage on older kernels. The point of the project is to provide a central mechanism for backporting device drivers for ''any'' subsystem and enable ''both'' users '''and''' developers to always focus on upstream Linux kernel development. The backports project shall '''never''' include proprietary drivers and by design does not allow usage of itself with proprietary drivers. Every backports release has been test compiled ''for usage'' against  all supported kernels, the oldest one is (currently) 3.0. Note that Linux kernel releases can become deprecated. You are encouraged to use supported stable kernels as listed on [http://kernel.org kernel.org].
  
 
<h2>Release types</h2>
 
<h2>Release types</h2>
Line 13: Line 13:
 
   * Bluetooth
 
   * Bluetooth
 
   * NFC
 
   * NFC
   * ieee802154 (will be available on v3.11 releases)
+
   * ieee802154
  * GPU
+
 
   * Media
 
   * Media
 
   * Regulator
 
   * Regulator
  
Whether or not a device driver is available from a subsytem will depend on whether or not a developer decided to backport it '''and''' if the device driver is backported down to the kernel you are on. If you see the driver on '''make menuconfig''' it means you can use it. An alternative is to look at the git tree [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] file. Note that the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] '''does not''' exist on a final release, it only exists on the development git tree and the one linked here is the one on the master branch -- you should look at the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/refs/ release branches] for their respective dependencies file if using an older release. Someone is welcome to come up with a fancy page that provides the device driver <--> kernel dependency map page. If a device driver is available on '''make menuconfig''' but is not listed on the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] file it means it is available for usage on all supported kernel, v2.6.24 - on.
+
Whether or not a device driver is available from a subsytem will depend on whether or not a developer decided to backport it '''and''' if the device driver is backported down to the kernel you are on. If you see the driver on '''make menuconfig''' it means you can use it. An alternative is to look at the git tree [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] file. Note that the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] '''does not''' exist on a final release, it only exists on the development git tree and the one linked here is the one on the master branch -- you should look at the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/refs/ release branches] for their respective dependencies file if using an older release. Someone is welcome to come up with a fancy page that provides the device driver <--> kernel dependency map page. If a device driver is available on '''make menuconfig''' but is not listed on the [https://git.kernel.org/cgit/linux/kernel/git/mcgrof/backports.git/tree/dependencies dependencies] file it means it is available for usage on all supported kernel.
  
 
Users should just install what they ''know'' they need, if not sure don't enable a driver. Typically Linux distributions would use the backports project and build modules for you and you'd have a backports package available for your distribution.
 
Users should just install what they ''know'' they need, if not sure don't enable a driver. Typically Linux distributions would use the backports project and build modules for you and you'd have a backports package available for your distribution.
Line 35: Line 34:
 
</pre>
 
</pre>
  
Its understood users may not how to configure the backports package, just like they may not know how to configure the Linux kernel, so a short cut is provided with default configuration files that can be used to only build their drivers / subsystems of interest. You can also just query the regular help menu.
+
Its understood users may not know how to configure the backports package, just like they may not know how to configure the Linux kernel, so a short cut is provided with default configuration files that can be used to only build their drivers / subsystems of interest. You can also just query the regular help menu.
  
 
<pre>
 
<pre>
Line 42: Line 41:
 
</pre>
 
</pre>
  
If you use this option just use the 'make defconf-option' in replacement for ''make menuconfig'' above. For example to compile all DRM drivers:
+
If you use this option just use the 'make defconf-option' in replacement for ''make menuconfig'' above. For example to compile all wifi drivers:
  
 
<pre>
 
<pre>
 
# as a user
 
# as a user
make defconfig-drm
+
make defconfig-wifi
 
make -j4
 
make -j4
 
# as root
 
# as root
Line 52: Line 51:
 
</pre>
 
</pre>
  
Note that there are only default configuration files written for a few drivers while the project actually backports over 830 device drivers, the reason we have default configuration files for a few drivers is simply because developer have provided a default config options for them. What we really need is a 'make localmodconfig' support but that will take a while given that it involves mapping older kernel configs to newer kernel configs (which likely would be welcomed upstream as well).
+
Note that there are only default configuration files written for a few drivers while the project actually backports a lot of device drivers, the reason we have default configuration files for a few drivers is simply because developer have provided a default config options for them. What we really need is a 'make localmodconfig' support but that will take a while given that it involves mapping older kernel configs to newer kernel configs (which likely would be welcomed upstream as well).
  
 
<h2>Cross compiling</h2>
 
<h2>Cross compiling</h2>

Revision as of 19:17, 21 May 2014

The Linux kernel backports project aims at backporting Linux upstream device drivers for usage on older kernels. The point of the project is to provide a central mechanism for backporting device drivers for any subsystem and enable both users and developers to always focus on upstream Linux kernel development. The backports project shall never include proprietary drivers and by design does not allow usage of itself with proprietary drivers. Every backports release has been test compiled for usage against all supported kernels, the oldest one is (currently) 3.0. Note that Linux kernel releases can become deprecated. You are encouraged to use supported stable kernels as listed on kernel.org.

Contents

Release types

Both daily snapshots based on linux-next, and stable releases based Linux's stable releases are provided. Always use the latest stable available release unless you need a feature / fix only currently available on the linux-next based release. A backports-3.x release means device drivers from the Linux v3.x release have been taken, backported and made available for you to use on any kernel you may be on from 2.6.24 - 3.(x-1).

Currently backported subsystems

Device drivers are available for the following subsystems:

 * Ethernet
 * Wireless
 * Bluetooth
 * NFC
 * ieee802154
 * Media
 * Regulator

Whether or not a device driver is available from a subsytem will depend on whether or not a developer decided to backport it and if the device driver is backported down to the kernel you are on. If you see the driver on make menuconfig it means you can use it. An alternative is to look at the git tree dependencies file. Note that the dependencies does not exist on a final release, it only exists on the development git tree and the one linked here is the one on the master branch -- you should look at the release branches for their respective dependencies file if using an older release. Someone is welcome to come up with a fancy page that provides the device driver <--> kernel dependency map page. If a device driver is available on make menuconfig but is not listed on the dependencies file it means it is available for usage on all supported kernel.

Users should just install what they know they need, if not sure don't enable a driver. Typically Linux distributions would use the backports project and build modules for you and you'd have a backports package available for your distribution.

Usage guide

Building backports follows the same build mechanism as building the Linux kernel.

# as a user
make menuconfig
make -j4
# as root
make install
# reboot and enjoy

Its understood users may not know how to configure the backports package, just like they may not know how to configure the Linux kernel, so a short cut is provided with default configuration files that can be used to only build their drivers / subsystems of interest. You can also just query the regular help menu.

make help
make defconfig-help

If you use this option just use the 'make defconf-option' in replacement for make menuconfig above. For example to compile all wifi drivers:

# as a user
make defconfig-wifi
make -j4
# as root
make install

Note that there are only default configuration files written for a few drivers while the project actually backports a lot of device drivers, the reason we have default configuration files for a few drivers is simply because developer have provided a default config options for them. What we really need is a 'make localmodconfig' support but that will take a while given that it involves mapping older kernel configs to newer kernel configs (which likely would be welcomed upstream as well).

Cross compiling

To cross compile:

set -a
CROSS_COMPILE=${CROSS_COMPILE}
ARCH=${TARGET_CPU}
KLIB_BUILD=${DEV_PATH}/${LINUX_DIR}
KLIB=${TARGET_ROOT_ON_HOST}
set +a
make oldconfig  # menuconfig worked here too
make
make install

The 'make install' target isn't currently sane for cross-builds due to the bacport_firmware_install script not respecting prefixes. For now you can comment out that script few others like initrd updates, from being run out of the Makefiles.

Cross compile with Freescale's LTIB

To get backports happy in LTIB, use UNSPOOF/SPOOF_PATH to switch between host and cross environment. Example Build section in backports.spec

 %Build
 export PATH=$UNSPOOF_PATH
 
 make menuconfig prefix=%{_prefix} \
   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \
   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \
   KLIB_BUILD=${TOP}/rpm/BUILD/linux
 
 export PATH=$SPOOF_PATH
 
 make prefix=%{_prefix} \
   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \
   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \
   KLIB_BUILD=${TOP}/rpm/BUILD/linux

88x31.png - This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Personal tools