tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
898 stars 92 forks source link

Build kernel header module #245

Open virtu opened 1 month ago

virtu commented 1 month ago

When trying to run bcc on my Mac Mini, I realized the default kernel does not come with a module for headers. Is there a particular reason for this? If not, it would be nice to set CONFIG_IKHEADERS=m by default, which I think is the default for NixOS kernels.

psanford commented 1 month ago

This is configurable via boot.kernelPatches.extraConfig e.g.

boot.kernelPatches = [ {
    name = "extra-kernel-options";
    patch = null
    extraConfig = ''
          FTRACE y
          IKHEADERS y
          FUNCTION_TRACER y
          FTRACE_SYSCALLS y
          STACK_TRACER y
          SCHED_TRACER y
          TRACER_SNAPSHOT y
          DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT y
          DEBUG_INFO_BTF y
          DEBUG_INFO_BTF_MODULES y
          PROBE_EVENTS_BTF_ARGS y
        '';
}];