guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add linux-libre-with-bpf.


From: guix-commits
Subject: branch master updated: gnu: Add linux-libre-with-bpf.
Date: Mon, 06 Jul 2020 08:36:30 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 78410b0  gnu: Add linux-libre-with-bpf.
78410b0 is described below

commit 78410b0969c888bbde7d0111a275dff1c71f2401
Author: John Soo <jsoo1@asu.edu>
AuthorDate: Sat Jun 13 22:52:55 2020 -0700

    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>
---
 gnu/packages/linux.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index fce6c50..94d3b37 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]