vm: Reword grub.cfg to bootcfg.

* gnu/build/vm.scm (register-grub.cfg-root): Reword grub.cfg to bootcfg,
(initialize-hard-disk): ditto,
* gnu/system/vm.scm (system-disk-image): ditto,
(system-qemu-image): ditto,
(system-qemu-image/shared-store): ditto.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
Mathieu Othacehe 2017-04-15 14:22:24 +02:00 committed by Danny Milosavljevic
parent c76b3046f6
commit 07f812c404
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5
2 changed files with 10 additions and 8 deletions

View file

@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -284,18 +285,18 @@ (define target-store
(unless register-closures? (unless register-closures?
(reset-timestamps target)))) (reset-timestamps target))))
(define (register-grub.cfg-root target grub.cfg) (define (register-grub.cfg-root target bootcfg)
"On file system TARGET, register GRUB.CFG as a GC root." "On file system TARGET, register BOOTCFG as a GC root."
(let ((directory (string-append target "/var/guix/gcroots"))) (let ((directory (string-append target "/var/guix/gcroots")))
(mkdir-p directory) (mkdir-p directory)
(symlink grub.cfg (string-append directory "/grub.cfg")))) (symlink bootcfg (string-append directory "/grub.cfg"))))
(define* (initialize-hard-disk device (define* (initialize-hard-disk device
#:key #:key
grub.cfg grub.cfg
(partitions '())) (partitions '()))
"Initialize DEVICE as a disk containing all the <partition> objects listed "Initialize DEVICE as a disk containing all the <partition> objects listed
in PARTITIONS, and using GRUB.CFG as its bootloader configuration file. in PARTITIONS, and using BOOTCFG as its bootloader configuration file.
Each partition is initialized by calling its 'initializer' procedure, Each partition is initialized by calling its 'initializer' procedure,
passing it a directory name where it is mounted." passing it a directory name where it is mounted."

View file

@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -295,7 +296,7 @@ (define file-systems-to-keep
#:copy-inputs? #t #:copy-inputs? #t
#:register-closures? #t #:register-closures? #t
#:inputs `(("system" ,os-drv) #:inputs `(("system" ,os-drv)
("grub.cfg" ,bootcfg)))))) ("bootcfg" ,bootcfg))))))
(define* (system-qemu-image os (define* (system-qemu-image os
#:key #:key
@ -334,7 +335,7 @@ (define file-systems-to-keep
#:disk-image-size disk-image-size #:disk-image-size disk-image-size
#:file-system-type file-system-type #:file-system-type file-system-type
#:inputs `(("system" ,os-drv) #:inputs `(("system" ,os-drv)
("grub.cfg" ,bootcfg)) ("bootcfg" ,bootcfg))
#:copy-inputs? #t)))) #:copy-inputs? #t))))
@ -425,14 +426,14 @@ (define* (system-qemu-image/shared-store
(mlet* %store-monad ((os-drv (operating-system-derivation os)) (mlet* %store-monad ((os-drv (operating-system-derivation os))
(bootcfg (operating-system-bootcfg os))) (bootcfg (operating-system-bootcfg os)))
;; XXX: When FULL-BOOT? is true, we end up creating an image that contains ;; XXX: When FULL-BOOT? is true, we end up creating an image that contains
;; GRUB.CFG and all its dependencies, including the output of OS-DRV. ;; BOOTCFG and all its dependencies, including the output of OS-DRV.
;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; This is more than needed (we only need the kernel, initrd, GRUB for its
;; font, and the background image), but it's hard to filter that. ;; font, and the background image), but it's hard to filter that.
(qemu-image #:os-derivation os-drv (qemu-image #:os-derivation os-drv
#:grub-configuration bootcfg #:grub-configuration bootcfg
#:disk-image-size disk-image-size #:disk-image-size disk-image-size
#:inputs (if full-boot? #:inputs (if full-boot?
`(("grub.cfg" ,bootcfg)) `(("bootcfg" ,bootcfg))
'()) '())
;; XXX: Passing #t here is too slow, so let it off by default. ;; XXX: Passing #t here is too slow, so let it off by default.