summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-07 23:44:33 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-29 22:01:23 -0400
commitb72b6063cebbcfd64d43f5b05ba8470eb11c3f65 (patch)
treece3563484da2bc8c90470755c96ab15752793a0a /gnu/packages/linux.scm
parent4114060cd0ca2188de525436ea56ecea22ab40a8 (diff)
gnu: linux-libre: Enable BTF debug info.
This is needed for software making use of eBPF programs, such as the sysdig utility, among others. For more information about BPF, see: <https://brendangregg.com/blog/2020-11-04/bpf-co-re-btf-libbpf.html>. * gnu/packages/linux.scm (%default-extra-linux-options): Enable CONFIG_DEBUG_INFO, CONFIG_DEBUG_INFO_BTF, CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT, CONFIG_BPF_JIT, CONFIG_BPF_JIT_ALWAYS_ON, CONFIG_BPF_SYSCALL and BPF_UNPRIV_DEFAULT_OFF. Disable CONFIG_DEBUG_INFO_REDUCED. (make-linux-libre*) [native-inputs]: Add dwarves, python-wrapper and zlib. Change-Id: Idfc64f82aa404e86168bffcf721a325f9e807f75
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fca309e73e..db2b0f4bda 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -856,6 +856,24 @@ ARCH and optionally VARIANT, or #f if there is no such configuration."
`(;; Make the kernel config available at /proc/config.gz
("CONFIG_IKCONFIG" . #t)
("CONFIG_IKCONFIG_PROC" . #t)
+ ;; Debugging options.
+ ("CONFIG_DEBUG_INFO" . #t) ;required by BTF
+ ,@(if (version>=? version "5.1")
+ '(("CONFIG_DEBUG_INFO_BTF" . #t))
+ '())
+ ,@(if (version>=? version "5.12")
+ '(("CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT" . #t))
+ '())
+ ("CONFIG_DEBUG_INFO_REDUCED" . #f) ;incompatible with BTF
+ ;; Tracing and related options.
+ ,@(if (version>=? version "5.1")
+ '(("CONFIG_BPF_JIT" . #t)
+ ("CONFIG_BPF_JIT_ALWAYS_ON" . #t)
+ ("CONFIG_BPF_SYSCALL" . #t))
+ '())
+ ,@(if (version>=? version "5.13")
+ '(("BPF_UNPRIV_DEFAULT_OFF" . #t))
+ '())
;; Some very mild hardening.
("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
;; All kernels should have NAMESPACES options enabled
@@ -1134,7 +1152,12 @@ ARCH and optionally VARIANT, or #f if there is no such configuration."
;; These are needed to compile the GCC plugins.
gmp
mpfr
- mpc))
+ mpc
+ ;; These are needed when building with the CONFIG_DEBUG_INFO_BTF
+ ;; support.
+ dwarves ;for pahole
+ python-wrapper
+ zlib))
(home-page "https://www.gnu.org/software/linux-libre/")
(synopsis "100% free redistribution of a cleaned Linux kernel")
(description "GNU Linux-Libre is a free (as in freedom) variant of the