From be1033a3349069ee722bf25c804b3bfee4467886 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 3 Jul 2017 10:05:03 +0200 Subject: build: Add iso9660 system image generator. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add 'iso9660-image . * gnu/build/vm.scm (make-iso9660-image): New variable. Export it. * gnu/system/vm.scm (iso9660-image): New variable. Use make-iso9660-image. (system-disk-image): Use iso9660-image. --- gnu/build/vm.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gnu/build') diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 8f7fc3c9c4..860c98346d 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -50,7 +50,8 @@ estimated-partition-size root-partition-initializer initialize-partition-table - initialize-hard-disk)) + initialize-hard-disk + make-iso9660-image)) ;;; Commentary: ;;; @@ -351,6 +352,21 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (string-append "boot/grub/grub.cfg=" config-file))) (error "failed to create GRUB EFI image")))) +(define* (make-iso9660-image grub config-file os-drv target + #:key (volume-id "GuixSD")) + "Given a GRUB package, creates an iso image as TARGET, using CONFIG-FILE as +Grub configuration and OS-DRV as the stuff in it." + (let ((grub-mkrescue (string-append grub "/bin/grub-mkrescue"))) + (mkdir-p "/tmp/root/var/run") + (mkdir-p "/tmp/root/run") + (unless (zero? (system* grub-mkrescue "-o" target + (string-append "boot/grub/grub.cfg=" config-file) + (string-append "gnu/store=" os-drv "/..") + "var=/tmp/root/var" + "run=/tmp/root/run" + "--" "-volid" (string-upcase volume-id))) + (error "failed to create ISO image")))) + (define* (initialize-hard-disk device #:key bootloader-package -- cgit v1.2.3