mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
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 '';
This commit is contained in:
parent
5a0cde6c19
commit
53a4582552
|
@ -109,6 +109,7 @@ let
|
|||
buildFlags = [
|
||||
"KBUILD_BUILD_VERSION=1-NixOS"
|
||||
platform.kernelTarget
|
||||
"vmlinux" # for "perf" and things like that
|
||||
] ++ optional isModular "modules";
|
||||
|
||||
installFlags = [
|
||||
|
@ -122,7 +123,10 @@ let
|
|||
if platform.kernelTarget == "zImage" then "zinstall" else
|
||||
"install") ];
|
||||
|
||||
postInstall = (optionalString installsFirmware ''
|
||||
postInstall = ''
|
||||
mkdir -p $dev
|
||||
cp $buildRoot/vmlinux $dev/
|
||||
'' + (optionalString installsFirmware ''
|
||||
mkdir -p $out/lib/firmware
|
||||
'') + (if (platform ? kernelDTB && platform.kernelDTB) then ''
|
||||
make $makeFlags "''${makeFlagsArray[@]}" dtbs
|
||||
|
|
Loading…
Reference in a new issue