install.scm 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014-2022 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
  5. ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
  6. ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  7. ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
  8. ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
  9. ;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu system install)
  26. #:use-module (gnu)
  27. #:use-module (gnu system)
  28. #:use-module (gnu system setuid)
  29. #:use-module (gnu bootloader u-boot)
  30. #:use-module (guix gexp)
  31. #:use-module (guix store)
  32. #:use-module (guix monads)
  33. #:use-module (guix modules)
  34. #:use-module ((guix packages) #:select (package-version supported-package?))
  35. #:use-module (guix platform)
  36. #:use-module ((guix store) #:select (%store-prefix))
  37. #:use-module (guix utils)
  38. #:use-module (gnu installer)
  39. #:use-module (gnu system locale)
  40. #:use-module (gnu services avahi)
  41. #:use-module (gnu services dbus)
  42. #:use-module (gnu services networking)
  43. #:use-module (gnu services shepherd)
  44. #:use-module (gnu services ssh)
  45. #:use-module (gnu packages admin)
  46. #:use-module (gnu packages bash)
  47. #:use-module (gnu packages bootloaders)
  48. #:use-module (gnu packages certs)
  49. #:use-module (gnu packages compression)
  50. #:use-module (gnu packages fonts)
  51. #:use-module (gnu packages fontutils)
  52. #:use-module (gnu packages guile)
  53. #:use-module (gnu packages linux)
  54. #:use-module (gnu packages package-management)
  55. #:use-module (gnu packages texinfo)
  56. #:use-module (gnu packages xorg)
  57. #:use-module (ice-9 match)
  58. #:use-module (srfi srfi-26)
  59. #:export (installation-os
  60. a20-olinuxino-lime-installation-os
  61. a20-olinuxino-lime2-emmc-installation-os
  62. a20-olinuxino-micro-installation-os
  63. bananapi-m2-ultra-installation-os
  64. beaglebone-black-installation-os
  65. mx6cuboxi-installation-os
  66. nintendo-nes-classic-edition-installation-os
  67. novena-installation-os
  68. firefly-rk3399-installation-os
  69. pine64-plus-installation-os
  70. pinebook-installation-os
  71. rock64-installation-os
  72. rockpro64-installation-os
  73. rk3399-puma-installation-os
  74. wandboard-installation-os
  75. os-with-u-boot))
  76. ;;; Commentary:
  77. ;;;
  78. ;;; This module provides an 'operating-system' definition for use on images
  79. ;;; for USB sticks etc., for the installation of the GNU system.
  80. ;;;
  81. ;;; Code:
  82. ;;;
  83. ;;; Documentation service.
  84. ;;;
  85. (define %installation-node-names
  86. ;; Translated name of the "System Installation" node of the manual. Ideally
  87. ;; we'd extract it from the 'guix-manual' gettext domain, but that one is
  88. ;; usually not available at run time, hence this hack.
  89. '(("de" . "Systeminstallation")
  90. ("en" . "System Installation")
  91. ("es" . "Instalación del sistema")
  92. ("fr" . "Installation du système")
  93. ("ru" . "Установка системы")))
  94. (define (log-to-info tty user)
  95. "Return a script that spawns the Info reader on the right section of the
  96. manual."
  97. (program-file "log-to-info"
  98. #~(let* ((tty (open-file #$(string-append "/dev/" tty)
  99. "r0+"))
  100. (locale (cadr (command-line)))
  101. (language (string-take locale
  102. (string-index locale #\_)))
  103. (infodir "/run/current-system/profile/share/info")
  104. (per-lang (string-append infodir "/guix." language
  105. ".info.gz"))
  106. (file (if (file-exists? per-lang)
  107. per-lang
  108. (string-append infodir "/guix.info")))
  109. (node (or (assoc-ref '#$%installation-node-names
  110. language)
  111. "System Installation")))
  112. (redirect-port tty (current-output-port))
  113. (redirect-port tty (current-error-port))
  114. (redirect-port tty (current-input-port))
  115. (let ((pw (getpwnam #$user)))
  116. (setgid (passwd:gid pw))
  117. (setuid (passwd:uid pw)))
  118. ;; 'gunzip' is needed to decompress the doc.
  119. (setenv "PATH" (string-append #$gzip "/bin"))
  120. ;; Change this process' locale so that command-line
  121. ;; arguments to 'info' are properly encoded.
  122. (catch #t
  123. (lambda ()
  124. (setlocale LC_ALL locale)
  125. (setenv "LC_ALL" locale))
  126. (lambda _
  127. ;; Sometimes LOCALE itself is not available. In that
  128. ;; case pick the one UTF-8 locale that's known to work
  129. ;; instead of failing.
  130. (setlocale LC_ALL "en_US.utf8")
  131. (setenv "LC_ALL" "en_US.utf8")))
  132. (execl #$(file-append info-reader "/bin/info")
  133. "info" "-d" infodir "-f" file "-n" node))))
  134. (define (documentation-shepherd-service tty)
  135. (list (shepherd-service
  136. (provision (list (symbol-append 'term- (string->symbol tty))))
  137. (requirement '(user-processes host-name udev virtual-terminal))
  138. (start #~(lambda* (#:optional (locale "en_US.utf8"))
  139. (fork+exec-command
  140. (list #$(log-to-info tty "documentation") locale)
  141. #:environment-variables
  142. `("GUIX_LOCPATH=/run/current-system/locale"
  143. "TERM=linux"))))
  144. (stop #~(make-kill-destructor)))))
  145. (define %documentation-users
  146. ;; User account for the Info viewer.
  147. (list (user-account (name "documentation")
  148. (system? #t)
  149. (group "nogroup")
  150. (home-directory "/var/empty"))))
  151. (define documentation-service-type
  152. ;; Documentation viewer service.
  153. (service-type (name 'documentation)
  154. (extensions
  155. (list (service-extension shepherd-root-service-type
  156. documentation-shepherd-service)
  157. (service-extension account-service-type
  158. (const %documentation-users))))
  159. (description "Run the Info reader on a tty.")))
  160. (define %backing-directory
  161. ;; Sub-directory used as the backing store for copy-on-write.
  162. "/tmp/guix-inst")
  163. (define cow-store-service-type
  164. (shepherd-service-type
  165. 'cow-store
  166. (lambda _
  167. (define (import-module? module)
  168. ;; Since we don't use deduplication support in 'populate-store', don't
  169. ;; import (guix store deduplication) and its dependencies, which
  170. ;; includes Guile-Gcrypt.
  171. (and (guix-module-name? module)
  172. (not (equal? module '(guix store deduplication)))))
  173. (shepherd-service
  174. (requirement '(root-file-system user-processes))
  175. (provision '(cow-store))
  176. (documentation
  177. "Make the store copy-on-write, with writes going to \
  178. the given target.")
  179. ;; This is meant to be explicitly started by the user.
  180. (auto-start? #f)
  181. (modules `((gnu build install)
  182. ,@%default-modules))
  183. (start
  184. (with-imported-modules (source-module-closure
  185. '((gnu build install))
  186. #:select? import-module?)
  187. #~(case-lambda
  188. ((target)
  189. (mount-cow-store target #$%backing-directory)
  190. target)
  191. (else
  192. ;; Do nothing, and mark the service as stopped.
  193. #f))))
  194. (stop #~(lambda (target)
  195. ;; Delete the temporary directory, but leave everything
  196. ;; mounted as there may still be processes using it since
  197. ;; 'user-processes' doesn't depend on us. The 'user-file-systems'
  198. ;; service will unmount TARGET eventually.
  199. (delete-file-recursively
  200. (string-append target #$%backing-directory))))))
  201. (description "Make the store copy-on-write, with writes going to \
  202. the given target.")))
  203. (define (cow-store-service)
  204. "Return a service that makes the store copy-on-write, such that writes go to
  205. the user's target storage device rather than on the RAM disk."
  206. ;; See <http://bugs.gnu.org/18061> for the initial report.
  207. (service cow-store-service-type 'mooooh!))
  208. (define (/etc/configuration-files _)
  209. "Return a list of tuples representing configuration templates to add to
  210. /etc."
  211. (define directory
  212. (computed-file "configuration-templates"
  213. (with-imported-modules '((guix build utils))
  214. #~(begin
  215. (mkdir #$output)
  216. (for-each (lambda (file target)
  217. (copy-file file
  218. (string-append #$output "/"
  219. target)))
  220. '(#$(local-file "examples/bare-bones.tmpl")
  221. #$(local-file "examples/beaglebone-black.tmpl")
  222. #$(local-file "examples/desktop.tmpl")
  223. #$(local-file "examples/lightweight-desktop.tmpl"))
  224. '("bare-bones.scm"
  225. "beaglebone-black.scm"
  226. "desktop.scm"
  227. "lightweight-desktop.scm"))
  228. #t))))
  229. `(("configuration" ,directory)))
  230. (define configuration-template-service-type
  231. (service-type (name 'configuration-template)
  232. (extensions
  233. (list (service-extension etc-service-type
  234. /etc/configuration-files)))
  235. (description "Install the operating system configuration file
  236. templates under @file{/etc/configuration}.")))
  237. (define %configuration-template-service
  238. (service configuration-template-service-type #t))
  239. (define %nscd-minimal-caches
  240. ;; Minimal in-memory caching policy for nscd.
  241. (list (nscd-cache (database 'hosts)
  242. (positive-time-to-live (* 3600 12))
  243. ;; Do not cache lookup failures at all since they are
  244. ;; quite likely (for instance when someone tries to ping a
  245. ;; host before networking is functional.)
  246. (negative-time-to-live 0)
  247. (persistent? #f)
  248. (max-database-size (* 5 (expt 2 20)))))) ;5 MiB
  249. ;; These define a service to load the uvesafb kernel module with the
  250. ;; appropriate options. The GUI installer needs it when the machine does not
  251. ;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0.
  252. (define (uvesafb-shepherd-service _)
  253. (list (shepherd-service
  254. (documentation "Load the uvesafb kernel module if needed.")
  255. (provision '(maybe-uvesafb))
  256. (requirement '(file-systems))
  257. (start #~(lambda ()
  258. (or (file-exists? "/dev/fb0")
  259. (invoke #+(file-append kmod "/bin/modprobe")
  260. "uvesafb"
  261. (string-append "v86d=" #$v86d "/sbin/v86d")
  262. "mode_option=1024x768"))))
  263. (respawn? #f)
  264. (one-shot? #t))))
  265. (define uvesafb-service-type
  266. (service-type
  267. (name 'uvesafb)
  268. (extensions
  269. (list (service-extension shepherd-root-service-type
  270. uvesafb-shepherd-service)))
  271. (description
  272. "Load the @code{uvesafb} kernel module with the right options.")
  273. (default-value #t)))
  274. (define* (%installation-services #:key (system (or (and=>
  275. (%current-target-system)
  276. platform-target->system)
  277. (%current-system))))
  278. ;; List of services of the installation system.
  279. (let ((motd (plain-file "motd" "
  280. \x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
  281. \x1b[2m\
  282. Using this shell, you can carry out the installation process \"manually.\"
  283. Access documentation at any time by pressing Alt-F2.\x1b[0m
  284. ")))
  285. (define (normal-tty tty)
  286. (mingetty-service (mingetty-configuration (tty tty)
  287. (auto-login "root")
  288. (login-pause? #t))))
  289. (define bare-bones-os
  290. (load "examples/bare-bones.tmpl"))
  291. (append
  292. ;; Generic services
  293. (list (service virtual-terminal-service-type)
  294. (service kmscon-service-type
  295. (kmscon-configuration
  296. (virtual-terminal "tty1")
  297. (login-program (installer-program))))
  298. (login-service (login-configuration
  299. (motd motd)))
  300. ;; Documentation. The manual is in UTF-8, but
  301. ;; 'console-font-service' sets up Unicode support and loads a font
  302. ;; with all the useful glyphs like em dash and quotation marks.
  303. (service documentation-service-type "tty2")
  304. ;; Documentation add-on.
  305. %configuration-template-service
  306. ;; A bunch of 'root' ttys.
  307. (normal-tty "tty3")
  308. (normal-tty "tty4")
  309. (normal-tty "tty5")
  310. (normal-tty "tty6")
  311. ;; The usual services.
  312. (syslog-service)
  313. ;; Use the Avahi daemon to discover substitute servers on the local
  314. ;; network. It can be faster than fetching from remote servers.
  315. (service avahi-service-type)
  316. ;; The build daemon.
  317. (service guix-service-type
  318. (guix-configuration
  319. ;; Register the default substitute server key(s) as
  320. ;; trusted to allow the installation process to use
  321. ;; substitutes by default.
  322. (authorize-key? #t)
  323. ;; Install and run the current Guix rather than an older
  324. ;; snapshot.
  325. (guix (current-guix))))
  326. ;; Start udev so that useful device nodes are available.
  327. ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for
  328. ;; regulations-compliant WiFi access.
  329. (udev-service #:rules (list lvm2 crda))
  330. ;; Add the 'cow-store' service, which users have to start manually
  331. ;; since it takes the installation directory as an argument.
  332. (cow-store-service)
  333. ;; Install Unicode support and a suitable font.
  334. (service console-font-service-type
  335. (map (match-lambda
  336. ("tty2"
  337. ;; Use a font that contains characters such as
  338. ;; curly quotes as found in the manual.
  339. '("tty2" . "LatGrkCyr-8x16"))
  340. (tty
  341. ;; Use a font that doesn't have more than 256
  342. ;; glyphs so that we can use colors with varying
  343. ;; brightness levels (see note in setfont(8)).
  344. `(,tty . "lat9u-16")))
  345. '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
  346. ;; To facilitate copy/paste.
  347. (service gpm-service-type)
  348. ;; Add an SSH server to facilitate remote installs.
  349. (service openssh-service-type
  350. (openssh-configuration
  351. (port-number 22)
  352. (permit-root-login #t)
  353. ;; The root account is passwordless, so make sure
  354. ;; a password is set before allowing logins.
  355. (allow-empty-passwords? #f)
  356. (password-authentication? #t)
  357. ;; Don't start it upfront.
  358. (%auto-start? #f)))
  359. ;; Since this is running on a USB stick with a overlayfs as the root
  360. ;; file system, use an appropriate cache configuration.
  361. (nscd-service (nscd-configuration
  362. (caches %nscd-minimal-caches)))
  363. ;; Having /bin/sh is a good idea. In particular it allows Tramp
  364. ;; connections to this system to work.
  365. (service special-files-service-type
  366. `(("/bin/sh" ,(file-append bash "/bin/sh"))))
  367. ;; Loopback device, needed by OpenSSH notably.
  368. (service static-networking-service-type
  369. (list %loopback-static-networking))
  370. (service wpa-supplicant-service-type)
  371. (dbus-service)
  372. (service connman-service-type
  373. (connman-configuration
  374. (disable-vpn? #t)))
  375. ;; Keep a reference to BARE-BONES-OS to make sure it can be
  376. ;; installed without downloading/building anything. Also keep the
  377. ;; things needed by 'profile-derivation' to minimize the amount of
  378. ;; download.
  379. (service gc-root-service-type
  380. (append
  381. (list bare-bones-os
  382. glibc-utf8-locales
  383. texinfo
  384. guile-3.0)
  385. %default-locale-libcs)))
  386. ;; Specific system services
  387. ;; Machines without Kernel Mode Setting (those with many old and
  388. ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
  389. ;; installer. Some may also need a kernel parameter like nomodeset
  390. ;; or vga=793, but we leave that for the user to specify in GRUB.
  391. `(,@(if (supported-package? v86d system)
  392. (list (service uvesafb-service-type))
  393. '())))))
  394. (define %issue
  395. ;; Greeting.
  396. "
  397. \x1b[1;37mThis is an installation image of the GNU system. Welcome.\x1b[0m
  398. \x1b[1;33mUse Alt-F2 for documentation.\x1b[0m
  399. ")
  400. (define installation-os
  401. ;; The operating system used on installation images for USB sticks etc.
  402. (operating-system
  403. (host-name "gnu")
  404. (timezone "Europe/Paris")
  405. (locale "en_US.utf8")
  406. (name-service-switch %mdns-host-lookup-nss)
  407. (bootloader (bootloader-configuration
  408. (bootloader grub-bootloader)
  409. (targets '("/dev/sda"))))
  410. (label (string-append "GNU Guix installation "
  411. (or (getenv "GUIX_DISPLAYED_VERSION")
  412. (package-version guix))))
  413. ;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon
  414. ;; non-functional:
  415. ;; <https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00441.html>.
  416. ;; Thus, blacklist it.
  417. (kernel-arguments '("quiet" "modprobe.blacklist=radeon,amdgpu"))
  418. (file-systems
  419. ;; Note: the disk image build code overrides this root file system with
  420. ;; the appropriate one.
  421. (cons* (file-system
  422. (mount-point "/")
  423. (device (file-system-label "Guix_image"))
  424. (type "ext4"))
  425. ;; Make /tmp a tmpfs instead of keeping the overlayfs. This
  426. ;; originally was used for unionfs because FUSE creates
  427. ;; '.fuse_hiddenXYZ' files for each open file, and this confuses
  428. ;; Guix's test suite, for instance (see
  429. ;; <http://bugs.gnu.org/23056>). We keep this for overlayfs to be
  430. ;; on the safe side.
  431. (file-system
  432. (mount-point "/tmp")
  433. (device "none")
  434. (type "tmpfs")
  435. (check? #f))
  436. ;; XXX: This should be %BASE-FILE-SYSTEMS but we don't need
  437. ;; elogind's cgroup file systems.
  438. (list %pseudo-terminal-file-system
  439. %shared-memory-file-system
  440. %efivars-file-system
  441. %immutable-store)))
  442. (users (list (user-account
  443. (name "guest")
  444. (group "users")
  445. (supplementary-groups '("wheel")) ; allow use of sudo
  446. (password "")
  447. (comment "Guest of GNU"))))
  448. (issue %issue)
  449. (services (%installation-services))
  450. ;; We don't need setuid programs, except for 'passwd', which can be handy
  451. ;; if one is to allow remote SSH login to the machine being installed.
  452. (setuid-programs (list (setuid-program
  453. (program (file-append shadow "/bin/passwd")))))
  454. (pam-services
  455. ;; Explicitly allow for empty passwords.
  456. (base-pam-services #:allow-empty-passwords? #t))
  457. (packages (append
  458. (list glibc ; for 'tzselect' & co.
  459. fontconfig
  460. font-dejavu font-gnu-unifont
  461. grub ; mostly so xrefs to its manual work
  462. nss-certs) ; To access HTTPS, use git, etc.
  463. %base-packages-disk-utilities
  464. %base-packages))))
  465. (define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
  466. (triplet "arm-linux-gnueabihf"))
  467. "Given OS, amend it with the u-boot bootloader for BOARD,
  468. installed to BOOTLOADER-TARGET (a drive), compiled for TRIPLET.
  469. If you want a serial console, make sure to specify one in your
  470. operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
  471. (operating-system (inherit os)
  472. (bootloader (bootloader-configuration
  473. (bootloader (bootloader (inherit u-boot-bootloader)
  474. (package (make-u-boot-package board triplet))))
  475. (targets (list bootloader-target))))))
  476. (define* (embedded-installation-os bootloader bootloader-target tty
  477. #:key (extra-modules '()))
  478. "Return an installation os for embedded systems.
  479. The initrd gets the extra modules EXTRA-MODULES.
  480. A getty is provided on TTY.
  481. The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
  482. (operating-system
  483. (inherit installation-os)
  484. (bootloader (bootloader-configuration
  485. (bootloader bootloader)
  486. (targets (list bootloader-target))))
  487. (kernel linux-libre)
  488. (kernel-arguments
  489. (cons (string-append "console=" tty)
  490. (operating-system-user-kernel-arguments installation-os)))
  491. (initrd-modules (append extra-modules %base-initrd-modules))))
  492. (define beaglebone-black-installation-os
  493. (embedded-installation-os u-boot-beaglebone-black-bootloader
  494. "/dev/sda"
  495. "ttyO0"
  496. #:extra-modules
  497. ;; This module is required to mount the sd card.
  498. '("omap_hsmmc")))
  499. (define a20-olinuxino-lime-installation-os
  500. (embedded-installation-os u-boot-a20-olinuxino-lime-bootloader
  501. "/dev/mmcblk0" ; SD card storage
  502. "ttyS0"))
  503. (define a20-olinuxino-lime2-emmc-installation-os
  504. (embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
  505. "/dev/mmcblk1" ; eMMC storage
  506. "ttyS0"))
  507. (define a20-olinuxino-micro-installation-os
  508. (embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
  509. "/dev/mmcblk0" ; SD card storage
  510. "ttyS0"))
  511. (define bananapi-m2-ultra-installation-os
  512. (embedded-installation-os u-boot-bananapi-m2-ultra-bootloader
  513. "/dev/mmcblk1" ; eMMC storage
  514. "ttyS0"))
  515. (define firefly-rk3399-installation-os
  516. (embedded-installation-os u-boot-firefly-rk3399-bootloader
  517. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  518. "ttyS2")) ; UART2 connected on the Pi2 bus
  519. (define mx6cuboxi-installation-os
  520. (embedded-installation-os u-boot-mx6cuboxi-bootloader
  521. "/dev/mmcblk0" ; SD card storage
  522. "ttymxc0"))
  523. (define novena-installation-os
  524. (embedded-installation-os u-boot-novena-bootloader
  525. "/dev/mmcblk1" ; SD card storage
  526. "ttymxc1"))
  527. (define nintendo-nes-classic-edition-installation-os
  528. (embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
  529. "/dev/mmcblk0" ; SD card (solder it yourself)
  530. "ttyS0"))
  531. (define pine64-plus-installation-os
  532. (embedded-installation-os u-boot-pine64-plus-bootloader
  533. "/dev/mmcblk0" ; SD card storage
  534. "ttyS0"))
  535. (define pinebook-installation-os
  536. (embedded-installation-os u-boot-pinebook-bootloader
  537. "/dev/mmcblk0" ; SD card storage
  538. "ttyS0"))
  539. (define rock64-installation-os
  540. (embedded-installation-os u-boot-rock64-rk3328-bootloader
  541. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  542. "ttyS2")) ; UART2 connected on the Pi2 bus
  543. (define rockpro64-installation-os
  544. (embedded-installation-os u-boot-rockpro64-rk3399-bootloader
  545. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  546. "ttyS2")) ; UART2 connected on the Pi2 bus
  547. (define rk3399-puma-installation-os
  548. (embedded-installation-os u-boot-puma-rk3399-bootloader
  549. "/dev/mmcblk0" ; SD card storage
  550. "ttyS0"))
  551. (define wandboard-installation-os
  552. (embedded-installation-os u-boot-wandboard-bootloader
  553. "/dev/mmcblk0" ; SD card storage
  554. "ttymxc0"))
  555. ;; Return the default os here so 'guix system' can consume it directly.
  556. installation-os
  557. ;;; install.scm ends here