diff mbox series

[bug#51771,2/2] gnu: Add linux-libre-with-waydroid.

Message ID vT1t7q1nSybGdcbnNv0gBkOmsLDQKTpuvLjBmsObWL0vH3rxO_vtPlSdqRKap4nKqivgnqL4pQi0LUmjJ66XJMqDTdAOmmgyn3Pcg3BMmO8=@protonmail.com
State New
Headers show
Series [bug#51771,1/2] gnu: linux: Support numbers and strings in options. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

phodina Nov. 11, 2021, 7:04 p.m. UTC
* gnu/packages/linux.scm (linux-libre-with-waydroid,
* waydroid-extra-linux-options): New variables.

--
2.33.0
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ffbaed0c57..2ec9c88ecb 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -722,6 +722,14 @@  (define %bpf-extra-linux-options
     ;; kheaders module
     ("CONFIG_IKHEADERS" . #t)))

+(define %waydroid-extra-linux-options
+  `(;; Modules required for waydroid:
+   ("CONFIG_ASHMEM" . m)
+   ("CONFIG_ANDROID" . #t)
+   ("CONFIG_ANDROID_BINDER_IPC" . m)
+   ("CONFIG_ANDROID_BINDERFS" . #f)
+   ("CONFIG_ANDROID_BINDER_DEVICES" . "binder,hwbinder,vndbinder")))
+
 (define (config->string options)
   (string-join (map (match-lambda
                       ((option . 'm)
@@ -1147,6 +1155,24 @@  (define-public linux-libre-mips64el-fuloong2e
                       `(("CONFIG_OVERLAY_FS" . m))
                       %default-extra-linux-options)))

+(define-public linux-libre-with-waydroid
+  (let ((base-linux-libre
+         (make-linux-libre*
+          linux-libre-5.14-version
+          linux-libre-5.14-gnu-revision
+          linux-libre-5.14-source
+          '("x86_64-linux" "i686-linux" "armhf-linux"
+            "aarch64-linux" "riscv64-linux")
+          #:extra-version "linux"
+          #:configuration-file kernel-config
+          #:extra-options
+          (append %waydroid-extra-linux-options
+                  %default-extra-linux-options))))
+    (package
+      (inherit base-linux-libre)
+         (name "linux-libre-waydroid")
+      (inputs `(("cpio" ,cpio) ,@(package-inputs base-linux-libre))))))
+
 (define-public linux-libre-with-bpf
   (let ((base-linux-libre
          (make-linux-libre*