public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs
@ 2023-04-21 21:10 Randolph Sapp
  0 siblings, 0 replies; only message in thread
From: Randolph Sapp @ 2023-04-21 21:10 UTC (permalink / raw)
  To: zarkakareem, reatmon, denis, afd; +Cc: openembedded-core, Randolph Sapp

This is a bit of a compatibility issue more than anything. Some devices
get upset if the FAT file system contains less blocks than the
partition.

The fixed-size argument is currently respected by the partition creation
step but not by the file system creation step. Let's make it so the file
system respects this value as well.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 scripts/lib/wic/plugins/source/bootimg-efi.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index a65a5b9780..15557e5d36 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -387,6 +387,9 @@ class BootimgEFIPlugin(SourcePlugin):
 
         blocks += extra_blocks
 
+        if blocks < part.fixed_size:
+            blocks = part.fixed_size
+
         logger.debug("Added %d extra blocks to %s to get to %d total blocks",
                      extra_blocks, part.mountpoint, blocks)
 
-- 
2.40.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-21 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 21:10 [PATCH] wic/bootimg-efi: if fixed-size is set then use that for mkdosfs Randolph Sapp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox