;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
#: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)
#:use-module (gnu packages bash)
#:use-module (gnu packages bootloaders)
#:use-module (gnu packages certs)
+ #:use-module (gnu packages file-systems)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages guile)
#: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
mx6cuboxi-installation-os
nintendo-nes-classic-edition-installation-os
novena-installation-os
+ firefly-rk3399-installation-os
pine64-plus-installation-os
pinebook-installation-os
+ rock64-installation-os
+ rockpro64-installation-os
rk3399-puma-installation-os
wandboard-installation-os
os-with-u-boot))
;; usually not available at run time, hence this hack.
'(("de" . "Systeminstallation")
("en" . "System Installation")
- ("fr" . "Installation du système")))
+ ("es" . "Instalación del sistema")
+ ("fr" . "Installation du système")
+ ("ru" . "Установка системы")))
(define (log-to-info tty user)
"Return a script that spawns the Info reader on the right section of the
(define (/etc/configuration-files _)
"Return a list of tuples representing configuration templates to add to
/etc."
- (define (file f)
- (local-file (string-append "examples/" f)))
-
(define directory
(computed-file "configuration-templates"
(with-imported-modules '((guix build utils))
(copy-file file
(string-append #$output "/"
target)))
- '(#$(file "bare-bones.tmpl")
- #$(file "beaglebone-black.tmpl")
- #$(file "desktop.tmpl")
- #$(file "lightweight-desktop.tmpl"))
+ '(#$(local-file "examples/bare-bones.tmpl")
+ #$(local-file "examples/beaglebone-black.tmpl")
+ #$(local-file "examples/desktop.tmpl")
+ #$(local-file "examples/lightweight-desktop.tmpl"))
'("bare-bones.scm"
"beaglebone-black.scm"
"desktop.scm"
(persistent? #f)
(max-database-size (* 5 (expt 2 20)))))) ;5 MiB
+\f
+;; 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 the uvesafb kernel module.")
+ (provision '(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"))))
+ (respawn? #f)
+ (one-shot? #t))))
+
+(define uvesafb-service-type
+ (service-type
+ (name 'uvesafb)
+ (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 %installation-services
;; List of services of the installation system.
(let ((motd (plain-file "motd" "
;; The usual services.
(syslog-service)
- ;; The build daemon. Register the hydra.gnu.org key as trusted.
- ;; This allows the installation process to use substitutes by
+ ;; The build daemon. Register the default substitute server key(s)
+ ;; as trusted to allow the installation process to use substitutes by
;; default.
(service guix-service-type
(guix-configuration (authorize-key? #t)))
;; Having /bin/sh is a good idea. In particular it allows Tramp
;; connections to this system to work.
(service special-files-service-type
- `(("/bin/sh" ,(file-append (canonical-package bash)
- "/bin/sh"))))
+ `(("/bin/sh" ,(file-append bash "/bin/sh"))))
;; Loopback device, needed by OpenSSH notably.
(service static-networking-service-type
(list bare-bones-os
glibc-utf8-locales
texinfo
- (canonical-package guile-2.2))))))
+ guile-3.0))
+
+ ;; 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))))
(define %issue
;; Greeting.
(label (string-append "GNU Guix installation "
(package-version guix)))
+ ;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon
+ ;; non-functional:
+ ;; <https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00441.html>.
+ ;; Thus, blacklist it.
+ (kernel-arguments '("quiet" "modprobe.blacklist=radeon"))
+
(file-systems
;; Note: the disk image build code overrides this root file system with
;; the appropriate one.
;; Explicitly allow for empty passwords.
(base-pam-services #:allow-empty-passwords? #t))
- (packages (cons* (canonical-package glibc) ;for 'tzselect' & co.
+ (packages (cons* glibc ;for 'tzselect' & co.
parted gptfdisk ddrescue
fontconfig
font-dejavu font-gnu-unifont
mdadm
dosfstools ;mkfs.fat, for the UEFI boot partition
btrfs-progs
+ jfsutils
openssh ;we already have sshd, having ssh/scp can help
wireless-tools iw wpa-supplicant-minimal iproute
;; XXX: We used to have GNU fdisk here, but as of version
"/dev/mmcblk1" ; eMMC storage
"ttyS0"))
+(define firefly-rk3399-installation-os
+ (embedded-installation-os u-boot-firefly-rk3399-bootloader
+ "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
+ "ttyS2")) ; UART2 connected on the Pi2 bus
+
(define mx6cuboxi-installation-os
(embedded-installation-os u-boot-mx6cuboxi-bootloader
"/dev/mmcblk0" ; SD card storage
"/dev/mmcblk0" ; SD card storage
"ttyS0"))
+(define rock64-installation-os
+ (embedded-installation-os u-boot-rock64-rk3328-bootloader
+ "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
+ "ttyS2")) ; UART2 connected on the Pi2 bus
+
+(define rockpro64-installation-os
+ (embedded-installation-os u-boot-rockpro64-rk3399-bootloader
+ "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
+ "ttyS2")) ; UART2 connected on the Pi2 bus
+
(define rk3399-puma-installation-os
(embedded-installation-os u-boot-puma-rk3399-bootloader
"/dev/mmcblk0" ; SD card storage