| 1 |
Packaging scheme
|
| 2 |
----------------
|
| 3 |
Each source package containing the out-of-tree kernel module source
|
| 4 |
should produce the following binary packages: the binary-source
|
| 5 |
package, containing the module source in the form suitable for
|
| 6 |
building by module-assistant, and binary-binary packages, containing
|
| 7 |
the binary modules, which can be used with the official kernels
|
| 8 |
currently available in the archive.
|
| 9 |
|
| 10 |
Source package
|
| 11 |
--------------
|
| 12 |
|
| 13 |
The source package should be called $(NAME)-modules, where where
|
| 14 |
$(NAME) is unique module package identifier. It should be possible to
|
| 15 |
build all the binary packages from the source package simply by
|
| 16 |
invoking the 'debian/rules binary' command. In order to build the
|
| 17 |
binary-binary module packages for all supported flavours of the
|
| 18 |
official kernels, the source package should Build-Depend (at least) on
|
| 19 |
the following packages:
|
| 20 |
|
| 21 |
* linux-headers-$(VERSION)-all: will pull in the linux-headers for
|
| 22 |
all supported flavours for current architecture.
|
| 23 |
* module-assistant: recommended tool to build the binary modules.
|
| 24 |
* linux-support-$(VERSION)-$(ABINAME): the support scripts and
|
| 25 |
Makefile snippets to simplify the building of the modules for all
|
| 26 |
flavours. The script modules/gencontrol.py must be used to generate
|
| 27 |
information about available flavours, dependencies, build
|
| 28 |
dependencies and compiler settings for the resulting packages.
|
| 29 |
|
| 30 |
|
| 31 |
Please see the example rules file for details.
|
| 32 |
|
| 33 |
Binary-source package
|
| 34 |
---------------------
|
| 35 |
|
| 36 |
The purpose of this package is to give the users a possibility to
|
| 37 |
build the modules for a custom-built kernel. It should be adopted for
|
| 38 |
building with module assistant, see m-a documentation for details.
|
| 39 |
This package should have the name $(NAME)-source. It must include all
|
| 40 |
files necessary for building the binary modules from source against
|
| 41 |
the official linux-headers packages. If linux-headers packages do not
|
| 42 |
contain all the files required for a module build, these files should
|
| 43 |
be shipped as a part of the package.
|
| 44 |
|
| 45 |
Binary-binary packages
|
| 46 |
----------------------
|
| 47 |
|
| 48 |
Binary-binary packages should be named
|
| 49 |
|
| 50 |
$(NAME)-linux-modules-$(VERSION)-$(ABI)-$(FLAVOUR),
|
| 51 |
|
| 52 |
where $(VERSION), $(ABI) and $(FLAVOUR) parameters should match the
|
| 53 |
corresponding values of the official linux-image package for which the
|
| 54 |
module is built. Each binary-binary package must depend on the exact
|
| 55 |
version of the corresponding linux-image-$(VERSION)-$(ABI)-$(FLAVOUR)
|
| 56 |
package. Kernel modules shipped in the package should be installed in
|
| 57 |
/lib/modules/$(VERSION)-$(ABINAME)-$(FLAVOUR)/$(NAME) directory. The
|
| 58 |
package should invoke 'depmod -a' in its postinst and postrm scripts,
|
| 59 |
if the version, abiname and flavour of the kernel running at the time
|
| 60 |
the script execution is the same as the version of the kernel the
|
| 61 |
module has been built for. These packages should be built using
|
| 62 |
module-assistant from the source package.
|