-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[component] add auto_update_firmware() to support the auto update. #106
Changes from 7 commits
f26b932
c03fb4e
c8fce83
b6b0f41
3a88347
1d56deb
4c86ecc
87cd0ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,3 +103,35 @@ def update_firmware(self, image_path): | |
RuntimeError: update failed | ||
""" | ||
raise NotImplementedError | ||
|
||
def auto_update_firmware(self, image_path, boot_type): | ||
""" | ||
Updates firmware of the component | ||
|
||
This API performs firmware update automatically based on boot_type: it assumes firmware installation | ||
and/or creating a loading task during the reboot, if needed, in a single call. | ||
In case platform component requires some extra steps (apart from calling Low Level Utility) | ||
to load the installed firmware (e.g, reboot, power cycle, etc.) - this will be done automatically during the reboot. | ||
The loading task will be created by API. | ||
|
||
Args: | ||
image_path: A string, path to firmware image | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This API will have any return values? Please mention if required. |
||
boot_type: A string, reboot type following the upgrade | ||
- none/fast/warm/cold | ||
|
||
Returns: | ||
Output: A return code | ||
return_code: An integer number, status of component firmware auto-update | ||
- return code of a positive number indicates successful auto-update | ||
- status_installed = 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang IMHO, status installed is not relevant for this flow, since it requires some additional steps from user (e.g., power cycle for CPLD/FPGA, etc.), thus such an operation can't be claimed as automatic firmware upgrade. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nazariig This has been discussed several time. auto-update is expected to be able to perform install/ update/ creating a task for the components firmware update if the update is available for the boot_type. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@sujinmkang that is clear, but i am talking about the case when we have |
||
- status_updated = 2 | ||
- status_scheduled = 3 | ||
- return_code of a negative number indicates failed auto-update | ||
- status_err_boot_type = -1 | ||
- status_err_image = -2 | ||
- status_err_others = -3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sujinmkang maybe it's better to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nazariig please review this PR again. |
||
|
||
Raises: | ||
RuntimeError: auto-update failure cause | ||
""" | ||
raise NotImplementedError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image_path : can it be mentioned that the firmware_image be a self extracting binary..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got clarification from HLD.