diff options
author | John Soo <jsoo1@asu.edu> | 2020-06-13 22:52:55 -0700 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-07-06 14:36:11 +0200 |
commit | 78410b0969c888bbde7d0111a275dff1c71f2401 (patch) | |
tree | 32ad82213ef54405d9f56f4791fe993c7e990731 | |
parent | ef20acae83af8189df3225bdf59c5a0c1ae7da45 (diff) | |
download | guix-78410b0969c888bbde7d0111a275dff1c71f2401.tar.gz guix-78410b0969c888bbde7d0111a275dff1c71f2401.zip |
gnu: Add linux-libre-with-bpf.
* gnu/packages/linux (%bpf-extra-linux-options): New variable,
(linux-libre-with-bpf): new variable.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
-rw-r--r-- | gnu/packages/linux.scm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index fce6c5037c..94d3b37845 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -75,6 +75,7 @@ #:use-module (gnu packages bison) #:use-module (gnu packages calendar) #:use-module (gnu packages check) + #:use-module (gnu packages cpio) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages compression) @@ -619,6 +620,30 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." ("CONFIG_CIFS" . m) ("CONFIG_9P_FS" . m))) +;; See https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration +(define %bpf-extra-linux-options + `(;; Needed for probes + ("CONFIG_UPROBE_EVENTS" . #t) + ("CONFIG_KPROBE_EVENTS" . #t) + ;; kheaders module also helpful for tracing + ("CONFIG_IKHEADERS" . #t) + ("CONFIG_BPF" . #t) + ("CONFIG_BPF_SYSCALL" . #t) + ("CONFIG_BPF_JIT_ALWAYS_ON" . #t) + ;; optional, for tc filters + ("CONFIG_NET_CLS_BPF" . m) + ;; optional, for tc actions + ("CONFIG_NET_ACT_BPF" . m) + ("CONFIG_BPF_JIT" . #t) + ;; for Linux kernel versions 4.1 through 4.6 + ;; ("CONFIG_HAVE_BPF_JIT" . y) + ;; for Linux kernel versions 4.7 and later + ("CONFIG_HAVE_EBPF_JIT" . #t) + ;; optional, for kprobes + ("CONFIG_BPF_EVENTS" . #t) + ;; kheaders module + ("CONFIG_IKHEADERS" . #t))) + (define (config->string options) (string-join (map (match-lambda ((option . 'm) @@ -937,6 +962,23 @@ It has been modified to remove all non-free binary blobs.") '("riscv64-linux") #:extra-version "riscv64-generic")) +(define-public linux-libre-with-bpf + (let ((base-linux-libre + (make-linux-libre* + linux-libre-5.4-version + linux-libre-5.4-source + '("x86_64-linux" "i686-linux" "armhf-linux" + "aarch64-linux" "riscv64-linux") + #:extra-version "bpf" + #:configuration-file kernel-config + #:extra-options + (append %bpf-extra-linux-options + %default-extra-linux-options)))) + (package + (inherit base-linux-libre) + (inputs `(("cpio" ,cpio) ,@(package-inputs base-linux-libre)))))) + + ;;; ;;; Linux kernel modules. |