Browse Source

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>
John Soo 1 year ago
committed by Mathieu Othacehe
parent
commit
78410b0969
No known key found for this signature in database GPG Key ID: 8354763531769CA6
  1. 42
      gnu/packages/linux.scm

42
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.

Loading…
Cancel
Save