diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-05-07 23:44:33 -0400 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-05-29 22:01:23 -0400 |
| commit | b72b6063cebbcfd64d43f5b05ba8470eb11c3f65 (patch) | |
| tree | ce3563484da2bc8c90470755c96ab15752793a0a /gnu | |
| parent | 4114060cd0ca2188de525436ea56ecea22ab40a8 (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')
| -rw-r--r-- | gnu/packages/linux.scm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index fca309e73ef..db2b0f4bda6 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." | |||
| 856 | `(;; Make the kernel config available at /proc/config.gz | 856 | `(;; Make the kernel config available at /proc/config.gz |
| 857 | ("CONFIG_IKCONFIG" . #t) | 857 | ("CONFIG_IKCONFIG" . #t) |
| 858 | ("CONFIG_IKCONFIG_PROC" . #t) | 858 | ("CONFIG_IKCONFIG_PROC" . #t) |
| 859 | ;; Debugging options. | ||
| 860 | ("CONFIG_DEBUG_INFO" . #t) ;required by BTF | ||
| 861 | ,@(if (version>=? version "5.1") | ||
| 862 | '(("CONFIG_DEBUG_INFO_BTF" . #t)) | ||
| 863 | '()) | ||
| 864 | ,@(if (version>=? version "5.12") | ||
| 865 | '(("CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT" . #t)) | ||
| 866 | '()) | ||
| 867 | ("CONFIG_DEBUG_INFO_REDUCED" . #f) ;incompatible with BTF | ||
| 868 | ;; Tracing and related options. | ||
| 869 | ,@(if (version>=? version "5.1") | ||
| 870 | '(("CONFIG_BPF_JIT" . #t) | ||
| 871 | ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) | ||
| 872 | ("CONFIG_BPF_SYSCALL" . #t)) | ||
| 873 | '()) | ||
| 874 | ,@(if (version>=? version "5.13") | ||
| 875 | '(("BPF_UNPRIV_DEFAULT_OFF" . #t)) | ||
| 876 | '()) | ||
| 859 | ;; Some very mild hardening. | 877 | ;; Some very mild hardening. |
| 860 | ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) | 878 | ("CONFIG_SECURITY_DMESG_RESTRICT" . #t) |
| 861 | ;; All kernels should have NAMESPACES options enabled | 879 | ;; All kernels should have NAMESPACES options enabled |
| @@ -1134,7 +1152,12 @@ ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 1134 | ;; These are needed to compile the GCC plugins. | 1152 | ;; These are needed to compile the GCC plugins. |
| 1135 | gmp | 1153 | gmp |
| 1136 | mpfr | 1154 | mpfr |
| 1137 | mpc)) | 1155 | mpc |
| 1156 | ;; These are needed when building with the CONFIG_DEBUG_INFO_BTF | ||
| 1157 | ;; support. | ||
| 1158 | dwarves ;for pahole | ||
| 1159 | python-wrapper | ||
| 1160 | zlib)) | ||
| 1138 | (home-page "https://www.gnu.org/software/linux-libre/") | 1161 | (home-page "https://www.gnu.org/software/linux-libre/") |
| 1139 | (synopsis "100% free redistribution of a cleaned Linux kernel") | 1162 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
| 1140 | (description "GNU Linux-Libre is a free (as in freedom) variant of the | 1163 | (description "GNU Linux-Libre is a free (as in freedom) variant of the |
