=====Contents=====
* [[https://www.linuxfoundation.org/#Overview|1 Overview]]
* [[https://www.linuxfoundation.org/#Scope|2 Scope]]
* [[https://www.linuxfoundation.org/#Format_Details|3 Format Details]]
* [[https://www.linuxfoundation.org/#Directory_Structure|3.1 Directory Structure]]
* [[https://www.linuxfoundation.org/#Config_file_Specification|3.2 Config file Specification]]
* [[https://www.linuxfoundation.org/#Examples|4 Examples]]
====== Overview ======
In a general sense, the term "driver backport" can be used to describe any type of driver source structure which allows a driver coded for one kernel version to be built on another kernel version. This broad definition is flexible but does not contain enough structure or specificity to be useful in further standardization efforts. Therefore, this page defines/proposes a more stringent "Driver Backport Exchange Format" (DBEF) to be used in driver backports.
====== Scope ======
The driver backport exchange format specified here includes the information necessary to build an upstream driver for a specific distro/kernel. It does not include information (spec file, etc.) necessary to package the driver in a specific format.
====== Format Details ======
===== Directory Structure =====
A driver backport should contain the following directory structure and files:
-backport
-backport.conf
source-
*.c
*.h
Kbuild/Makefile
patches
patch_x
patch_y
...
source-
*.c
*.h
Kbuild/Makefile
patches
patch_x
patch_y
...
...
Using -backport for the top-level directory and -backport.conf are suggestions, not requirements.
===== Config file Specification =====
The -backport.conf file contains the following required and optional information:
driver-location: :
The driver location is a URL to an official upstream source.
The targets are the kernel and/or distro versions that the backport supports. The target tag may be simply a kernel version (e.g., "2.6.5"), it may be a distribution (e.g., "sles10sp1"), or it may be some other user-defined string (e.g., "my-favorite-kernel"). After each target is 1) the source to start from, then 2) a list of patches to be applied to the source in order to create code that can be built on the target. The order of patches is significant: they are to be applied in the order listed.
The aliases provide a means to specify additional targets which use the same source as previously-listed targets. E.g., an alias might indicate that a new target "sles10sp2" uses the same source as the target "sles10sp1", which requires a specific list of patches.
The "ramFS" line indicates that the driver should be included in the initial ram disk.
====== Examples ======
[[https://wiki.linuxfoundation.org/images/8/80/Tg3-backport.tar.gz|Sample driver backport]]