Skip to contentSkip to conversation

wic: Add support for variable sector size when creating ESP

PATCH Macpaul Lin (林智斌) 1 participant 1 message Sep 15, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 21 lines · Macpaul Lin via lists.openembedded.org

External email : Please do not click links or open attachments until you have verified the sender or the content.

Derive sector_size from the WIC_SECTOR_SIZE BitBake variable. Recalculate blocks to align with the chosen sector size. While the default sector size of mkdosfs is 512 bytes. Pass -S <sector_size> to align the setting of WIC_SECTOR_SIZE.

---
 scripts/lib/wic/plugins/source/bootimg_efi.py | 15 +++++++++++++--

 1 file changed, 13 insertions(+), 2 deletions(-)

Changes for v2:
 - drop --sector-size, use get_bitbake_var("WIC_SECTOR_SIZE") instead.
 - drop value filter of sector-size.
 - drop creating new sub-varible for 'part'.

Quoted 3 lines

Changes for v3:
 - Add -v option back for mkdosfs.
 - Round up the value of blocks instead of round dwon.

Sorry for sending a patch with incorrect --subject-prefix. This patch should be v3.
A updated patch has been resend with --subject-prefix="PATCH v3"

Thanks
Macpaul Lin