You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
snagflash fastboot-uboot: flash cannot take an image path containing a space (quoting does not help) #112
So any image path with a space is cut in two, whether it is quoted or not:
# cmdfile, used with: snagflash -P fastboot-uboot -p 0000:0000 -I cmdfile
set target mmc2
flash "/home/op/Images 2026/flash.bin" 0 hwpart 1
→ path = '/home/op/Images' and rest = '2026/flash.bin" 0 hwpart 1', then int(offset, 0) raises ValueError: invalid literal for int() with base 0: '2026/flash.bin"'.
Interactive mode (-i) goes through the same code.
Side note: .strip('"').strip('"') strips the same character twice; it probably
meant to strip single quotes as well.
Why it matters to us
We drive snagflash from a production flashing station. By the time snagflash runs, the
board's previous bootloader has already been erased so that the ROM falls back to USB
download. A cmdfile that fails to parse leaves a board that boots nothing. We now refuse
such paths on our side, but it would be better if snagflash accepted them.
Suggested fix
Tokenise the arguments with shlex.split(args) (or at least honour double quotes) in cmd_flash, and in the other commands that use partition(" ") (hwpart handling in flash_mmc). Documented syntax: flash <image_path> <image_offset> [<partition_name>].
Also, it would help to validate the whole cmdfile (syntax, files present, offsets parse)
before the first command is sent to the device, so a typo on a later line cannot fail
halfway through a flash.
Activity