From bb662d71e6e3db69114645d690bc033c5ffa1ac5 Mon Sep 17 00:00:00 2001 From: Pavel Shlyak Date: Sun, 22 May 2022 16:53:49 +0300 Subject: image: Add bootable flag support. * gnu/build/image.scm (sexp->partition): Add flags support. * gnu/system/image.scm (partition->gexp): Ditto. (system-disk-image): Set the genimage bootable flag if it is part of the partition flags. Signed-off-by: Mathieu Othacehe --- gnu/build/image.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/build') diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 81caa424f8..3e8b94e2d6 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2022 Pavel Shlyak ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,12 +49,13 @@ "Take SEXP, a tuple as returned by 'partition->gexp', and turn it into a record." (match sexp - ((size file-system file-system-options label uuid) + ((size file-system file-system-options label uuid flags) (partition (size size) (file-system file-system) (file-system-options file-system-options) (label label) - (uuid uuid))))) + (uuid uuid) + (flags flags))))) (define (size-in-kib size) "Convert SIZE expressed in bytes, to kilobytes and return it as a string." @@ -78,6 +80,7 @@ turn doesn't take any constant overhead into account, force a 1-MiB minimum." (fs-options (partition-file-system-options partition)) (label (partition-label partition)) (uuid (partition-uuid partition)) + (flags (partition-flags partition)) (journal-options "lazy_itable_init=1,lazy_journal_init=1")) (apply invoke `("fakeroot" "mke2fs" "-t" ,fs "-d" ,root -- cgit 1.4.1