Skip to content

snagflash: dfu: support partition names - #107

Merged
rgantois merged 1 commit into
bootlin:mainfrom
mfuzzey:snagflash-dfu-named
Oct 8, 2026
Merged

rgantois merged 1 commit into
bootlin:mainfrom
mfuzzey:snagflash-dfu-named

Conversation

@MartinFuzzey

Copy link
Copy Markdown
Contributor

Currently the partitions used by snagflash DFU have to be the numeric altsettings, let's allow the names defined in u-boot to be used too.

Eg if u-boot is configured with
dfu_alt_info "mmc 0=fsbl raw 0 1000 mmcpart 1;ssbl part 0 1"
writing to the ssbl currently requires the snagflash option
-D 1:binaries/u-boot.img
with this patch the following is also accepted
-D ssbl:u-boot.img

Note: if the name starts with a number it will still be interpreted as a numeric alt setting.

Currently the partitions used by snagflash DFU have to be the numeric
altsettings, let's allow the names defined in u-boot to be used too.

Eg if u-boot is configured with
	dfu_alt_info "mmc 0=fsbl raw 0 1000 mmcpart 1;ssbl part 0 1"
writing to the ssbl currently requires the snagflash option
	-D 1:binaries/u-boot.img
with this patch the following is also accepted
	-D ssbl:u-boot.img

@rgantois rgantois left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I've added a few comments.

Comment thread docs/snagflash.md

**Note:** If you want a static block device path, you can use the following udev
rules to create symlinks when a certain VID:PID pair is detected:
rules to create symlinks when a certain VID:PID pair is detected:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray whitespace

Comment thread src/snagflash/dfu.py Resolved
@MartinFuzzey

MartinFuzzey commented Oct 2, 2026 via email

Copy link
Copy Markdown
Contributor Author

@rgantois

rgantois commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Hi Romain, Thanks for the quick review
On Fri, 2 Oct 2026 at 11:56, Romain Gantois @.***> wrote: @rgantois requested changes on this pull request. Thanks a lot! I've added a few comments. ________________________________ In docs/snagflash.md: > @@ -166,7 +166,7 @@ snagflash -P ums -s binaries/u-boot.stm32 -d /mnt/u-boot.stm32 ``` Note: If you want a static block device path, you can use the following udev -rules to create symlinks when a certain VID:PID pair is detected: +rules to create symlinks when a certain VID:PID pair is detected: stray whitespace ________________________________
It's the reverse. There was previously stray whitespace and my patch removed it (because of my editor settings to automatically do that). Is that a problem?

Ah yes indeed, then no it's not a problem!

@rgantois

rgantois commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@rgantois
rgantois merged commit 86d93b7 into bootlin:main Oct 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants