Skip to contentSkip to conversation

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

PATCH In review Randolph Sapp 4 participants 6 messages Apr 21, 2023 – May 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---

Ugh. I muddied up the log statement in the last revision. Fix that here.

 scripts/lib/wic/plugins/source/bootimg-efi.py | 7 +++++++
 1 file changed, 7 insertions(+)
scripts/lib/wic/plugins/source/bootimg-efi.py +7 -0
index a65a5b9780..c28d3917c2 100644
@@ -390,6 +390,13 @@ class BootimgEFIPlugin(SourcePlugin):
         logger.debug("Added %d extra blocks to %s to get to %d total blocks",
                      extra_blocks, part.mountpoint, blocks)
 
+        # required for compatibility with certain devices expecting file system
+        # block count to be equal to partition block count
+        if blocks < part.fixed_size:
+            blocks = part.fixed_size
+            logger.debug("Overriding %s to %d total blocks for compatibility",
+                     part.mountpoint, blocks)
+
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
Signature · 1 line
2.40.0
#1 lore raw

Hello Randolph,

On Fri, 21 Apr 2023 16:26:13 -0500
"Randolph Sapp via lists.openembedded.org"
<[email protected]> wrote:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As you can see your sender address has been mangled, and as a result the patch is rejected by the the openembedded git server. This is not your fault, but we need you to modify your git configuration to prevent this from happening in the future. Have a look at the wiki for more info and how to solve that:

https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders, fixing it manually so you don't need to resend your patch this time.

Best regards,
Luca

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 7 lines · Luca Ceresoli

Hello Randolph,

On Fri, 21 Apr 2023 16:26:13 -0500
"Randolph Sapp via lists.openembedded.org"
<[email protected]> wrote:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Quoted 6 lines

As you can see your sender address has been mangled, and as a result the patch is rejected by the the openembedded git server. This is not your fault, but we need you to modify your git configuration to prevent this from happening in the future. Have a look at the wiki for more info and how to solve that:

Ah! Thanks for the heads up. I've just adjust my configs.

Quoted 8 lines

https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Fixing_your_From_identity

I'm taking your patch for testing on the autobuilders, fixing it manually so you don't need to resend your patch this time.

Best regards,
Luca

Cool, thanks!

#4 lore raw
Quoted 4 lines · Paresh Bhagat via lists.openembedded.org

Hi Randolph

I tested your patch in my local kirkstone build for am62x. SD Card boot is working. Boot logs here: http://serenity.dal.design.ti.com:7777/ewakutoqom.yaml

This is an internal-only resource ^^^
Since you are both TI-ers, don't you think there's a better way to communicate this information rather than using a public mailing list? :)

Signature · 1 line
Denys
#5 lore raw
Quoted 10 lines · Denys Dmytriyenko
Quoted 4 lines · Paresh Bhagat via lists.openembedded.org

Hi Randolph

I tested your patch in my local kirkstone build for am62x. SD Card boot is working. Boot logs here: http://serenity.dal.design.ti.com:7777/ewakutoqom.yaml

This is an internal-only resource ^^^
Since you are both TI-ers, don't you think there's a better way to communicate this information rather than using a public mailing list? :)

I was hopping to get a tested-by tag here but I guess that was lost somewhere in the communication chain. I already knew this patch worked :)