Skip to content

[RFC] Support workflows where the Firehose programmer is already running#201

Open
igoropaniuk wants to merge 2 commits intolinux-msm:masterfrom
igoropaniuk:feat/skip_reset_skip_sahara
Open

[RFC] Support workflows where the Firehose programmer is already running#201
igoropaniuk wants to merge 2 commits intolinux-msm:masterfrom
igoropaniuk:feat/skip_reset_skip_sahara

Conversation

@igoropaniuk
Copy link
Contributor

Support two new CLI options to support workflows where the Firehose programmer
is already running on the device:

  • --skip-reset (-R): suppresses the post-flash power/reset command, leaving the programmer alive after flashing completes.

  • --skip-sahara (-P): skips the Sahara phase entirely and connects directly to an already-running programmer. When used, the programmer ELF argument is omitted. Intended to be paired with --skip-reset from a previous qdl invocation.

Typical use:

# First flash - uploads programmer and flashes, but doesn't reset
qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml --debug --skip-reset

# Subsequent flashes -  programmer already running, skip Sahara entirely
qdl rawprogram*.xml patch*.xml --skip-sahara

Some workflows require the device to remain in the programmer state
after flashing - for example, when chaining multiple flash operations,
running post-flash verification, or debugging with the programmer still
responsive. The unconditional reset at the end of firehose_run() and
firehose_provision() makes this impossible without patching the binary.

Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
When a device is already running the Firehose programmer - for example
after flashing with --skip-reset- re-uploading the programmer via
Sahara is unnecessary.

Without this option, there is no way to connect to an already-running
programmer without modifying the binary.

With --skip-sahara the programmer ELF argument is omitted and qdl
connects directly to the device to issue Firehose commands.

Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
@andersson
Copy link
Collaborator

If the device is already in firehose mode, the read in sahara_run() will either return <?xml or a timeout. I think it would be more user friendly to detect these two conditions and from that attempt to continue the firehose session.

The only case where this wouldn't work is if the user interrupted firehose while in rawmode=true, as firehose would read nothing and attempting to write should just end up in flash. I don't know if there's any way around this and that's the reason why I didn't push these patches before.

(As discussed privately) For the --skip-reset I'd prefer such multi-storage flashing to happen in one go if possible - again for better UX.... Perhaps there are other cases where this might be useful? The patch looks good, but I'd prefer that we didn't merge the extra command line arguments until we have that concrete usecase.

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