forked from tbsdtv/media_build
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README_dkms
94 lines (67 loc) · 3.61 KB
/
README_dkms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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 <kernelsourcedir> -dt
<kernelsourcedir> 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/<version>
will compile all the enabled modules for the currently running kernel.
$ sudo dkms build media_build/<version> -k <kernel-ver>
will compile all the enabled modules for the given Kernel version.
$ sudo dkms remove media_build/<version> -k <kernel-ver> | --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-<PACKAGE_VERSION>.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.