install.scm 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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 %loopback-static-networking))
  359. (service wpa-supplicant-service-type)
  360. (dbus-service)
  361. (service connman-service-type
  362. (connman-configuration
  363. (disable-vpn? #t)))
  364. ;; Keep a reference to BARE-BONES-OS to make sure it can be
  365. ;; installed without downloading/building anything. Also keep the
  366. ;; things needed by 'profile-derivation' to minimize the amount of
  367. ;; download.
  368. (service gc-root-service-type
  369. (append
  370. (list bare-bones-os
  371. glibc-utf8-locales
  372. texinfo
  373. guile-3.0)
  374. %default-locale-libcs))
  375. ;; Machines without Kernel Mode Setting (those with many old and
  376. ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI
  377. ;; installer. Some may also need a kernel parameter like nomodeset
  378. ;; or vga=793, but we leave that for the user to specify in GRUB.
  379. (service uvesafb-service-type))))
  380. (define %issue
  381. ;; Greeting.
  382. "
  383. \x1b[1;37mThis is an installation image of the GNU system. Welcome.\x1b[0m
  384. \x1b[1;33mUse Alt-F2 for documentation.\x1b[0m
  385. ")
  386. (define installation-os
  387. ;; The operating system used on installation images for USB sticks etc.
  388. (operating-system
  389. (host-name "gnu")
  390. (timezone "Europe/Paris")
  391. (locale "en_US.utf8")
  392. (name-service-switch %mdns-host-lookup-nss)
  393. (bootloader (bootloader-configuration
  394. (bootloader grub-bootloader)
  395. (targets '("/dev/sda"))))
  396. (label (string-append "GNU Guix installation "
  397. (package-version guix)))
  398. ;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon
  399. ;; non-functional:
  400. ;; <https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00441.html>.
  401. ;; Thus, blacklist it.
  402. (kernel-arguments '("quiet" "modprobe.blacklist=radeon"))
  403. (file-systems
  404. ;; Note: the disk image build code overrides this root file system with
  405. ;; the appropriate one.
  406. (cons* (file-system
  407. (mount-point "/")
  408. (device (file-system-label "Guix_image"))
  409. (type "ext4"))
  410. ;; Make /tmp a tmpfs instead of keeping the overlayfs. This
  411. ;; originally was used for unionfs because FUSE creates
  412. ;; '.fuse_hiddenXYZ' files for each open file, and this confuses
  413. ;; Guix's test suite, for instance (see
  414. ;; <http://bugs.gnu.org/23056>). We keep this for overlayfs to be
  415. ;; on the safe side.
  416. (file-system
  417. (mount-point "/tmp")
  418. (device "none")
  419. (type "tmpfs")
  420. (check? #f))
  421. ;; XXX: This should be %BASE-FILE-SYSTEMS but we don't need
  422. ;; elogind's cgroup file systems.
  423. (list %pseudo-terminal-file-system
  424. %shared-memory-file-system
  425. %efivars-file-system
  426. %immutable-store)))
  427. (users (list (user-account
  428. (name "guest")
  429. (group "users")
  430. (supplementary-groups '("wheel")) ; allow use of sudo
  431. (password "")
  432. (comment "Guest of GNU"))))
  433. (issue %issue)
  434. (services %installation-services)
  435. ;; We don't need setuid programs, except for 'passwd', which can be handy
  436. ;; if one is to allow remote SSH login to the machine being installed.
  437. (setuid-programs (list (setuid-program
  438. (program (file-append shadow "/bin/passwd")))))
  439. (pam-services
  440. ;; Explicitly allow for empty passwords.
  441. (base-pam-services #:allow-empty-passwords? #t))
  442. (packages (append
  443. (list glibc ; for 'tzselect' & co.
  444. fontconfig
  445. font-dejavu font-gnu-unifont
  446. grub ; mostly so xrefs to its manual work
  447. nss-certs) ; To access HTTPS, use git, etc.
  448. %base-packages-disk-utilities
  449. %base-packages))))
  450. (define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
  451. (triplet "arm-linux-gnueabihf"))
  452. "Given OS, amend it with the u-boot bootloader for BOARD,
  453. installed to BOOTLOADER-TARGET (a drive), compiled for TRIPLET.
  454. If you want a serial console, make sure to specify one in your
  455. operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
  456. (operating-system (inherit os)
  457. (bootloader (bootloader-configuration
  458. (bootloader (bootloader (inherit u-boot-bootloader)
  459. (package (make-u-boot-package board triplet))))
  460. (targets (list bootloader-target))))))
  461. (define* (embedded-installation-os bootloader bootloader-target tty
  462. #:key (extra-modules '()))
  463. "Return an installation os for embedded systems.
  464. The initrd gets the extra modules EXTRA-MODULES.
  465. A getty is provided on TTY.
  466. The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
  467. (operating-system
  468. (inherit installation-os)
  469. (bootloader (bootloader-configuration
  470. (bootloader bootloader)
  471. (targets (list bootloader-target))))
  472. (kernel linux-libre)
  473. (kernel-arguments
  474. (cons (string-append "console=" tty)
  475. (operating-system-user-kernel-arguments installation-os)))
  476. (initrd-modules (append extra-modules %base-initrd-modules))))
  477. (define beaglebone-black-installation-os
  478. (embedded-installation-os u-boot-beaglebone-black-bootloader
  479. "/dev/sda"
  480. "ttyO0"
  481. #:extra-modules
  482. ;; This module is required to mount the sd card.
  483. '("omap_hsmmc")))
  484. (define a20-olinuxino-lime-installation-os
  485. (embedded-installation-os u-boot-a20-olinuxino-lime-bootloader
  486. "/dev/mmcblk0" ; SD card storage
  487. "ttyS0"))
  488. (define a20-olinuxino-lime2-emmc-installation-os
  489. (embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
  490. "/dev/mmcblk1" ; eMMC storage
  491. "ttyS0"))
  492. (define a20-olinuxino-micro-installation-os
  493. (embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
  494. "/dev/mmcblk0" ; SD card storage
  495. "ttyS0"))
  496. (define bananapi-m2-ultra-installation-os
  497. (embedded-installation-os u-boot-bananapi-m2-ultra-bootloader
  498. "/dev/mmcblk1" ; eMMC storage
  499. "ttyS0"))
  500. (define firefly-rk3399-installation-os
  501. (embedded-installation-os u-boot-firefly-rk3399-bootloader
  502. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  503. "ttyS2")) ; UART2 connected on the Pi2 bus
  504. (define mx6cuboxi-installation-os
  505. (embedded-installation-os u-boot-mx6cuboxi-bootloader
  506. "/dev/mmcblk0" ; SD card storage
  507. "ttymxc0"))
  508. (define novena-installation-os
  509. (embedded-installation-os u-boot-novena-bootloader
  510. "/dev/mmcblk1" ; SD card storage
  511. "ttymxc1"))
  512. (define nintendo-nes-classic-edition-installation-os
  513. (embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
  514. "/dev/mmcblk0" ; SD card (solder it yourself)
  515. "ttyS0"))
  516. (define pine64-plus-installation-os
  517. (embedded-installation-os u-boot-pine64-plus-bootloader
  518. "/dev/mmcblk0" ; SD card storage
  519. "ttyS0"))
  520. (define pinebook-installation-os
  521. (embedded-installation-os u-boot-pinebook-bootloader
  522. "/dev/mmcblk0" ; SD card storage
  523. "ttyS0"))
  524. (define rock64-installation-os
  525. (embedded-installation-os u-boot-rock64-rk3328-bootloader
  526. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  527. "ttyS2")) ; UART2 connected on the Pi2 bus
  528. (define rockpro64-installation-os
  529. (embedded-installation-os u-boot-rockpro64-rk3399-bootloader
  530. "/dev/mmcblk0" ; SD card/eMMC (SD priority) storage
  531. "ttyS2")) ; UART2 connected on the Pi2 bus
  532. (define rk3399-puma-installation-os
  533. (embedded-installation-os u-boot-puma-rk3399-bootloader
  534. "/dev/mmcblk0" ; SD card storage
  535. "ttyS0"))
  536. (define wandboard-installation-os
  537. (embedded-installation-os u-boot-wandboard-bootloader
  538. "/dev/mmcblk0" ; SD card storage
  539. "ttymxc0"))
  540. ;; Return the default os here so 'guix system' can consume it directly.
  541. installation-os
  542. ;;; install.scm ends here