From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#40538: installer: Support uvesafb to install on machines without KMS. Date: Sat, 11 Apr 2020 21:03:45 +0200 Message-ID: <20200411190344.pwadvpv3jzne42gx@pelzflorian.localdomain> References: <20200410125447.smn6xhcixe7hpday@pelzflorian.localdomain> <87tv1rv21e.fsf@gnu.org> <20200411184346.c3cgop7egcjyqzwf@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="c2tmhvq7vwwuthe7" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38777) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNLQB-0002Ih-A6 for bug-guix@gnu.org; Sat, 11 Apr 2020 15:04:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNLQA-0000QL-0q for bug-guix@gnu.org; Sat, 11 Apr 2020 15:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45549) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNLQ9-0000QG-TE for bug-guix@gnu.org; Sat, 11 Apr 2020 15:04:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNLQ9-0002pN-Pn for bug-guix@gnu.org; Sat, 11 Apr 2020 15:04:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20200411184346.c3cgop7egcjyqzwf@pelzflorian.localdomain> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 40538@debbugs.gnu.org --c2tmhvq7vwwuthe7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Apr 11, 2020 at 08:43:46PM +0200, pelzflorian (Florian Pelz) wrote: > Please consider the attached patch. Actually I’m not sure about vga=793. Better use this patch with vga= removed. --c2tmhvq7vwwuthe7 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-installer-Load-uvesafb-kernel-module.patch" Content-Transfer-Encoding: 8bit >From 4b5a1b522dfd76d5c6c6a4cb093dba45cf636a58 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 11 Apr 2020 18:56:37 +0200 Subject: [PATCH] installer: Load uvesafb kernel module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Machines without Kernel Mode Setting (those with many old and current AMD GPUs, SiS GPUs, …) need uvesafb to show the GUI installer. Some may also need a kernel parameter like nomodeset, but we leave that for the user to specify in GRUB. * gnu/system/install.scm (uvesafb-shepherd-service): New procedure. (uvesafb-service-type): New variable. (%uvesafb-service): New variable. (%installation-services): Add it. --- gnu/system/install.scm | 47 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index c15c2c7814..cfe2b9540a 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) + #:use-module (guix modules) #:use-module ((guix packages) #:select (package-version)) #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu installer) @@ -50,6 +52,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages compression) #:use-module (gnu packages nvi) + #:use-module (gnu packages xorg) #:use-module (ice-9 match) #:use-module (srfi srfi-26) #:export (installation-os @@ -273,7 +276,6 @@ the user's target storage device rather than on the RAM disk." (define %configuration-template-service (service configuration-template-service-type #t)) - (define %nscd-minimal-caches ;; Minimal in-memory caching policy for nscd. (list (nscd-cache (database 'hosts) @@ -287,6 +289,41 @@ the user's target storage device rather than on the RAM disk." (persistent? #f) (max-database-size (* 5 (expt 2 20)))))) ;5 MiB + +;; These define a service to load the uvesafb kernel module with the +;; appropriate options. The GUI installer needs it when the machine does not +;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0. +(define (uvesafb-shepherd-service _) + (list (shepherd-service + (documentation "Load uvesafb.") + (provision '(uvesafb)) + (requirement '(file-systems)) + (start (with-imported-modules (source-module-closure '((guix utils))) + #~(begin + (use-modules (guix utils)) + (lambda () + ;; uvesafb is only supported on x86 and x86_64. + (if (member (%current-system) + '("x86_64-linux" "i686-linux")) + (invoke #+(file-append kmod "/bin/modprobe") + "uvesafb" + (string-append "v86d=" #$v86d "/sbin/v86d") + "mode_option=1024x768") + #t))))) + (respawn? #f) + (one-shot? #t)))) + +(define uvesafb-service-type + (service-type + (name 'uvesafb) + (extensions + (list (service-extension shepherd-root-service-type + uvesafb-shepherd-service))) + (default-value #t))) + +(define %uvesafb-service + (service uvesafb-service-type)) + (define %installation-services ;; List of services of the installation system. (let ((motd (plain-file "motd" " @@ -408,7 +445,13 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (list bare-bones-os glibc-utf8-locales texinfo - (canonical-package guile-2.2)))))) + (canonical-package guile-2.2))) + + ;; Machines without Kernel Mode Setting (those with many old and + ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI + ;; installer. Some may also need a kernel parameter like nomodeset, + ;; but we leave that for the user to specify in GRUB. + %uvesafb-service))) (define %issue ;; Greeting. -- 2.26.0 --c2tmhvq7vwwuthe7--