summary refs log tree commit diff
path: root/gnu/system/image.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-06-13 17:33:10 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2020-06-24 20:24:34 +0200
commitb904b59ce592c89dfb4675a8c06757afed6738a0 (patch)
tree8645a9b3f5d2609c552c7d25017843821812de78 /gnu/system/image.scm
parentaf0307a099ecfe6364da69415933d56dba33e055 (diff)
downloadguix-b904b59ce592c89dfb4675a8c06757afed6738a0.tar.gz
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.
Diffstat (limited to 'gnu/system/image.scm')
-rw-r--r--gnu/system/image.scm23
1 files changed, 6 insertions, 17 deletions
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 <image> 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)))))