From 92e2a3b15f4eec6ef18eb7e0b2addc98f71757b0 Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 12 Jun 2023 10:44:29 -0400 Subject: [PATCH] add docs for KUNIT setting --- overlay/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/overlay/default.nix b/overlay/default.nix index ff62828..a686855 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -81,6 +81,23 @@ in }; argsOverride = { structuredExtraConfig = with prev.lib.kernel; { + # The perl script to generate kernel options sets unspecified + # parameters to `m` if possible [1]. This results in the + # unspecified config option KUNIT [2] getting set to `m` which + # causes DRM_VC4_KUNIT_TEST [3] to get set to `y`. + # + # This vc4 unit test fails on boot due to a null pointer + # exception with the existing config. I'm not sure why, but in + # any case, the DRM_VC4_KUNIT_TEST config option itself states + # that it is only useful for kernel developers working on the + # vc4 driver. So, I feel no need to deviate from the standard + # rpi kernel and attempt to successfully enable this test and + # other unit tests because the nixos perl script has this + # sloppy "default to m" behavior. So, I set KUNIT to `n`. + # + # [1] https://github.com/NixOS/nixpkgs/blob/85bcb95aa83be667e562e781e9d186c57a07d757/pkgs/os-specific/linux/kernel/generate-config.pl#L1-L10 + # [2] https://github.com/raspberrypi/linux/blob/1.20230405/lib/kunit/Kconfig#L5-L14 + # [3] https://github.com/raspberrypi/linux/blob/bb63dc31e48948bc2649357758c7a152210109c4/drivers/gpu/drm/vc4/Kconfig#L38-L52 KUNIT = no; }; };