Skip to content
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

[fwutil]: Add firmware management utility #520

Closed
wants to merge 1 commit into from

Conversation

mudsut4ke
Copy link

- What I did

  • Add firmware management CLI
  • Add support for querying module's firmware version
  • Add support for Install firmware image to module

- New command syntax:

root@sonic:~# fwutil show version
root@sonic:~# fwutil install -m <module name> <path/url>

- Example of command output

root@sonic:~# fwutil show version
Module    Submodule    Version
--------  -----------  ---------
BIOS                   5.6.5
CPLD      CPLD4        4.4
CPLD      CPLD5        5.4
CPLD      CPLD2        2.5
CPLD      CPLD3        3.4
CPLD      CPLD1        1.4

root@sonic:~# fwutil install -m CPLD http://192.168.20.106/slx/Seastone_CPLD_V0_7.vme
Downloading image...
Command: ispvm /tmp/fw_image.vme

                 Lattice Semiconductor Corp.

             ispVME(tm) V12.2 Copyright 1998-2011.

For daisy chain programming of all in-system programmable devices

Processing virtual machine file (/tmp/fw_image.vme)......

CREATED BY: ispVM(R) System Version 18.0.1
CREATION DATE: 12/06/18 16:03:31  

+=======+
| PASS! |
+=======+

Done

Signed-off-by: Wirut Getbamrung wgetbumr@celestica.com


try:
platform_fwutil_class = getattr(module, PLATFORM_SPECIFIC_CLASS_NAME)
platform_fwutil = platform_fwutil_class()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does this fwutil class defined?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is defined on device plugin:
sonic-net/sonic-buildimage#2824



# Loads platform specific fwutil module from source
def load_platform_fwutil():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add this platform v2 api for this in the sonic-platform-common api?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will do it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mudsut4ke
Copy link
Author

@keboliu
Copy link
Collaborator

keboliu commented May 5, 2019

@mudsut4ke if my understanding is correct, for now, this utility is only applicable to Celestica platform? If so I would like to suggest adding this utility as platform-specific. Currently, we have a cli group "platform" under "config" command, you may add a subgroup for your platform and make these subgroup only exposed on your platform.

@mudsut4ke
Copy link
Author

@jleveque Can you review this design ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants