From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: bug#40538: installer: Support uvesafb to install on machines without KMS. Date: Sun, 12 Apr 2020 00:11:52 +0300 Message-ID: <20200411211152.GA31526@E5400> References: <20200410125447.smn6xhcixe7hpday@pelzflorian.localdomain> <87tv1rv21e.fsf@gnu.org> <20200411184346.c3cgop7egcjyqzwf@pelzflorian.localdomain> <874ktpspr5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49668) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNNR1-0001rZ-PQ for bug-guix@gnu.org; Sat, 11 Apr 2020 17:13:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNNR0-0005Bp-B8 for bug-guix@gnu.org; Sat, 11 Apr 2020 17:13:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNNR0-0005Bl-88 for bug-guix@gnu.org; Sat, 11 Apr 2020 17:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNNR0-0005nT-30 for bug-guix@gnu.org; Sat, 11 Apr 2020 17:13:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <874ktpspr5.fsf@gnu.org> 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 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 11, 2020 at 10:59:10PM +0200, Ludovic Court=C3=A8s wrote: > Hi Florian, >=20 > "pelzflorian (Florian Pelz)" skribis: >=20 > > 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. >=20 > Great. >=20 > > 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 A= MD > > GPUs, SiS GPUs, =E2=80=A6) need uvesafb to show the GUI installer. Som= e may also need > > a kernel parameter like nomodeset or vga=3D793, but we leave that for t= he 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. >=20 > I made the following adjustments. >=20 > I also confirmed that everything goes well in QEMU, but obviously we=E2= =80=99ll > have to test on hardware. >=20 > Let=E2=80=99s publish an RC2 tomorrow so we can get feedback. >=20 > Thank you! >=20 > Ludo=E2=80=99. >=20 > 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 R= AM disk." > (define %configuration-template-service > (service configuration-template-service-type #t)) > =20 > + > (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 ut= ils))) > - #~(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=3D" #$v86d "/sb= in/v86d") > - "mode_option=3D1024x768") > - #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-typ= e) > + (string-prefix? "i686" %host-type)= ))) > + (invoke #+(file-append kmod "/bin/modprobe") > + "uvesafb" > + (string-append "v86d=3D" #$v86d "/sbin/v= 86d") > + "mode_option=3D1024x768")))) > (respawn? #f) > (one-shot? #t)))) You don't need both of these lines. If it's a one-shot service then it shouldn't respawn when it finishes, just when something else needs it again. > =20 > @@ -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))) > =20 > -(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 G= UI > ;; installer. Some may also need a kernel parameter like nomo= deset > ;; or vga=3D793, but we leave that for the user to specify in = GRUB. > - %uvesafb-service))) > + (service uvesafb-service-type)))) > =20 > (define %issue > ;; Greeting. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6SMpgACgkQQarn3Mo9 g1FBaA//cBfFlKIjiznklc9G865KilI1MPPh0zM0TuPi8n+uX7SKWPT4IoShLs9e QKM/G5Z9K7eTP14/DMSHBKZ3GsOLTzu2/B6O6D+jBF6OgDSOa40tG/yNiHiyOyyw jerfgThf0HmL1dz9XjyCrlzdT47UuArkJYVOpXbIVLmpHb3390ZS2jgddzF2u8So 5gXTQSiIAta+KGvTjgjSWrnhUnJzKneOpfUSkGLbcJaxmsxJFs8BRYSIXhB/0NGV ol1cRr00+20v1pQCuVT4wwaH2b2Y5EqLa8Hhvt/Hk920I0stEITA87cg7NcQKvBb TLu3G6KnjNK6QRKyEwOKCtv4Vm5nKeXl69gwD5xZePFTZMzu68pTuvfYd3DnGByp XwUY8nm76+5gTW1w/GidwFe2Mt+WfErURyMg4CMbBLyRSI9GquNCPhhB1O2VEy6Q a9o/UUg0XLRlfSW3KVOrQ7kjSq4kjUr4VOo9Rg3E6FeLTOt0I3fRNndG5q7y/8Ic SIPlZg4e4c94b0MSylQZmGMqSGWUMg7IeYPS92bNXfAWOBxi3faGTnk/QArARgtP 5yy0xk/dYd3N8SaYmZpmr8mC8GD+OC0EXL0ZEay/lGznIS6N4S/9z9fDPFT18nkP G9NFTuu1R1k27uDcvFt5YGj+muUhMHmKsJGVnsAe+SpSmBi3f+g= =fCAL -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--