From b904b59ce592c89dfb4675a8c06757afed6738a0 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 13 Jun 2020 17:33:10 +0200 Subject: image: Move hurd image definition to a dedicated file. This moves hurd-disk-image to a dedicated file. It also defines a default operating-system so that the image can be built standalone. * gnu/system/images/hurd.scm: New file, * gnu/local.mk (GNU_SYSTEM_MODULES): add it, * gnu/system/image.scm (root-offset, root-label): Export it, (hurd-disk-image): remove it as this is now defined in the new, Hurd dedicated file above, (find-image): adapt to avoid loop dependency. --- gnu/system/image.scm | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'gnu/system/image.scm') diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 3904c2a17d..90163e68da 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -53,10 +53,12 @@ #:use-module (srfi srfi-35) #:use-module (rnrs bytevectors) #:use-module (ice-9 match) - #:export (esp-partition + #:export (root-offset + root-label + + esp-partition root-partition - hurd-disk-image efi-disk-image iso9660-image @@ -101,20 +103,6 @@ (list #:make-device-nodes make-hurd-device-nodes))))) -(define hurd-disk-image - (image - (format 'disk-image) - (target "i586-pc-gnu") - (partitions - (list (partition - (size 'guess) - (offset root-offset) - (label root-label) - (file-system "ext2") - (file-system-options '("-o" "hurd" "-O" "ext_attr")) - (flags '(boot)) - (initializer hurd-initialize-root-partition)))))) - (define efi-disk-image (image (format 'disk-image) @@ -565,7 +553,8 @@ addition of the record." (_ (cond ((and target (hurd-triplet? target)) - hurd-disk-image) + (module-ref (resolve-interface '(gnu system images hurd)) + 'hurd-disk-image)) (else efi-disk-image))))) -- cgit v1.2.3