From 1b4fa7851b39f087a6433e8b5e22c479ca1da289 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 20 May 2020 16:09:53 +0200 Subject: image: Add partition offset support. * gnu/image.scm (partition-offset): New procedure, ()[offset]: new field. * gnu/system/image.scm (system-disk-image): Apply the partition offset. --- gnu/system/image.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/system/image.scm') diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 571b7af5f3..adc2b3c221 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -243,11 +243,17 @@ (define (partition->config partition) ;; Return the genimage partition configuration for PARTITION. (let ((label (partition-label partition)) (dos-type (partition->dos-type partition)) - (image (partition-image partition))) + (image (partition-image partition)) + (offset (partition-offset partition))) #~(format #f "~/partition ~a { ~/~/partition-type = ~a ~/~/image = \"~a\" - ~/}" #$label #$dos-type #$image))) + ~/~/offset = \"~a\" + ~/}" + #$label + #$dos-type + #$image + #$(or offset 0)))) (let* ((format (image-format image)) (image-type (format->image-type format)) -- cgit v1.2.3