summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-06-01 12:31:09 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-06-01 12:42:04 +0300
commit64c043e63a4be97f59fd1906c47973a74eedda67 (patch)
tree37b15dfb4830e4f874edca87b521b6e9cdc3c81b /gnu/build
parentb1f763de54dc2b8e240d0f01f7948ce76f67243e (diff)
parent75af73e1b7ac58770122d8831faa3a8158638bb0 (diff)
downloadguix-patches-64c043e63a4be97f59fd1906c47973a74eedda67.tar
guix-patches-64c043e63a4be97f59fd1906c47973a74eedda67.tar.gz
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/build')
-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 3e8b94e2d6..ddfd34c111 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -95,16 +95,18 @@ turn doesn't take any constant overhead into account, force a 1-MiB minimum."
(estimate-partition-size root)
size)))))))
-(define* (make-vfat-image partition target root)
+(define* (make-vfat-image partition target root fs-bits)
"Handle the creation of VFAT partition images. See 'make-partition-image'."
(let ((size (partition-size partition))
- (label (partition-label partition)))
- (invoke "fakeroot" "mkdosfs" "-n" label "-C" target
- "-F" "16" "-S" "1024"
- (size-in-kib
- (if (eq? size 'guess)
- (estimate-partition-size root)
- size)))
+ (label (partition-label partition))
+ (flags (partition-flags 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))
+ (if (member 'esp flags) (list "-S" "1024") '()))
(for-each (lambda (file)
(unless (member file '("." ".."))
(invoke "mcopy" "-bsp" "-i" target
@@ -120,8 +122,10 @@ ROOT directory to populate the image."
(cond
((string-prefix? "ext" type)
(make-ext-image partition target root))
- ((string=? type "vfat")
- (make-vfat-image partition target root))
+ ((or (string=? type "vfat") (string=? type "fat16"))
+ (make-vfat-image partition target root 16))
+ ((string=? type "fat32")
+ (make-vfat-image partition target root 32))
(else
(raise (condition
(&message