aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/image.scm
diff options
context:
space:
mode:
authorRoman Scherer <roman@burningswell.com>2024-10-03 14:13:31 +0200
committerLudovic Courtès <ludo@gnu.org>2024-10-14 14:08:43 +0200
commit727a72c5e26345257a5e6b83387d51b3b15cc542 (patch)
treed701894ef73a91c8cdd05f370e3ddad763a89875 /gnu/build/image.scm
parent766ad072ad90d4ffc161cb83e29910b7bb3a9d54 (diff)
downloadguix-727a72c5e26345257a5e6b83387d51b3b15cc542.tar
guix-727a72c5e26345257a5e6b83387d51b3b15cc542.tar.gz
image: Use file system options in make-vfat-image.
* gnu/build/image.scm (make-vfat-image): Use file system options. Change-Id: I791aadd2803d1ef96fc79cf8910a74a0083d2b6e Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/build/image.scm')
-rw-r--r--gnu/build/image.scm24
1 files changed, 14 insertions, 10 deletions
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 6ca0a428e0..50518585f8 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -105,17 +105,21 @@ turn doesn't take any constant overhead into account, force a 1-MiB minimum."
"Handle the creation of VFAT partition images. See 'make-partition-image'."
(let ((size (partition-size partition))
(label (partition-label partition))
- (flags (partition-flags partition)))
+ (flags (partition-flags partition))
+ (fs-options (partition-file-system-options partition)))
(apply invoke "fakeroot" "mkdosfs" "-n" label "-C" target
- "-F" (number->string fs-bits)
- (size-in-kib
- (if (eq? size 'guess)
- (estimate-partition-size root)
- size))
- ;; u-boot in particular needs the formatted block
- ;; size and the physical block size to be equal.
- ;; TODO: What about 4k blocks?
- (if (member 'esp flags) (list "-S" "512") '()))
+ "-F" (number->string fs-bits)
+ (size-in-kib
+ (if (eq? size 'guess)
+ (estimate-partition-size root)
+ size))
+ ;; u-boot in particular needs the formatted block
+ ;; size and the physical block size to be equal.
+ ;; TODO: What about 4k blocks?
+ (if (and (member 'esp flags)
+ (not (member "-S" fs-options)))
+ (append (list "-S" "512") fs-options)
+ fs-options))
(for-each (lambda (file)
(unless (member file '("." ".."))
(invoke "mcopy" "-bsp" "-i" target