Kernel Debugging with QEMU: Difference between revisions

Axka (talk | contribs)
m Use extraStructuredConfig instead of extraConfig in boot.kernelPatches as the latter is deprecated
Axka (talk | contribs)
m Add link for more info about patching and configuring the kernel
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Set up the QEMU VM ==
== Set up the QEMU VM ==


=== With a Nix kernel ===
=== With a Nix-built kernel ===
Use a NixOS config like this:
Use a NixOS config like below. See [[Linux kernel#Custom configuration]] for more information about patching and configuring the kernel's build.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 21: Line 21:
       name = "enable debugging information";
       name = "enable debugging information";
       patch = null;
       patch = null;
       extraStructuredConfig = {
       structuredExtraConfig = {
         GDB_SCRIPTS = lib.kernel.yes;
         GDB_SCRIPTS = lib.kernel.yes;
         DEBUG_INFO = lib.kernel.yes;
         DEBUG_INFO = lib.kernel.yes;