Migrate to the new 'targets' field of bootloader-configuration.

The old 'target' field is deprecated; adjust the sources to use the new
'targets' one instead.

* doc/guix-cookbook.texi<target>: Replace by 'targets'.
* gnu/bootloader/grub.scm: Likewise.
* gnu/installer/parted.scm: Likewise.
* gnu/machine/digital-ocean.scm: Likewise.
* gnu/system/examples/asus-c201.tmpl: Likewise
* gnu/system/examples/bare-bones.tmpl: Likewise
* gnu/system/examples/bare-hurd.tmpl: Likewise
* gnu/system/examples/beaglebone-black.tmpl: Likewise
* gnu/system/examples/desktop.tmpl: Likewise
* gnu/system/examples/docker-image.tmpl: Likewise
* gnu/system/examples/lightweight-desktop.tmpl: Likewise
* gnu/system/examples/vm-image.tmpl: Likewise
* gnu/system/examples/yggdrasil.tmpl: Likewise
* gnu/system/hurd.scm: Likewise
* gnu/system/images/hurd.scm: Likewise
* gnu/system/images/novena.scm: Likewise
* gnu/system/images/pine64.scm: Likewise
* gnu/system/images/pinebook-pro.scm: Likewise
* gnu/system/images/rock64.scm: Likewise
* gnu/system/install.scm: Likewise
* gnu/system/vm.scm: Likewise
* gnu/tests.scm: Likewise
* gnu/tests/ganeti.scm: Likewise
* gnu/tests/install.scm: Likewise
* gnu/tests/nfs.scm: Likewise
* gnu/tests/telephony.scm: Likewise
* tests/boot-parameters.scm: Likewise
* tests/system.scm: Likewise
This commit is contained in:
Maxim Cournoyer 2021-08-07 15:07:47 -04:00
parent 2ca982ff41
commit da4e409483
No known key found for this signature in database
GPG key ID: 1260E46482E63562
28 changed files with 35 additions and 34 deletions

View file

