system: Factor out embedded-installation-os.
* gnu/system/install.scm (embedded-installation-os): 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.
This commit is contained in:
parent
8bac66deab
commit
fccdc8c839
|
@ -387,50 +387,48 @@ You have been warned. Thanks for being so brave.\x1b[0m
|
||||||
(term "vt100")
|
(term "vt100")
|
||||||
(tty tty))))
|
(tty tty))))
|
||||||
|
|
||||||
(define beaglebone-black-installation-os
|
(define* (embedded-installation-os bootloader bootloader-target tty
|
||||||
|
#:key (extra-modules '()))
|
||||||
|
"Return an installation os for embedded systems.
|
||||||
|
The initrd gets the extra modules EXTRA-MODULES.
|
||||||
|
A getty is provided on TTY.
|
||||||
|
The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
|
||||||
(operating-system
|
(operating-system
|
||||||
(inherit installation-os)
|
(inherit installation-os)
|
||||||
(bootloader (bootloader-configuration
|
(bootloader (bootloader-configuration
|
||||||
(bootloader u-boot-beaglebone-black-bootloader)
|
(bootloader bootloader)
|
||||||
(target "/dev/sda")))
|
(target bootloader-target)))
|
||||||
(kernel linux-libre)
|
(kernel linux-libre)
|
||||||
(initrd (lambda (fs . rest)
|
(initrd (lambda (fs . rest)
|
||||||
(apply base-initrd fs
|
(apply base-initrd fs
|
||||||
;; This module is required to mount the sd card.
|
#:extra-modules extra-modules
|
||||||
#:extra-modules (list "omap_hsmmc")
|
|
||||||
rest)))
|
rest)))
|
||||||
(services (cons* (agetty-default-service "ttyO0")
|
(services (cons* (agetty-default-service tty)
|
||||||
(operating-system-user-services installation-os)))))
|
(operating-system-user-services installation-os)))))
|
||||||
|
|
||||||
|
(define beaglebone-black-installation-os
|
||||||
|
(embedded-installation-os u-boot-beaglebone-black-bootloader
|
||||||
|
"/dev/sda"
|
||||||
|
"ttyO0"
|
||||||
|
#:extra-modules
|
||||||
|
;; This module is required to mount the sd card.
|
||||||
|
'("omap_hsmmc")))
|
||||||
|
|
||||||
|
|
||||||
(define a20-olinuxino-lime2-emmc-installation-os
|
(define a20-olinuxino-lime2-emmc-installation-os
|
||||||
(operating-system
|
(embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
|
||||||
(inherit installation-os)
|
"/dev/mmcblk1" ; eMMC storage
|
||||||
(bootloader (bootloader-configuration
|
"ttyS0"))
|
||||||
(bootloader u-boot-a20-olinuxino-lime2-bootloader)
|
|
||||||
(target "/dev/mmcblk1"))) ; eMMC storage
|
|
||||||
(kernel linux-libre)
|
|
||||||
(services (cons* (agetty-default-service "ttyS0")
|
|
||||||
(operating-system-user-services installation-os)))))
|
|
||||||
|
|
||||||
(define a20-olinuxino-micro-installation-os
|
(define a20-olinuxino-micro-installation-os
|
||||||
(operating-system
|
(embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
|
||||||
(inherit installation-os)
|
"/dev/mmcblk0" ; SD card storage
|
||||||
(bootloader (bootloader-configuration
|
"ttyS0"))
|
||||||
(bootloader u-boot-a20-olinuxino-lime2-bootloader)
|
|
||||||
(target "/dev/mmcblk0"))) ; SD card storage
|
|
||||||
(kernel linux-libre)
|
|
||||||
(services (cons* (agetty-default-service "ttyS0")
|
|
||||||
(operating-system-user-services installation-os)))))
|
|
||||||
|
|
||||||
(define banana-pi-m2-ultra-installation-os
|
(define banana-pi-m2-ultra-installation-os
|
||||||
(operating-system
|
(embedded-installation-os u-boot-banana-pi-m2-ultra-bootloader
|
||||||
(inherit installation-os)
|
"/dev/mmcblk1" ; eMMC storage
|
||||||
(bootloader (bootloader-configuration
|
"ttyS0"))
|
||||||
(bootloader u-boot-banana-pi-m2-ultra-bootloader)
|
|
||||||
(target "/dev/mmcblk1"))) ; eMMC storage
|
|
||||||
(kernel linux-libre)
|
|
||||||
(services (cons* (agetty-default-service "ttyS0")
|
|
||||||
(operating-system-user-services installation-os)))))
|
|
||||||
|
|
||||||
;; Return the default os here so 'guix system' can consume it directly.
|
;; Return the default os here so 'guix system' can consume it directly.
|
||||||
installation-os
|
installation-os
|
||||||
|
|
Loading…
Reference in New Issue