install.scm 26 KB

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