Skip to content

Commit c331387

Browse files
authored
Merge pull request #125 from vvvrrooomm/sign_tool_in_framework_conf
Sign tool in framework.conf
2 parents 56707ab + f3cec50 commit c331387

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

dkms

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ read_conf()
599599
pre_build="$PRE_BUILD"
600600
pre_install="$PRE_INSTALL"
601601
obsolete_by="$OBSOLETE_BY"
602-
sign_tool="$SIGN_TOOL"
603602

604603
# Set module naming/location arrays
605604
local index array_size=0 s

dkms.8

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -918,13 +918,6 @@ of your source. If the script exits with a non\-zero value, the
918918
install will be aborted. This is typically used to perform a custom
919919
version comparison.
920920
.TP
921-
.B SIGN_TOOL=
922-
The module signing tool to be run at a
923-
.B build.
924-
Two arguments will be passed to the signing tool. The first argument is the
925-
target kernel version, the second is the module file path. If the tool exits
926-
with a non\-zero value, the build will be aborted.
927-
.TP
928921
.SH DKMS.CONF VARIABLES
929922
Within your
930923
.I dkms.conf
@@ -976,22 +969,25 @@ You can use these files to override settings in the module-provided dkms.conf fi
976969
This configuration file controls how the overall DKMS framework handles. It is sourced
977970
in every time the dkms command is run. Mainly it can currently be used to set different
978971
default values for the variables.
979-
.B $dkms_tree
980-
,
981-
.B $source_tree
982-
and
983-
.B $install_tree
984-
which control where DKMS looks for its framework. The
972+
.TP
973+
.B $dkms_tree, $source_tree, $install_tree
974+
control where DKMS looks for its framework.
975+
.TP
985976
.B $symlink_modules
986-
variable controls whether binary modules are copied to /lib/modules or if only symlinks are
987-
created there. Note that these variables can also
977+
controls whether binary modules are copied to /lib/modules or if only symlinks are created there. Note that these variables can also
988978
be manipulated on the command line with \-\-dkmstree, \-\-sourcetree, \-\-installtree
989979
and \-\-symlink-modules options.
990-
991-
The
980+
.TP
981+
.B $sign_tool
982+
Script to be run at build for signing modules.
983+
Two arguments will be passed to the script. The first argument is the
984+
.B target kernel version
985+
, the second is the
986+
.B module file path.
987+
If the script exits with a non\-zero value, the build will be aborted.
988+
.TP
992989
.B $autoinstall_all_kernels
993-
variable is used by the common postinst for DKMS modules. It controls if the build should be done
994-
for all installed kernels or only for the current and latest installed kernel. It has no command
990+
used by the common postinst for DKMS modules. It controls if the build should be done for all installed kernels or only for the current and latest installed kernel. It has no command
995991
line equivalent.
996992
.SH dkms_autoinstaller
997993
This boot\-time service automatically installs any module which has

dkms_framework.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@
2626
## Automatic installation and upgrade for all installed kernels (if set to a
2727
## non-null value)
2828
# autoinstall_all_kernels=""
29+
30+
## Script to sign modules during build, script is called with kernel version
31+
## and module name
32+
# sign_tool="/etc/dkms/sign_helper.sh"

sign_helper.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
/lib/modules/"$1"/build/scripts/sign-file sha512 /root/mok.priv /root/mok.der "$2"

0 commit comments

Comments
 (0)