[RFC] Support workflows where the Firehose programmer is already running#201
[RFC] Support workflows where the Firehose programmer is already running#201igoropaniuk wants to merge 2 commits intolinux-msm:masterfrom
Conversation
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>
|
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. |
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: