Skip to content

Commit

Permalink
[mellanox]: Add SSD FW update tool (sonic-net#4351)
Browse files Browse the repository at this point in the history
* [mellanox]: Add SSD FW update tool.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mellanox]: Align Platform API.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mellanox]: Fix firmware description.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>

* [mellanox]: Update SSD tool.

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
  • Loading branch information
nazariig authored and tiantianlv committed Apr 24, 2020
1 parent b197224 commit ab8576d
Show file tree
Hide file tree
Showing 12 changed files with 761 additions and 18 deletions.
3 changes: 2 additions & 1 deletion files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ sudo cp $files_path/$MLNX_SPC2_FW_FILE $FILESYSTEM_ROOT/etc/mlnx/fw-SPC2.mfa
sudo cp $files_path/$MLNX_SPC3_FW_FILE $FILESYSTEM_ROOT/etc/mlnx/fw-SPC3.mfa
sudo cp $files_path/$ISSU_VERSION_FILE $FILESYSTEM_ROOT/etc/mlnx/issu-version
sudo cp $files_path/$MLNX_FFB_SCRIPT $FILESYSTEM_ROOT/usr/bin/mlnx-ffb.sh
sudo cp $files_path/$ONIE_FW_UPDATE $FILESYSTEM_ROOT/usr/bin/onie-fw-update.sh
sudo cp $files_path/$MLNX_ONIE_FW_UPDATE $FILESYSTEM_ROOT/usr/bin/$MLNX_ONIE_FW_UPDATE
sudo cp $files_path/$MLNX_SSD_FW_UPDATE $FILESYSTEM_ROOT/usr/bin/$MLNX_SSD_FW_UPDATE
j2 platform/mellanox/mlnx-fw-upgrade.j2 | sudo tee $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh
sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/mlnx-fw-upgrade.sh

Expand Down
6 changes: 3 additions & 3 deletions platform/mellanox/fw.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mellanox firmware
# mellanox asic firmware

MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH)

Expand Down Expand Up @@ -34,6 +34,8 @@ else
SONIC_ONLINE_FILES += $(MLNX_FW_FILES)
endif

MLNX_FILES += $(MLNX_FW_FILES)

export MLNX_SPC_FW_VERSION
export MLNX_SPC_FW_FILE

Expand All @@ -42,5 +44,3 @@ export MLNX_SPC2_FW_FILE

export MLNX_SPC3_FW_VERSION
export MLNX_SPC3_FW_FILE

export MLNX_FW_FILES
3 changes: 2 additions & 1 deletion platform/mellanox/issu-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ $(ISSU_VERSION_FILE)_SRC_PATH = $(PLATFORM_PATH)/issu-version
$(ISSU_VERSION_FILE)_DEPENDS += $(APPLIBS)
SONIC_MAKE_FILES += $(ISSU_VERSION_FILE)

export ISSU_VERSION_FILE
MLNX_FILES += $(ISSU_VERSION_FILE)

export ISSU_VERSION_FILE
2 changes: 2 additions & 0 deletions platform/mellanox/mlnx-ffb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ MLNX_FFB_SCRIPT = mlnx-ffb.sh
$(MLNX_FFB_SCRIPT)_PATH = platform/mellanox/
SONIC_COPY_FILES += $(MLNX_FFB_SCRIPT)

MLNX_FILES += $(MLNX_FFB_SCRIPT)

export MLNX_FFB_SCRIPT
9 changes: 9 additions & 0 deletions platform/mellanox/mlnx-onie-fw-update.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# onie update tool

MLNX_ONIE_FW_UPDATE = mlnx-onie-fw-update.sh
$(MLNX_ONIE_FW_UPDATE)_PATH = platform/mellanox/
SONIC_COPY_FILES += $(MLNX_ONIE_FW_UPDATE)

MLNX_FILES += $(MLNX_ONIE_FW_UPDATE)

export MLNX_ONIE_FW_UPDATE
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ class ComponentBIOS(Component):
BIOS_VERSION_PARSE_PATTERN = 'OEM[\s]*Strings\n[\s]*String[\s]*1:[\s]*([0-9a-zA-Z_\.]*)'
BIOS_PENDING_UPDATE_PATTERN = '([0-9A-Za-z_]*.rom)[\s]*\|[\s]*bios_update'

ONIE_FW_UPDATE_CMD_ADD = '/usr/bin/onie-fw-update.sh add {}'
ONIE_FW_UPDATE_CMD_REMOVE = '/usr/bin/onie-fw-update.sh remove {}'
ONIE_FW_UPDATE_CMD_UPDATE = '/usr/bin/onie-fw-update.sh update'
ONIE_FW_UPDATE_CMD_SHOW = '/usr/bin/onie-fw-update.sh show-pending'
ONIE_FW_UPDATE_CMD_ADD = '/usr/bin/mlnx-onie-fw-update.sh add {}'
ONIE_FW_UPDATE_CMD_REMOVE = '/usr/bin/mlnx-onie-fw-update.sh remove {}'
ONIE_FW_UPDATE_CMD_UPDATE = '/usr/bin/mlnx-onie-fw-update.sh update'
ONIE_FW_UPDATE_CMD_SHOW = '/usr/bin/mlnx-onie-fw-update.sh show-pending'

BIOS_QUERY_VERSION_COMMAND = 'dmidecode -t 11'

Expand Down
9 changes: 9 additions & 0 deletions platform/mellanox/mlnx-ssd-fw-update.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ssd update tool

MLNX_SSD_FW_UPDATE = mlnx-ssd-fw-update.sh
$(MLNX_SSD_FW_UPDATE)_PATH = platform/mellanox/
SONIC_COPY_FILES += $(MLNX_SSD_FW_UPDATE)

MLNX_FILES += $(MLNX_SSD_FW_UPDATE)

export MLNX_SSD_FW_UPDATE
Loading

0 comments on commit ab8576d

Please sign in to comment.