From 0e0d1655ebc3474454471449298bd7b6c8d739da Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 11 Nov 2021 19:26:41 +0100 Subject: [PATCH v2 1/7] gnu: Add linux-libre-waydroid. * gnu/packages/linux.scm (linux-libre-waydroid, waydroid-extra-linux-options): New variables. diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8f7b4f4f5b..d094c529cb 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -729,6 +729,14 @@ (define %bpf-extra-linux-options ;; kheaders module ("CONFIG_IKHEADERS" . #t))) +(define %waydroid-extra-linux-options + `(;; Modules required for waydroid: + ("CONFIG_ASHMEM" . #t) + ("CONFIG_ANDROID" . #t) + ("CONFIG_ANDROID_BINDER_IPC" . #t) + ("CONFIG_ANDROID_BINDERFS" . #t) + ("CONFIG_ANDROID_BINDER_DEVICES" . "binder,hwbinder,vndbinder"))) + (define (config->string options) (string-join (map (match-lambda ((option . 'm) @@ -1156,6 +1164,24 @@ (define-public linux-libre-mips64el-fuloong2e `(("CONFIG_OVERLAY_FS" . m)) %default-extra-linux-options))) +(define-public linux-libre-waydroid + (let ((base-linux-libre + (make-linux-libre* + linux-libre-version + linux-libre-gnu-revision + linux-libre-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* -- 2.36.1