From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#40538: installer: Support uvesafb to install on machines without KMS. Date: Sat, 11 Apr 2020 22:59:10 +0200 Message-ID: <874ktpspr5.fsf@gnu.org> References: <20200410125447.smn6xhcixe7hpday@pelzflorian.localdomain> <87tv1rv21e.fsf@gnu.org> <20200411184346.c3cgop7egcjyqzwf@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48441) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNNEV-0005jY-MB for bug-guix@gnu.org; Sat, 11 Apr 2020 17:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNNER-0000ps-Tp for bug-guix@gnu.org; Sat, 11 Apr 2020 17:00:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNNEQ-0000oC-Fn for bug-guix@gnu.org; Sat, 11 Apr 2020 17:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNNEQ-0005VC-FD for bug-guix@gnu.org; Sat, 11 Apr 2020 17:00:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20200411184346.c3cgop7egcjyqzwf@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sat, 11 Apr 2020 20:43:46 +0200") 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: "pelzflorian (Florian Pelz)" Cc: 40538@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Florian, "pelzflorian (Florian Pelz)" skribis: > Please consider the attached patch. I chose to go without > kernel-module-loader-service (only copying its requirements field) > because I do not know how to conditionally extend or start another > Shepherd service from an activation snippet. > > I tested it on QEMU with and without nomodeset. With a previous Guix > System install image, it stayed black when adding a nomodeset kernel > parameter. I will test again on real hardware now, but previous > testing of uvesafb-enabled installer images proved successful unlike > non-uvesafb images. Great. > From 85a95ce758384979a0aae3bc9065197c74862b4b 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=3DUTF-8 > Content-Transfer-Encoding: 8bit > > Fixes . > > Machines without Kernel Mode Setting (those with many old and current AMD > GPUs, SiS GPUs, =E2=80=A6) need uvesafb to show the GUI installer. Some = may also need > a kernel parameter like nomodeset or vga=3D793, 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. I made the following adjustments. I also confirmed that everything goes well in QEMU, but obviously we=E2=80= =99ll have to test on hardware. Let=E2=80=99s publish an RC2 tomorrow so we can get feedback. Thank you! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 73a013bed0..203a085bcd 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -276,6 +276,7 @@ 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) @@ -295,21 +296,18 @@ the user's target storage device rather than on the RAM disk." ;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0. (define (uvesafb-shepherd-service _) (list (shepherd-service - (documentation "Load uvesafb.") + (documentation "Load the uvesafb kernel module.") (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))))) + (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)))) + (invoke #+(file-append kmod "/bin/modprobe") + "uvesafb" + (string-append "v86d=" #$v86d "/sbin/v86d") + "mode_option=1024x768")))) (respawn? #f) (one-shot? #t)))) @@ -319,11 +317,10 @@ the user's target storage device rather than on the RAM disk." (extensions (list (service-extension shepherd-root-service-type uvesafb-shepherd-service))) + (description + "Load the @code{uvesafb} kernel module with the right options.") (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" " @@ -451,7 +448,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI ;; installer. Some may also need a kernel parameter like nomodeset ;; or vga=793, but we leave that for the user to specify in GRUB. - %uvesafb-service))) + (service uvesafb-service-type)))) (define %issue ;; Greeting. --=-=-=--