>From 4225b08298bf62d008e46b14d14ac5aee717ef27 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 22:52:55 -0700 Subject: [PATCH 2/5] gnu: Add %bpf-extra-linux-options. * gnu/packages/linux (%bpf-extra-linux-options): New variable. --- gnu/packages/linux.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9a7cf73c0d..126d969e65 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -619,6 +619,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) -- 2.27.0