-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
catalina: fw-version: add PCIeSwitchConfig and HDD CPLD
Summary: Add a new firmware version service to fill up PCIeSwitchConfig and HDD CPLD firmware version to settings object. This commit relies on: https://gerrit.openbmc.org/c/openbmc/openbmc/+/76433 https://gerrit.openbmc.org/c/openbmc/openbmc/+/76443 Test results: ``` root@bmc:~# mfg-tool version-display 2>/dev/null | grep HGX_pcieswitchconfig_0 "HGX_pcieswitchconfig_0": "01300524", root@bmc:~# mfg-tool version-display 2>/dev/null | grep Catalina_HDD_cpld "Catalina_HDD_cpld": "00010100", ``` X-link: facebookexternal/openbmc.quanta#4507 Reviewed By: williamspatrick Differential Revision: D67030857 fbshipit-source-id: 47d9e537396b6419ea8a240c425ec4cabff6fdb7
- Loading branch information
1 parent
a0e832c
commit ab3aae7
Showing
5 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
meta-facebook/meta-catalina/recipes-catalina/fw-versions/files/hdd-cpld
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
version=$(fw-util hdd --version cpld | awk '{print $NF}') | ||
echo "version: $version" | ||
|
||
busctl set-property \ | ||
xyz.openbmc_project.Settings \ | ||
/xyz/openbmc_project/software/chassis/Catalina_HDD_cpld \ | ||
xyz.openbmc_project.Software.Version \ | ||
Version "s" "$version" |
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
meta-facebook/meta-catalina/recipes-catalina/fw-versions/files/hmc-hgx-pcieswitchconfig-0
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
max_retry_count=30 | ||
retry_delay_sec=10 | ||
|
||
for ((i=1; i<=max_retry_count; i++)) | ||
do | ||
if ! version=$(hmc-util --version HGX_PCIeSwitchConfig_0); then | ||
echo "failed to get version, retry after ${retry_delay_sec} seconds (count: ${i})" | ||
sleep "$retry_delay_sec" | ||
else | ||
version=$(echo "$version" | awk '{print $NF}') | ||
echo "version: $version" | ||
busctl set-property \ | ||
xyz.openbmc_project.Settings \ | ||
/xyz/openbmc_project/software/chassis/HGX_pcieswitchconfig_0 \ | ||
xyz.openbmc_project.Software.Version \ | ||
Version "s" "$version" | ||
exit 0 | ||
fi | ||
done | ||
|
||
exit 1 |
This file contains 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