DKMS support description This file describes how to create a media-build DKMS package. This branch of media_build contains the scripts for the media_build DKMS support. It requires a media-tree to be used by the resulting DKMS package. In principle the DKMS support scripts can use any existing media-tree and use it. To get reproducable results for distributions, we need a stable media-tree. Thus there are branches available in https://github.com/jasmin-j/dddvb-linux-kernel See below for details about the branch naming in linux-media. First checkout the branch you want to create a DKMS from. Then create the "linux-media.tar.bz2" archive out of the existing Kernel tree. This can be easily done by: ./build_all.sh -dt needs to point to your linux-media tree. Now we need to define the version of the DKMS package. This can be easily done in "dkms_ver.conf". The version number can be any number required for the distribution you make the DKMS package for. Keep in mind, that also media_build needs to match the kernel source tree due to the backport patches, which need to match the Kernel sources. So the number should reflect the combination of media-tree and media-build. Because each new version of linux-media requires also a new version of media_build (due to the changed "dkms_ver.conf" file), I recomend to use simply a counting number. Now you can test your package (you may skip that). Use $ sudo dkms add . to add the current directory to the DKMS system. $ sudo dkms build media_build/ will compile all the enabled modules for the currently running kernel. $ sudo dkms build media_build/ -k will compile all the enabled modules for the given Kernel version. $ sudo dkms remove media_build/ -k | --all will remove the current directory from the DKMS system Just above is stated "all the enabled modules". There is a simple method to en/disable drivers. The files "??_any_name.inc" are included by "build_all.sh" and can be used to set/clear Kernel options and parameters. This is intended for distributions which may add new files according to their needs. The Debian DKMS tree on https://github.com/jasmin-j/media_build_dkms requires a tar file containing the DKMS and Kernel tree. For that the script "create_dkms_tar.sh" is used. It creates "media-build-.dkms_src.tgz PACKAGE_VERSION is read from dkms_ver.conf, so you need to edit this file prior to the tar file creation. The created tar file can be now used together with the above mentioned Debian DKMS tree or with a similar packager. DKMS Branch naming in linux-media The mediatree/master-ddbridge branch is used as the integration branch for improvements and bugfixes. It is constantly rebased to mediatree/master and therefore the HASHes are rewritten. With this approach it is not possible to make valid TAGs. On the other hand keeping mediatree/master-ddbridge consistant is too much effort. So we need stable branches as snapshots. The snapshots branch names have to start with "dkms/" followed by a number which gets incremented with each new snapshot and finaly the date of the snapshot generation. The latter is required, because the commit dates are not suffcient to know when the snapshot has been taken. Examples: dkms/0001-19_Aug_2017 dkms/0002-28_Aug_2017 dkms/0003-29_Aug_2017 media-build uses the same branch naming. It may happen that media-build requires an update due to improofments. In that case the number from media-build might be higher than the one from linux-media. With the next change at linux-media this will be egalized.