Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Adding vmlinux to linux kernel 'dev' derivation.

It takes some extra 13MB (and in dev, not out), but allows perf to show kernel
symbols when profiling. I think it is worth it.

In my NixOS, I refer to it in the system derivation, for easy telling to perf
through /run/booted-system/vmlinux:

system.extraSystemBuilderCmds = ''
ln -s ${config.boot.kernelPackages.kernel.dev}/vmlinux $out/vmlinux
'';

(cherry picked from commit 53a45825523566b8c9c5ff135e8ff75e05558d85)

+5 -1
+5 -1
pkgs/os-specific/linux/kernel/manual-config.nix
··· 109 109 buildFlags = [ 110 110 "KBUILD_BUILD_VERSION=1-NixOS" 111 111 platform.kernelTarget 112 + "vmlinux" # for "perf" and things like that 112 113 ] ++ optional isModular "modules"; 113 114 114 115 installFlags = [ ··· 122 123 if platform.kernelTarget == "zImage" then "zinstall" else 123 124 "install") ]; 124 125 125 - postInstall = (optionalString installsFirmware '' 126 + postInstall = '' 127 + mkdir -p $dev 128 + cp $buildRoot/vmlinux $dev/ 129 + '' + (optionalString installsFirmware '' 126 130 mkdir -p $out/lib/firmware 127 131 '') + (if (platform ? kernelDTB && platform.kernelDTB) then '' 128 132 make $makeFlags "''${makeFlagsArray[@]}" dtbs