README.md: Add secure boot notes

This commit is contained in:
Florian RICHER 2025-02-10 13:26:47 +01:00
parent 9d9b5d8985
commit 0f91d01776

View file

@ -57,4 +57,27 @@ cd 01_basic_module/
bear --append --output ../.vscode/compile_commands.json -- make -C $LINUX_MODULES_FOLDER/build M=$PWD modules
```
Search -I args and -D args
Search -I args and -D args
### Sign kernel module for testing with secure boot enabled
Prerequisites: Own secure boot keys
Secure boot keys can be found in :
- Fedora : `/etc/pki/akmods/certs/`
- With sbctl : `/var/lib/sbctl`
```
sign-file sha256 $SECUREBOOT_KEYS_PATH/private_key.priv $SECUREBOOT_KEYS_PATH/public_key.der <module_file>.ko
```
sign-file is in `/usr/src/kernels/$(uname -r)/scripts`
Full example (run as root):
1. Fedora
```bash
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 /etc/pki/akmods/private/private_key.priv /etc/pki/akmods/certs/public_key.der <module_file>.ko
```