install.scm 26 KB

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