From: RICHA BHARTI <ricbha.bgp@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2] wic: support passing extraargs for EFI partition creation
Date: Thu, 18 Dec 2025 00:29:53 -0800 (PST) [thread overview]
Message-ID: <465454d2-d0e6-45a1-a5f9-891af0c84067n@googlegroups.com> (raw)
In-Reply-To: <20251218082208.1031200-1-Richa.Bharti@siemens.com>
[-- Attachment #1.1: Type: text/plain, Size: 5410 bytes --]
*Without Extraargs:*
```
$ cat wic/generic-ufs-partitions.wks.in
part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot"
--label efi --part-type EF00 --align 1024 --use-uuid --size 512M
part --use-uuid --source rootfs --fstype=${BSP_ROOTFS_TYPE} --label system
--active --align 1024 --exclude-path boot --fixed-size
${UFS_PART_SYSTEM_SIZE}
bootloader --ptable gpt --timeout 0 --append "${BSP_KERNEL_CMDLINE}
$ file development-image-industrial-os-qcs615-adp-air.wic.p1
development-image-industrial-os-qcs615-adp-air.wic.p1: DOS/MBR boot sector,
code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 8, Media descriptor
0xf8, sectors/track 63, heads 32, sectors 1048572 (volumes > 32 MB), FAT
(32 bit), sectors/FAT 1024, serial number 0xe9d3c0d4, label: "efi "
```
*LOG:*
```
DEBUG: ['mkdosfs', '-n', 'efi', '-i', '0x1C1D0579', '-S', '512', '-C',
'/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.vlfgf_0b/boot.img',
'524288']
DEBUG: exec_native_cmd: export
PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs -n
efi -i 0x1C1D0579 -S 512 -C
/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.vlfgf_0b/boot.img
524288
DEBUG: _exec_cmd: export
PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs -n
efi -i 0x1C1D0579 -S 512 -C
/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.vlfgf_0b/boot.img
524288
DEBUG: ['export',
'PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs',
'-n', 'efi', '-i', '0x1C1D0579', '-S', '512', '-C',
'/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.vlfgf_0b/boot.img',
'524288']
```
*With Extraargs:*
```
$ wic/generic-ufs-partitions.wks.in
part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,*extraargs=-F
32 -S 4096 -r 2048*" --label efi --part-type EF00 --align 1024 --use-uuid
--size 512M
part --use-uuid --source rootfs --fstype=${BSP_ROOTFS_TYPE} --label system
--active --align 1024 --exclude-path boot --fixed-size
${UFS_PART_SYSTEM_SIZE}
bootloader --ptable gpt --timeout 0 --append "${BSP_KERNEL_CMDLINE}"
$ file development-image-industrial-os-qcs615-adp-air.wic.p1
development-image-industrial-os-qcs615-adp-air.wic.p1: DOS/MBR boot sector,
code offset 0x58+2, OEM-ID "mkfs.fat", Bytes/sector 4096, Media descriptor
0xf8, sectors/track 32, heads 8, sectors 131072 (volumes > 32 MB), FAT (32
bit), sectors/FAT 128, serial number 0xbf8798d0, label: "efi "
```
*LOG: *
```
DEBUG: Added 469589 extra blocks to /boot to get to 524288 total blocks
DEBUG: ['mkdosfs', '-n', 'efi', '-i', '0xBF8798D0', '-F', '32', '-S',
'4096', '-r', '2048', '-C',
'/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.qd9it81v/boot.img',
'524288']
DEBUG: exec_native_cmd: export
PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs -n
efi -i 0xBF8798D0 -F 32 -S 4096 -r 2048 -C
/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.qd9it81v/boot.img
524288
DEBUG: _exec_cmd: export
PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs -n
efi -i 0xBF8798D0 -F 32 -S 4096 -r 2048 -C
/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.qd9it81v/boot.img
524288
DEBUG: ['export',
'PATH=//sbin://usr/sbin://usr/bin://usr/bin/None://bin:None:$PATH;mkdosfs',
'-n', 'efi', '-i', '0xBF8798D0', '-F', '32', '-S', '4096', '-r', '2048',
'-C',
'/tmp/development-image-industrial-os-qcs615-adp-air.wic/tmp.wic.qd9it81v/boot.img',
'524288']
```
On Thursday, December 18, 2025 at 1:52:32 PM UTC+5:30 Richa Bharti wrote:
> Some EFI firmwares require FAT filesystems to use specific geometry or
> sector parameters.
>
> Add support for an `extraargs` source parameter to allow passing
> additional mkdosfs options when creating the EFI System Partition (ESP).
> If no extra arguments are provided, mkdosfs defaults to "-S 512",
> preserving existing behaviour.
>
> Signed-off-by: Richa Bharti <Richa....@siemens.com>
> ---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> index 446398d0..6862a288 100644
> --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> @@ -506,8 +506,10 @@ class BootimgEFIPlugin(SourcePlugin):
>
> label = part.label if part.label else "ESP"
>
> - dosfs_cmd = "mkdosfs -n %s -i %s -C %s %d" % \
> - (label, part.fsuuid, bootimg, blocks)
> + extraargs = source_params.get('extraargs', "-S 512")
> +
> + dosfs_cmd = "mkdosfs -n %s -i %s %s -C %s %d" % \
> + (label, part.fsuuid, extraargs, bootimg, blocks)
> exec_native_cmd(dosfs_cmd, native_sysroot)
>
> mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)
> --
> 2.39.5
>
>
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/465454d2-d0e6-45a1-a5f9-891af0c84067n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 6332 bytes --]
next prev parent reply other threads:[~2025-12-18 8:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 13:02 [PATCH] " 'Richa Bharti' via isar-users
2025-12-18 7:28 ` Anton Mikanovich
2025-12-18 8:22 ` [PATCH v2] " 'Richa Bharti' via isar-users
2025-12-18 8:29 ` RICHA BHARTI [this message]
2025-12-18 8:39 ` 'Bharti, Richa' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=465454d2-d0e6-45a1-a5f9-891af0c84067n@googlegroups.com \
--to=ricbha.bgp@gmail.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox