From d9ba290238654482f3dd3cc94d38f38b65c220d7 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 10 Feb 2025 13:44:44 +0100 Subject: [PATCH] README.md: Add more informations --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e868b67..2741bbc 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,15 @@ Otherwise, change linux_dev variable with you kernel variant and change flake.lo On other distros: -1. With Nix env, .envrc, change line by `use flake .#other` +1. With direnv, in .envrc, change line by `use flake .#other` -2. Without Nix env, you need to setup LINUX_MODULES_FOLDER to linux modules folder of your distro (ex: `/lib/modules/$(uname -r)`) in your shell (bashrc) +2. With nix only, use `nix develop .#other` + +3. Otherwise, you need to setup LINUX_MODULES_FOLDER to linux modules folder of your distro (ex: `/lib/modules/$(uname -r)`) in your shell (ex: .bashrc) ## make : targets list -- all : Compiling kernel +- all : Compiling kernel (by default) - clean : Cleaning build folder All subfolder is configured to use LINUX_MODULES_FOLDER env variable set by flake develop @@ -28,7 +30,7 @@ Step 1: Load module sudo insmod [module_name].ko ``` -**Warning**: Can fail if secure boot is enabled +**Warning**: Can fail if secure boot is enabled (see notes about secure boot in below) Step 2: Check logs @@ -61,18 +63,18 @@ Search -I args and -D args ### Sign kernel module for testing with secure boot enabled -Prerequisites: Own secure boot keys +Prerequisites: Own secure boot keys configured. Secure boot keys can be found in : -- Fedora : `/etc/pki/akmods/certs/` +- Fedora : `/etc/pki/akmods` - With sbctl : `/var/lib/sbctl` ``` sign-file sha256 $SECUREBOOT_KEYS_PATH/private_key.priv $SECUREBOOT_KEYS_PATH/public_key.der .ko ``` -sign-file is in `/usr/src/kernels/$(uname -r)/scripts` +sign-file executable is in `/usr/src/kernels/$(uname -r)/scripts` Full example (run as root):