diff options
author | Randolph Sapp <rs@ti.com> | 2023-04-21 16:26:13 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-04-27 14:41:31 +0100 |
commit | ef577b03d70663bb51bbff05ee90d609adb86a35 (patch) | |
tree | 2cf62f917743c07808bced485e0a1930f7b8331c /scripts | |
parent | 24f1964fcd73266cc7ee71142021b4183d62b01c (diff) | |
download | poky-ef577b03d70663bb51bbff05ee90d609adb86a35.tar.gz |
wic/bootimg-efi: if fixed-size is set then use that for mkdosfs
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.
(From OE-Core rev: 38e1a235f5eceade7c871f96dc97f6c384384c7b)
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index d6aeab2aad..43c6fd94d9 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -439,6 +439,13 @@ class BootimgEFIPlugin(SourcePlugin): | |||
439 | logger.debug("Added %d extra blocks to %s to get to %d total blocks", | 439 | logger.debug("Added %d extra blocks to %s to get to %d total blocks", |
440 | extra_blocks, part.mountpoint, blocks) | 440 | extra_blocks, part.mountpoint, blocks) |
441 | 441 | ||
442 | # required for compatibility with certain devices expecting file system | ||
443 | # block count to be equal to partition block count | ||
444 | if blocks < part.fixed_size: | ||
445 | blocks = part.fixed_size | ||
446 | logger.debug("Overriding %s to %d total blocks for compatibility", | ||
447 | part.mountpoint, blocks) | ||
448 | |||
442 | # dosfs image, created by mkdosfs | 449 | # dosfs image, created by mkdosfs |
443 | bootimg = "%s/boot.img" % cr_workdir | 450 | bootimg = "%s/boot.img" % cr_workdir |
444 | 451 | ||