I'm using DKMS to manage this module, in part because it makes it easy to manage signing the kernel module to appease Secure Boot. It makes my life a lot simpler, so I thought I'd contribute it back. Hope it can be useful!
This PR adds:
General docs for signing this module for use with Secure Boot systems in INSTALLING.md, both with and without DKMS.
Documentation on using DKMS to install and sign this module.
A dkms.tmpl.conf file, which requires the user to replace COMMIT_ID_VERSION (with a sed script provided in INSTALLING.md) and write the result to dkms.conf.
When the source repo is copied to /usr/src, the user-created dkms.conf is automatically picked up on by DKMS when performing dkms install. From there, everything works smoothly.
Why no dkms.conf?
DKMS versioning is important - otherwise DKMS will never think there's been an update, even if there has been.
The only way I could think of to version xmm7360-pci was by commit-id, as there are no releases. Unfortunately, dkms.conf can't automatically grab the commit-id of HEAD.
We can't update dkms.conf every time there's a commit. So, we have to insist that the user runs a one-liner sed script (documented in INSTALLING.md), one avoids introducing the chore of manually updating a version string every time there's a change.
There's probably a better way, but this is simple and it works. Also, if someone happens to copy dkms.tmpl.conf directly into dkms.conf, it'll still work - the version will just be COMMIT_ID_VERSION.
How-To (also in INSTALLING.md)
The following instructions are copy/pasted from INSTALLING.md. I've tested them on my own machine.
# Feed Commit ID as Package Version to dkms.conf
COMMIT_ID=$(git rev-parse HEAD)
sed "s/COMMIT_ID_VERSION/$COMMIT_ID/g" dkms.tmpl.conf > dkms.conf
# Install in /usr/src
sudo cp -r ./ /usr/src/xmm7360-pci-$COMMIT_ID/
# Install with DKMS
sudo dkms install xmm7360-pci/$COMMIT_ID
sudo modprobe xmm7360
After this, the user simply runs sudo ./scripts/lte.sh up as usual.
I'm using DKMS to manage this module, in part because it makes it easy to manage signing the kernel module to appease Secure Boot. It makes my life a lot simpler, so I thought I'd contribute it back. Hope it can be useful!
This PR adds:
INSTALLING.md
, both with and without DKMS.dkms.tmpl.conf
file, which requires the user to replaceCOMMIT_ID_VERSION
(with ased
script provided inINSTALLING.md
) and write the result todkms.conf
.When the source repo is copied to
/usr/src
, the user-createddkms.conf
is automatically picked up on by DKMS when performingdkms install
. From there, everything works smoothly.Why no dkms.conf?
DKMS versioning is important - otherwise DKMS will never think there's been an update, even if there has been.
The only way I could think of to version
xmm7360-pci
was by commit-id, as there are no releases. Unfortunately,dkms.conf
can't automatically grab the commit-id ofHEAD
.We can't update
dkms.conf
every time there's a commit. So, we have to insist that the user runs a one-linersed
script (documented inINSTALLING.md
), one avoids introducing the chore of manually updating a version string every time there's a change.There's probably a better way, but this is simple and it works. Also, if someone happens to copy
dkms.tmpl.conf
directly intodkms.conf
, it'll still work - the version will just beCOMMIT_ID_VERSION
.How-To (also in INSTALLING.md)
The following instructions are copy/pasted from
INSTALLING.md
. I've tested them on my own machine.After this, the user simply runs
sudo ./scripts/lte.sh up
as usual.