From 29d6ce59a0f3953de627d110adaa7978051ca077 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 29 Dec 2021 23:01:11 +0100 Subject: [PATCH] install: Add uvesafb service only on x86. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/system/install.scm (%installation-services): Turn into… (installation-services): …this procedure. Adjust sole user. Add the uvesafb-service-type only when targetting x86. --- gnu/system/install.scm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 073d7df1db..36c24992bd 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Marius Bakke -;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Efraim Flashner ;;; @@ -33,6 +33,7 @@ (define-module (gnu system install) #:use-module (guix modules) #:use-module ((guix packages) #:select (package-version)) #:use-module ((guix store) #:select (%store-prefix)) + #:use-module (guix utils) #:use-module (gnu installer) #:use-module (gnu system locale) #:use-module (gnu services avahi) @@ -303,7 +304,7 @@ (define uvesafb-service-type "Load the @code{uvesafb} kernel module with the right options.") (default-value #t))) -(define %installation-services +(define (installation-services) ;; List of services of the installation system. (let ((motd (plain-file "motd" " \x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m @@ -320,7 +321,9 @@ (define (normal-tty tty) (define bare-bones-os (load "examples/bare-bones.tmpl")) - (list (service virtual-terminal-service-type) + (append + (list + (service virtual-terminal-service-type) (service kmscon-service-type (kmscon-configuration @@ -426,13 +429,15 @@ (define bare-bones-os glibc-utf8-locales texinfo guile-3.0) - %default-locale-libcs)) + %default-locale-libcs))) - ;; 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 - ;; or vga=793, but we leave that for the user to specify in GRUB. - (service uvesafb-service-type)))) + (if (or (target-x86-32?) (target-x86-64?)) + ;; x86 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 + ;; or vga=793, but we leave that for the user to specify in GRUB. + (list (service uvesafb-service-type)) + '())))) (define %issue ;; Greeting. @@ -496,7 +501,7 @@ (define installation-os (comment "Guest of GNU")))) (issue %issue) - (services %installation-services) + (services (installation-services)) ;; We don't need setuid programs, except for 'passwd', which can be handy ;; if one is to allow remote SSH login to the machine being installed. -- 2.34.0