diff mbox series

[bug#51771,1/2] gnu: linux: Support numbers and strings in options.

Message ID iOvT9g1d7_K-thdi2Zsdn4SxPyMuPrPFP6k121oLlG67EGRxi5tPyWOE8vb3jvCfsgZPQ13b7dKWRdVdAY6VCXV0goFY5AYOPBRV4nsvdRA=@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:02 p.m. UTC
Hi,

this patch should add support for waydroid which requires certain options in the kernel enabled.

In order to enable the features the lambda-match has to be extended to support numbers and strings.

However, the kernel compiles and I can reconfigure the system, + reboot. But I do not see /dev/binder device. Details are in the last mail.

Petr

* gnu/packages/linux.scm: Match numbers and strings in options.

--
2.33.0

Comments

phodina Nov. 11, 2021, 7:31 p.m. UTC | #1
Unfortunately, as stated above the binder interface is missing. I looked for the kernel module but couldn't find it. As the /proc/config.gz is not present I can't verify it's enabled.

$ find /run/booted-system/kernel/lib/modules/5.14.17-gnu/kernel/ -iname "*binder*"
$ cat /proc/cmdline
BOOT_IMAGE=/gnu/store/fr1cwmbn19hyrs3wxr5sqr7iy4cj674y-linux-libre-waydroid-5.14.17/bzImage --root=/dev/mapper/cryptsystem --system=/gnu/store/8g26gi6v9dni0cagc3l1ny8shyz8r38h-system --load=/gnu/store/8g26gi6v9dni0cagc3l1ny8shyz8r38h-system/boot modprobe.blacklist=usbmouse,usbkbd quiet

Therefore the waydroid userspace manager also doesn't work:

# waydroid.py init
[19:40:05] Failed to load binder driver
[19:40:06] modprobe: FATAL: Module binder_linux not found in directory /run/booted-system/kernel/lib/modules/5.14.17-gnu
[19:40:06] ERROR: Binder node "binder" for waydroid not found
[19:40:06] See also: <https://github.com/waydroid>
Run 'waydroid log' for details.

$ waydroid.py log
(006323) [19:40:05] % modprobe binder_linux devices="anbox-binder,anbox-vndbinder,anbox-hwbinder"
modprobe: FATAL: Module binder_linux not found in directory /run/booted-system/kernel/lib/modules/5.14.17-gnu
(006323) [19:40:05] Failed to load binder driver
(006323) [19:40:06] modprobe: FATAL: Module binder_linux not found in directory /run/booted-system/kernel/lib/modules/5.14.17-gnu
(006323) [19:40:06] ERROR: Binder node "binder" for waydroid not found
(006323) [19:40:06] See also: <https://github.com/waydroid>
(006323) [19:40:06] Traceback (most recent call last):
  File "/gnu/store/iprc2yqsx5zi8nc2g3nqvlmlqzbw7nrf-waydroid-1.2.0/lib/waydroid/tools/__init__.py", line 54, in main

My conclusion is the module is not enabled and built. It could be do the the extended match-lambda expression as I'm not Guile guru.

The patch related to waydroid can be find here [1].

[1] https://issues.guix.gnu.org/51737
outlook user April 8, 2024, 8:27 p.m. UTC | #2
phodina: Is this 51737 duplicate?
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f386139638..ffbaed0c57 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -729,7 +729,11 @@  (define (config->string options)
                       ((option . #t)
                        (string-append option "=y"))
                       ((option . #f)
-                       (string-append option "=n")))
+                       (string-append option "=n"))
+                      ((option . number)
+                       (string-append option "=" number))
+                      ((option . string)
+                       (string-append option "=\"" string "\"")))
                     options)
                "\n"))