[qmi-firmware-update] Flash modem with multiple FWs without resets
Aleksander Morgado
aleksander at aleksander.es
Mon Jun 7 09:16:22 UTC 2021
Hey,
> I am new to libqmi and want to flash multiple FWs with 1 time call of qmi-firmware-update app (to eliminate resets).
> I run the app like this:
> qmi-firmware-update --update --ignore-version-errors -w /dev/cdc-wdm3 fws/50-SWI9X50C_01.08.04.00_VERIZON_002.015_002/SWI9X50C_01.08.04.00.cwe fws/50-SWI9X50C_01.08.04.00_VERIZON_002.015_002/SWI9X50C_01.08.04.00_VERIZON_002.015_002.nvu fws/50-SWI9X50C_01.09.04.00_DOCOMO_002.015_000/SWI9X50C_01.09.04.00.cwe fws/50-SWI9X50C_01.09.04.00_DOCOMO_002.015_000/SWI9X50C_01.09.04.00_DOCOMO_002.015_000.nvu
>
> If I understand correctly that is not supported because multiple nvu files cannot be flashed at 1 time (cwe flashing works fine).
>
I believe you're abusing the command line tool in an unexpected way :)
Did the multiple CWE flashing finish correctly really? i.e. do you see
all the flashed CWEs installed in different slots in the firmware
list?
The tool is meant to be used only with 1 cwe+ 1 nvu, because we need
to tell the module to which new firmware version + carrier version it
needs to switch, and we get that by parsing the cwe+nvu pair. Once the
module knows the required version is one that it doesn't have
installed, we trigger a reboot and at this point, the module will
accept any kind of new file downloaded. Looks like you're downloading
multiple cwe files at this point and it's working, I really never
tested that myself.
> And here are some questions:
> - Why multiple nvus cannot be flashed at 1 time?
Well, I never thought about allowing that truth be told. I don't even
know if the issue is a problem inside the module or in the tool, I
have no idea :)
> - Maybe it can be patched? Can somebody give me advice on where to search? I can try to patch the source code.
>
I guess we could extend the qmi-firmware-update operation to say:
flash the first CWE+NVU pair found, but also try to flash any
additional CWE or NVU file found. I truly have no idea whether that's
possible, really. I don't recall all the details of the upgrade
process, but I do believe there is a way to select in which slot to
flash, and in the newest firehose based modules the upgrade operation
also preselects the filename inside the module (e.g. all CWE files
would be written as "spkg.cwe", so it could be that even if you're
flashing 10 different CWE files only the last one is really
considered).
> My main goal is to reduce the time of flashing while working with multiple FWs.
>
Yeah, not sure if the modules themselves are ready for that, or at
least we may not have all the necessary info to know how to do that.
qmi-firmware-update is mostly based on reverse engineering USB traces
generated by other proprietary programs :)
> P.S.
> Connected email thread: "qmi-firmware-update with multiple NVU for Sierra EM7411".
>
Here's the link to that thread, for context:
https://lists.freedesktop.org/archives/libqmi-devel/2020-October/003402.html
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list