Subject: Re: bug#41120: uvesafb service is unsupported on aarch64

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Thu, 7 May 2020 16:58:01 +0200

On Thu, May 07, 2020 at 04:55:13PM +0200, pelzflorian (Florian Pelz) wrote:
> I have more success with moving the file-exists check into the
> #~(lambda …) like the attached patch.

Sorry I forgot to git add.  This is the patch.
>From f88b1b487d48c959a7ed00d6032ccfe05aa81f0e Mon Sep 17 00:00:00 2001
From: Florian Pelz <[email-masked]>
Date: Thu, 7 May 2020 13:26:19 +0200
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Subject: [PATCH] installer: Do not load uvesafb on non-x86 install images.

Fixes <https://bugs.gnu.org/41120>.
Suggested by Efraim Flashner <[email-masked]>.

* gnu/system/install.scm (uvesafb-shepherd-service): Do not build x86-only
v86d helper unconditionally.
---
 gnu/system/install.scm | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 6435c1bff4..952dee464f 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -299,16 +299,18 @@ the user's target storage device rather than on the RAM disk."
          (documentation "Load the uvesafb kernel module if needed.")
          (provision '(maybe-uvesafb))
          (requirement '(file-systems))
-         (start #~(lambda ()
-                    ;; uvesafb is only supported on x86 and x86_64.
-                    (or (not (and (string-suffix? "linux-gnu" %host-type)
-                                  (or (string-prefix? "x86_64" %host-type)
-                                      (string-prefix? "i686" %host-type))))
-                        (file-exists? "/dev/fb0")
-                        (invoke #+(file-append kmod "/bin/modprobe")
-                                "uvesafb"
-                                (string-append "v86d=" #$v86d "/sbin/v86d")
-                                "mode_option=1024x768"))))
+         (start
+           (if (and (string-suffix? "linux-gnu" %host-type)
+                    (or (string-prefix? "x86_64" %host-type)
+                        (string-prefix? "i686" %host-type)))
+               #~(lambda ()
+                   ;; uvesafb is only supported on x86 and x86_64.
+                   (or (file-exists? "/dev/fb0")
+                       (invoke #+(file-append kmod "/bin/modprobe")
+                               "uvesafb"
+                               (string-append "v86d=" #$v86d "/sbin/v86d")
+                               "mode_option=1024x768")))
+               #~(lambda () #t)))
          (respawn? #f)
          (one-shot? #t))))
 
-- 
2.26.1