Skip to content

Commit 8521b09

Browse files
committed
fix: dkms.conf WOLFSSL_ROOT and kernel 8.x support
Pass WOLFSSL_ROOT to make so DKMS builds can find the wolfssl tree. Defaults to /usr/src/wolfssl; overridable via environment. Extend BUILD_EXCLUSIVE_KERNEL regex to cover kernel 8.x. Add DKMS usage section to README.md.
1 parent b135d5c commit 8521b09

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,27 @@ exported with exactly 44 characters of base64. WolfGuard public keys are
306306
roughly twice that length, unless built with `WG_USE_PUBLIC_KEY_COMPRESSION`,
307307
which is not currently supported in FIPS v5, but is supported in FIPS v6 and
308308
later.
309+
310+
311+
### Using DKMS for automatic kernel module rebuilds
312+
313+
DKMS (Dynamic Kernel Module Support) automatically rebuilds `wolfguard.ko`
314+
whenever a new kernel is installed, which is useful on systems with frequent
315+
kernel updates (e.g. Ubuntu with `unattended-upgrades`).
316+
317+
Before registering wolfguard with DKMS, the built wolfssl source tree must be
318+
accessible at `/usr/src/wolfssl`. Create a symlink if your wolfssl tree is
319+
elsewhere:
320+
```
321+
# ln -s /path/to/your/wolfssl /usr/src/wolfssl
322+
```
323+
If you prefer not to use `/usr/src/wolfssl`, set `WOLFSSL_ROOT` in the
324+
environment before running `dkms install` and it will be passed through to the
325+
build.
326+
327+
Register and install the module (replace `<version>` with the value of
328+
`PACKAGE_VERSION` in `kernel-src/dkms.conf`):
329+
```
330+
# dkms add /path/to/wolfguard/kernel-src
331+
# dkms install wolfguard/<version>
332+
```

kernel-src/dkms.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ AUTOINSTALL=yes
55
BUILT_MODULE_NAME="wolfguard"
66
DEST_MODULE_LOCATION="/wolfssl"
77

8-
MAKE="make -j module"
8+
MAKE="make -j WOLFSSL_ROOT=${WOLFSSL_ROOT:-/usr/src/wolfssl} module"
99

10-
# requires kernel 3.10 - 7.x, inclusive:
11-
BUILD_EXCLUSIVE_KERNEL="^(([7654]\.)|(3\.1[0-9]))"
10+
# requires kernel 3.10 - 8.x, inclusive:
11+
BUILD_EXCLUSIVE_KERNEL="^(([87654]\.)|(3\.1[0-9]))"

0 commit comments

Comments
 (0)