[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/28: image: Add partition offset support.
From: |
guix-commits |
Subject: |
01/28: image: Add partition offset support. |
Date: |
Sat, 23 May 2020 05:27:56 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 46422639ad0670925aed658ddacd7eaa490370ac
Author: Mathieu Othacehe <address@hidden>
AuthorDate: Wed May 20 16:09:53 2020 +0200
image: Add partition offset support.
* gnu/image.scm (partition-offset): New procedure,
(<partition>)[offset]: new field.
* gnu/system/image.scm (system-disk-image): Apply the partition offset.
---
gnu/image.scm | 2 ++
gnu/system/image.scm | 10 ++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gnu/image.scm b/gnu/image.scm
index b05fc69..3a02692 100644
--- a/gnu/image.scm
+++ b/gnu/image.scm
@@ -22,6 +22,7 @@
partition?
partition-device
partition-size
+ partition-offset
partition-file-system
partition-label
partition-uuid
@@ -47,6 +48,7 @@
partition?
(device partition-device (default #f))
(size partition-size)
+ (offset partition-offset (default #f))
(file-system partition-file-system (default "ext4"))
(label partition-label (default #f))
(uuid partition-uuid (default #f))
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 571b7af..adc2b3c 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -243,11 +243,17 @@ used in the image."
;; 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))
- branch wip-hurd-vm created (now cd57c13), guix-commits, 2020/05/23
- 02/28: build: image: Add support for EXT2 and EXT3 file-systems., guix-commits, 2020/05/23
- 03/28: gnu: grub: Allow "grub-bios-setup" to operate on raw disk-images., guix-commits, 2020/05/23
- 06/28: system: vm: Do not register-closures when cross-building to the Hurd., guix-commits, 2020/05/23
- 01/28: image: Add partition offset support.,
guix-commits <=
- 13/28: bootloader: grub: Add support for '<hurd-menu-entry>'., guix-commits, 2020/05/23
- 12/28: system: Add 'hurd' field to <boot-parameters>., guix-commits, 2020/05/23
- 15/28: system: Use 'hurd' package in label., guix-commits, 2020/05/23
- 04/28: system: image: Fix disk-image cross-compilation., guix-commits, 2020/05/23
- 05/28: utils: Move 'reset-timestamps' out of database., guix-commits, 2020/05/23
- 07/28: system: vm: Build vm-image using native qemu, for the Hurd., guix-commits, 2020/05/23
- 08/28: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/23
- 09/28: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/23
- 10/28: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/23
- 11/28: bootloader: Add `<hurd-menu-entry>'., guix-commits, 2020/05/23