FW check for recovery mode - #9683
Closed
tomerashuach wants to merge 58 commits into
Closed
Conversation
ev-mp
reviewed
Aug 26, 2021
tomerashuach
marked this pull request as ready for review
August 29, 2021 11:36
tomerashuach
marked this pull request as draft
August 29, 2021 11:37
(cherry picked from commit 5820283)
…eleasing resources
ev-mp
suggested changes
Sep 5, 2021
| auto device_pid = _usb_device->get_info().pid; | ||
| auto it = ds::device_to_fw_min_version.find(_usb_device->get_info().pid); | ||
| if (it == ds::device_to_fw_min_version.end()) | ||
| throw std::runtime_error(to_string() << "Min and Max firmware versions have not been defined for this device: " << device_pid); |
Contributor
There was a problem hiding this comment.
Print the device ID as "0xABCD" hex
| namespace librealsense | ||
| { | ||
| class updatable | ||
| class fw_checkable |
Contributor
There was a problem hiding this comment.
Pls rename to firmware_image_check or similar
Contributor
Author
There was a problem hiding this comment.
changed to "firmware_check_interface"
| virtual void update_flash(const std::vector<uint8_t>& image, update_progress_callback_ptr callback, int update_mode) = 0; | ||
| virtual bool check_fw_compatibility(const std::vector<uint8_t>& image) const = 0; | ||
| std::string extract_firmware_version_string(const void* fw_image, size_t fw_image_size) const | ||
| static std::string extract_firmware_version_string(const void* fw_image, size_t fw_image_size) |
Contributor
There was a problem hiding this comment.
I think you can pass it in as a vector<uint8_t> vector instead of C-types
|
|
||
| // advanced SR3XX devices do not fit the "old" fw versions and | ||
| // legacy SR3XX devices do not fit the "new" fw versions | ||
| return (firmware_version(fw_version) >= firmware_version(min_max_fw_it->second.first)) && |
Contributor
There was a problem hiding this comment.
In case the condition doesn't hold - print to log the version number extracted from the FW image
added 3 commits
September 5, 2021 14:39
…alsense into firmware_update_recovery_17448
tomerashuach
force-pushed
the
firmware_update_recovery_17448
branch
from
September 9, 2021 11:28
fe7cbc3 to
bf3febf
Compare
ev-mp
suggested changes
Sep 12, 2021
ev-mp
left a comment
Contributor
There was a problem hiding this comment.
Minor changes + max value for SR300 to be verified
| bool result = (firmware_version(fw_version) >= firmware_version(min_max_fw_it->second.first)) && | ||
| (firmware_version(fw_version) <= firmware_version(min_max_fw_it->second.second)); | ||
| if (!result) | ||
| LOG_ERROR(fw_version); |
Contributor
There was a problem hiding this comment.
Pls elaborate the error details
| bool result = (firmware_version(fw_version) >= firmware_version(min_max_fw_it->second.first)) && | ||
| (firmware_version(fw_version) <= firmware_version(min_max_fw_it->second.second)); | ||
| if (!result) | ||
| LOG_ERROR(fw_version); |
| { SR306_PID, {"3.28.3.0", "99.99.99.99"}}, | ||
| { SR306_PID_DBG, {"3.28.3.0", "99.99.99.99"}}, | ||
| { SR300_RECOVERY, {"3.21.0.0", "99.99.99.99"}} | ||
| { SR300v2_PID, {"3.27.0.0", "4.99.99.99"}}, |
Contributor
There was a problem hiding this comment.
I think it should be 3.xx, not 4
| #include "l500-fw-update-device.h" | ||
| #include "l500-private.h" | ||
|
|
||
|
|
This was referenced Sep 12, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added a FW check when the device is in recovery mode
Edit: added a heuristic FW size check to sr3xxx when updating in recovery mode.
Tested on: D435i, D405, L515, SR300.
Tracked on: DSO-17448