aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-01-20 21:01:58 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2018-01-20 22:50:55 +0100
commit8bac66deabb8858bfa9ac29eaf31d68ae86fd0df (patch)
treea6478322f946744faeba352a0828de6a72a87c64 /gnu/system
parenta7bb327e3c457cd99710c92b5d09f76b7ab45000 (diff)
downloadguix-8bac66deabb8858bfa9ac29eaf31d68ae86fd0df.tar
guix-8bac66deabb8858bfa9ac29eaf31d68ae86fd0df.tar.gz
system: Factor out agetty-default-service.
* gnu/system/install.scm (agetty-default-service): New variable. (beaglebone-black-installation-os): Use it. (a20-olinuxino-lime2-emmc-installation-os): Use it. (a20-olinuxino-micro-installation-os): Use it. (banana-pi-m2-ultra-installation-os): Use it.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/install.scm50
1 files changed, 16 insertions, 34 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 56b6a99da7..714e8cac3f 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -379,6 +379,14 @@ You have been warned. Thanks for being so brave.\x1b[0m
nvi ;:wq!
%base-packages))))
+(define* (agetty-default-service #:optional (tty "ttyS0"))
+ "Return an agetty-service on the given TTY"
+ (agetty-service (agetty-configuration
+ (extra-options '("-L"))
+ (baud-rate "115200")
+ (term "vt100")
+ (tty tty))))
+
(define beaglebone-black-installation-os
(operating-system
(inherit installation-os)
@@ -391,16 +399,8 @@ You have been warned. Thanks for being so brave.\x1b[0m
;; This module is required to mount the sd card.
#:extra-modules (list "omap_hsmmc")
rest)))
- (services (append
- ;; mingetty does not work on serial lines.
- ;; Use agetty with board-specific serial parameters.
- (list (agetty-service
- (agetty-configuration
- (extra-options '("-L"))
- (baud-rate "115200")
- (term "vt100")
- (tty "ttyO0"))))
- (operating-system-user-services installation-os)))))
+ (services (cons* (agetty-default-service "ttyO0")
+ (operating-system-user-services installation-os)))))
(define a20-olinuxino-lime2-emmc-installation-os
(operating-system
@@ -409,14 +409,8 @@ You have been warned. Thanks for being so brave.\x1b[0m
(bootloader u-boot-a20-olinuxino-lime2-bootloader)
(target "/dev/mmcblk1"))) ; eMMC storage
(kernel linux-libre)
- (services (append
- (list (agetty-service
- (agetty-configuration
- (extra-options '("-L"))
- (baud-rate "115200")
- (term "vt100")
- (tty "ttyS0"))))
- (operating-system-user-services installation-os)))))
+ (services (cons* (agetty-default-service "ttyS0")
+ (operating-system-user-services installation-os)))))
(define a20-olinuxino-micro-installation-os
(operating-system
@@ -425,14 +419,8 @@ You have been warned. Thanks for being so brave.\x1b[0m
(bootloader u-boot-a20-olinuxino-lime2-bootloader)
(target "/dev/mmcblk0"))) ; SD card storage
(kernel linux-libre)
- (services (append
- (list (agetty-service
- (agetty-configuration
- (extra-options '("-L"))
- (baud-rate "115200")
- (term "vt100")
- (tty "ttyS0"))))
- (operating-system-user-services installation-os)))))
+ (services (cons* (agetty-default-service "ttyS0")
+ (operating-system-user-services installation-os)))))
(define banana-pi-m2-ultra-installation-os
(operating-system
@@ -441,14 +429,8 @@ You have been warned. Thanks for being so brave.\x1b[0m
(bootloader u-boot-banana-pi-m2-ultra-bootloader)
(target "/dev/mmcblk1"))) ; eMMC storage
(kernel linux-libre)
- (services (append
- (list (agetty-service
- (agetty-configuration
- (extra-options '("-L"))
- (baud-rate "115200")
- (term "vt100")
- (tty "ttyS0"))))
- (operating-system-user-services installation-os)))))
+ (services (cons* (agetty-default-service "ttyS0")
+ (operating-system-user-services installation-os)))))
;; Return the default os here so 'guix system' can consume it directly.
installation-os