RFC: aleksander/qmi-firmware-update v2

Aleksander Morgado aleksander at aleksander.es
Tue Jan 17 11:56:38 UTC 2017


Hey,

I've updated the QMI firmware update branch with bugfixes and some new
features. Comments welcome and tests appreciated :)

https://cgit.freedesktop.org/libqmi/log/?h=aleksander/qmi-firmware-update

List of updates w.r.t. v1 of the branch:

 * Included several bugfixes from Christophe Ronco, they were already
discussed in the mailing list.

 * Fixed a couple of issues with assertions due to mismanaged
transactions. These are actually already in git master and other
stable branches as well.

 * Updated the logic to avoid releasing the CIDs if the reset
operation requested is successful, i.e. to avoid timeouts or errors in
the release process if the modem is already power cycling itself.

 * Added some additional info to the last ACK during the QDL download
to warn about it possibly taking too long:

    finalizing download... (may take more than one minute, be patient)

 * Updated the --reset operation to get into QDL download mode (also
used internally in --update):
   ** Implemented support for using DMS 0x003e to trigger the boot and
hold reset to get into QDL mode.
   ** If DMS 0x003e isn't supported, we'll try to use the Qualcomm
generic DMS Set boot image download mode (e.g. available in Novatel
E396).
   ** If none of the QMI commands is supported, we'll then fallback to
try with AT!BOOTHOLD.

 * Fixed device selection so that any cdc-wdm or TTY port may be used
to select a given device for any of the operations that require one
(update, update-qdl or reset).

 * Implemented a new --verbose-log=[PATH] option so that all verbose
debug logging is stored in a file, regardless of the verbosity
selected for stdout. I've used this a lot to always keep on disk the
output of a firmware update session, while using the default stdout
verbosity.

 * Renamed the --force option used in upload to the much more specific
--ignore-version-errors.

 * Fixed the update process when the modem reports that it already has
the images applicable to the firmware preference selected by the user.
When this happened, we were just returning. Now we do a full reset so
that the new preference is actually selected.

 * Added a new --override-download that may be used when the modem
reports that it already has the images applicable to the firmware
preference selected by the user. If this option is set, the download
process of the images is forced, even if the modem already has them.

 * Added a new --modem-storage-index=[INDEX] option to instruct the
modem in which slot index to store the modem image. Currently used
slots may be checked with qmicli --dms-list-stored-images.

 * Implemented a post-update validation process, where we wait for the
cdc-wdm to reappear and we query the newly running firmware details
(reported revision and firmware preferences). This process may take a
while, because the modem may reboot a couple of times after the
upgrade process. This is quite useful, especially when the update
process is done only for the PRI image while keeping the modem image
the same, because the user can easily validate what was running before
and what is running now.

 * The user can also choose to skip the new validation step with
--skip-validation, so that the whole update process is quicker.

 * Queried several QMI capabilities before and after the update,
including support for get/set firmware preference or
list/delete/select stored images. This information will be included in
the final report, so that the user knows that further actions may be
done after the actual update.

 * Some examples of the final report:

For a MC7710 the output would be:
------------------------------------------------------------------------

   original firmware revision was:
   SWI9200X_03.05.24.00ap r5792 carmd-en-10527 2013/05/02 13:35:47

   new firmware revision is:
   SWI9200X_03.05.29.03ap r6485 CNSHZ-ED-XP0031 2014/12/02 17:53:15

------------------------------------------------------------------------

For a MC7455 the output would be:
------------------------------------------------------------------------

   original firmware revision was:
   SWI9X30C_02.14.03.00 r6134 CARMD-EV-FRMWR2 2016/03/28 14:34:14
      image 'modem': unique id '000.008_000', build id '02.14.03.00_VODAFONE'
      image 'pri': unique id '000.008_000', build id '02.14.03.00_VODAFONE'

   new firmware revision is:
   SWI9X30C_02.20.03.00 r6691 CARMD-EV-FRMWR2 2016/06/30 10:54:05
      image 'modem': unique id '000.011_000', build id '02.20.03.00_ROGERS'
      image 'pri': unique id '000.011_000', build id '02.20.03.00_ROGERS'

   NOTE: this device supports stored image management
   with qmicli operations:
      --dms-list-stored-images
      --dms-select-stored-image
      --dms-delete-stored-image

   NOTE: this device supports firmware preference management
   with qmicli operations:
      --dms-get-firmware-preference
      --dms-set-firmware-preference

------------------------------------------------------------------------

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list