Skip to contentSkip to conversation

wic/bootimg-efi: if fixed-size is set then use that for mkdosfs

PATCH Randolph Sapp 1 participant 1 message Apr 21, 2023 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 31 lines · Randolph Sapp via lists.openembedded.org

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.

---
  scripts/lib/wic/plugins/source/bootimg-efi.py | 3 +++
  1 file changed, 3 insertions(+)
scripts/lib/wic/plugins/source/bootimg-efi.py +3 -1
index a65a5b9780..15557e5d36 100644
@@ -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)
 
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines

Links: You receive all messages sent to this group.
View/Reply Online (#180297): https://lists.openembedded.org/g/openembedded-core/message/180297
Mute This Topic: https://lists.openembedded.org/mt/98419903/7094281
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Just realized I stepped on a log message. v2 to fix that.

https://lists.openembedded.org/g/openembedded-core/message/180298