@ -1718,7 +1718,7 @@ operating-system dedicated to the @b{Pine A64 LTS} board.
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-pine64-lts-bootloader) (bootloader u-boot-pine64-lts-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd-modules '()) (initrd-modules '())
(kernel linux-libre-arm64-generic) (kernel linux-libre-arm64-generic)
(file-systems (cons (file-system (file-systems (cons (file-system

View file

@ -647,11 +647,12 @@ (define (install-grub-efi-netboot subdir)
MOUNT-POINT is the last argument in 'guix system init /etc/config.scm mnt/point' MOUNT-POINT is the last argument in 'guix system init /etc/config.scm mnt/point'
or '/' for other 'guix system' commands. or '/' for other 'guix system' commands.
TARGET is the target argument given to the bootloader-configuration in Where TARGET comes from the targets argument given to the
bootloader-configuration in:
(operating-system (operating-system
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(target \"/boot\") (targets '(\"/boot\"))
)) ))
) )

View file

@ -1356,9 +1356,9 @@ (define (bootloader-configuration user-partitions)
`((bootloader-configuration `((bootloader-configuration
,@(if (efi-installation?) ,@(if (efi-installation?)
`((bootloader grub-efi-bootloader) `((bootloader grub-efi-bootloader)
(target ,(default-esp-mount-point))) (targets (list ,(default-esp-mount-point))))
`((bootloader grub-bootloader) `((bootloader grub-bootloader)
(target ,root-partition-disk))) (targets (list ,root-partition-disk))))
;; XXX: Assume we defined the 'keyboard-layout' field of ;; XXX: Assume we defined the 'keyboard-layout' field of
;; <operating-system> right above. ;; <operating-system> right above.

View file

@ -235,7 +235,7 @@ (define (guix-infect network)
(timezone \"Etc/UTC\") (timezone \"Etc/UTC\")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target \"/dev/vda\") (targets '(\"/dev/vda\"))
(terminal-outputs '(console)))) (terminal-outputs '(console))))
(file-systems (cons (file-system (file-systems (cons (file-system
(mount-point \"/\") (mount-point \"/\")

View file

@ -14,7 +14,7 @@
;; "my-root" is the label of the target root file system. ;; "my-root" is the label of the target root file system.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader depthcharge-bootloader) (bootloader depthcharge-bootloader)
(target "/dev/mmcblk0p1"))) (targets '("/dev/mmcblk0p1"))))
;; The ASUS C201PA requires a very particular kernel to boot, ;; The ASUS C201PA requires a very particular kernel to boot,
;; as well as the following arguments. ;; as well as the following arguments.

View file

@ -15,7 +15,7 @@
;; root file system. ;; root file system.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -32,7 +32,7 @@
(inherit %hurd-default-operating-system) (inherit %hurd-default-operating-system)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-minimal-bootloader) (bootloader grub-minimal-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -14,7 +14,7 @@
;; the label of the target root file system. ;; the label of the target root file system.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-beaglebone-black-bootloader) (bootloader u-boot-beaglebone-black-bootloader)
(target "/dev/mmcblk1"))) (targets '("/dev/mmcblk1"))))
;; This module is required to mount the SD card. ;; This module is required to mount the SD card.
(initrd-modules (cons "omap_hsmmc" %base-initrd-modules)) (initrd-modules (cons "omap_hsmmc" %base-initrd-modules))

View file

@ -19,7 +19,7 @@
;; Partition mounted on /boot/efi. ;; Partition mounted on /boot/efi.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-efi-bootloader) (bootloader grub-efi-bootloader)
(target "/boot/efi") (targets '("/boot/efi"))
(keyboard-layout keyboard-layout))) (keyboard-layout keyboard-layout)))
;; Specify a mapped device for the encrypted root partition. ;; Specify a mapped device for the encrypted root partition.

View file

@ -35,7 +35,7 @@
;; This will be ignored. ;; This will be ignored.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "does-not-matter"))) (targets '("does-not-matter"))))
;; This will be ignored, too. ;; This will be ignored, too.
(file-systems (list (file-system (file-systems (list (file-system
(device "does-not-matter") (device "does-not-matter")

View file

@ -16,7 +16,7 @@
;; Partition mounted on /boot/efi. ;; Partition mounted on /boot/efi.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-efi-bootloader) (bootloader grub-efi-bootloader)
(target "/boot/efi"))) (targets '("/boot/efi"))))
;; Assume the target root file system is labelled "my-root", ;; Assume the target root file system is labelled "my-root",
;; and the EFI System Partition has UUID 1234-ABCD. ;; and the EFI System Partition has UUID 1234-ABCD.

View file

@ -51,7 +51,7 @@ accounts.\x1b[0m
;; Adjust as needed. ;; Adjust as needed.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/vda") (targets '("/dev/vda"))
(terminal-outputs '(console)))) (terminal-outputs '(console))))
(file-systems (cons (file-system (file-systems (cons (file-system
(mount-point "/") (mount-point "/")

View file

@ -15,7 +15,7 @@
;; root file system. ;; root file system.
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -110,7 +110,7 @@ (define %hurd-default-operating-system
(hurd hurd) (hurd hurd)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-minimal-bootloader) (bootloader grub-minimal-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd #f) (initrd #f)
(initrd-modules (lambda _ '())) (initrd-modules (lambda _ '()))
(firmware '()) (firmware '())

View file

@ -42,7 +42,7 @@ (define hurd-barebones-os
(inherit %hurd-default-operating-system) (inherit %hurd-default-operating-system)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-minimal-bootloader) (bootloader grub-minimal-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -39,7 +39,7 @@ (define novena-barebones-os
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-novena-bootloader) (bootloader u-boot-novena-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev")) (initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev"))
;(kernel linux-libre-arm-generic) ;(kernel linux-libre-arm-generic)
(kernel-arguments '("console=ttymxc1,115200")) (kernel-arguments '("console=ttymxc1,115200"))

View file

@ -38,7 +38,7 @@ (define pine64-barebones-os
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-pine64-lts-bootloader) (bootloader u-boot-pine64-lts-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd-modules '()) (initrd-modules '())
(kernel linux-libre-arm64-generic) (kernel linux-libre-arm64-generic)
(file-systems (cons (file-system (file-systems (cons (file-system

View file

@ -38,7 +38,7 @@ (define pinebook-pro-barebones-os
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-pinebook-pro-rk3399-bootloader) (bootloader u-boot-pinebook-pro-rk3399-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd-modules '()) (initrd-modules '())
(kernel linux-libre-arm64-generic) (kernel linux-libre-arm64-generic)
(file-systems (cons (file-system (file-systems (cons (file-system

View file

@ -39,7 +39,7 @@ (define rock64-barebones-os
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader u-boot-rock64-rk3328-bootloader) (bootloader u-boot-rock64-rk3328-bootloader)
(target "/dev/sda"))) (targets '("/dev/sda"))))
(initrd-modules '()) (initrd-modules '())
(kernel linux-libre-arm64-generic) (kernel linux-libre-arm64-generic)
(file-systems (cons (file-system (file-systems (cons (file-system

View file

@ -454,7 +454,7 @@ (define installation-os
(name-service-switch %mdns-host-lookup-nss) (name-service-switch %mdns-host-lookup-nss)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sda"))) (targets '("/dev/sda"))))
(label (string-append "GNU Guix installation " (label (string-append "GNU Guix installation "
(package-version guix))) (package-version guix)))
@ -530,7 +530,7 @@ (define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader (bootloader (inherit u-boot-bootloader) (bootloader (bootloader (inherit u-boot-bootloader)
(package (make-u-boot-package board triplet)))) (package (make-u-boot-package board triplet))))
(target bootloader-target))))) (targets (list bootloader-target))))))
(define* (embedded-installation-os bootloader bootloader-target tty (define* (embedded-installation-os bootloader bootloader-target tty
#:key (extra-modules '())) #:key (extra-modules '()))
@ -542,7 +542,7 @@ (define* (embedded-installation-os bootloader bootloader-target tty
(inherit installation-os) (inherit installation-os)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader bootloader) (bootloader bootloader)
(target bootloader-target))) (targets (list bootloader-target))))
(kernel linux-libre) (kernel linux-libre)
(kernel-arguments (kernel-arguments
(cons (string-append "console=" tty) (cons (string-append "console=" tty)

View file

@ -630,7 +630,7 @@ (define virtual-file-systems
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(inherit (operating-system-bootloader os)) (inherit (operating-system-bootloader os))
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(initrd (lambda (file-systems . rest) (initrd (lambda (file-systems . rest)
(apply (operating-system-initrd os) (apply (operating-system-initrd os)

View file

@ -222,7 +222,7 @@ (define %simple-os
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -38,7 +38,7 @@ (define %ganeti-os
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/vda"))) (targets '("/dev/vda"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -494,7 +494,7 @@ (define-os-with-source (%separate-home-os %separate-home-os-source)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/vdb"))) (targets '("/dev/vdb"))))
(kernel-arguments '("console=ttyS0")) (kernel-arguments '("console=ttyS0"))
(file-systems (cons* (file-system (file-systems (cons* (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
@ -709,7 +709,7 @@ (define-os-with-source (%encrypted-root-os %encrypted-root-os-source)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/vdb"))) (targets '("/dev/vdb"))))
;; Note: Do not pass "console=ttyS0" so we can use our passphrase prompt ;; Note: Do not pass "console=ttyS0" so we can use our passphrase prompt
;; detection logic in 'enter-luks-passphrase'. ;; detection logic in 'enter-luks-passphrase'.

View file

@ -50,7 +50,7 @@ (define %base-os
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems %base-file-systems) (file-systems %base-file-systems)
(users %base-user-accounts) (users %base-user-accounts)
(packages (cons* (packages (cons*

View file

@ -74,7 +74,7 @@ (define* (make-jami-os #:key provisioning?)
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons (file-system (file-systems (cons (file-system
(device (file-system-label "my-root")) (device (file-system-label "my-root"))
(mount-point "/") (mount-point "/")

View file

@ -81,7 +81,7 @@ (define %default-operating-system
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sda"))) (targets '("/dev/sda"))))
(file-systems (cons* (file-system (file-systems (cons* (file-system
(device %default-root-device) (device %default-root-device)
(mount-point %root-path) (mount-point %root-path)

View file

@ -39,7 +39,7 @@ (define %os
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(file-systems (cons %root-fs %base-file-systems)) (file-systems (cons %root-fs %base-file-systems))
(users %base-user-accounts))) (users %base-user-accounts)))
@ -56,7 +56,7 @@ (define %os-with-mapped-device
(locale "en_US.utf8") (locale "en_US.utf8")
(bootloader (bootloader-configuration (bootloader (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(target "/dev/sdX"))) (targets '("/dev/sdX"))))
(mapped-devices (list %luks-device)) (mapped-devices (list %luks-device))
(file-systems (cons (file-system (file-systems (cons (file-system
(inherit %root-fs) (inherit %root-fs)