mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-22 17:16:01 +02:00
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>
This commit is contained in:
committed by
Ludovic Courtès
parent
766ad072ad
commit
727a72c5e2
+2
-1
@@ -48348,7 +48348,8 @@ and @code{"ext4"}.
|
||||
@item @code{file-system-options} (default: @code{'()})
|
||||
The partition file system creation options that should be passed to the
|
||||
partition creation tool, as a list of strings. This is only supported
|
||||
when creating @code{"ext4"} partitions.
|
||||
when creating @code{"vfat"}, @code{"fat16"}, @code{"fat32"} or
|
||||
@code{"ext4"} partitions.
|
||||
|
||||
See the @code{"extended-options"} man page section of the
|
||||
@code{"mke2fs"} tool for a more complete reference.
|
||||
|
||||
+14
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user