-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This PR has the changes necessary to support multiboot. facebookexternal/openbmc.arista#1 - fpga_util changes to support multiboot facebookexternal/openbmc.arista#2 - Update CIT fw tests in conjunction with this change Change facebookexternal/openbmc.arista#1: fpga_util.sh For elbert fpga_util spi flash devices, let's use spi-nor driver. The issue with loading this driver at dts is that some devices might not be enabled or behind a mux. Instead add a method bind_spi_nor which will enable this driver in userspace after the muxes are set properly. Interacting with this mtd device will not do anything unless the mux is selected which is only in the context of fpga_util.sh I am leaving some code in case we decide to go back to spidev in the future. Testing: Able to reprogram and pimreset different PIM types and see images being reloaded. There is still some issue intermittently where PIM stay showing up as 'VERSION NOT DETECTED' and we are investigating, However, this can be recoved via powercycle or reprogramming, and is only 2-3/100 cycles. Able to read TH4 QSPI with this change as well. For TH4 QSPI we re-bind the spi-nor to re-initialize it. Since this upgrade is rare we will just bind everytime. Change facebookexternal/openbmc.arista#2: Update Elbert FW CIT tests - Update manifest jsons to match latest programmables - Add CIT and external fw upgrade test cases Example Logs: NOTE: you can ignore bios issues ``` % python3 cit_runner.py --platform elbert --run-test "tests.elbert.external_fw_upgrade_test_multip le" --external --bmc-host fd7a:629f:52a4:1b1c:d6af:f7ff:fe2f:320d --firmware-opt-args="-f -v" test_collective_firmware_upgrade (tests.elbert.external_fw_upgrade_test_multiple.CollectiveFwUpgradeTest) This test file will enable us to do all the upgrade and ... Start firmware upgrade test! Connecting to UUT ....................................................... Done Checking version ........................................................ Warning Warning! bios: Cannot get current version on UUT, defaulting to upgrade Checking binary on UUT .................................................. Done [95/5226] Updating: bios .......................................................... Done Updating: scm ........................................................... Done Updating: smb ........................................................... Done Updating: smb_cpld ...................................................... Done Updating: fan ........................................................... Done Updating: pim_base ...................................................... Done Updating: pim16q ........................................................ Done Updating: pim8ddm ....................................................... Done Power cycle UUT ......................................................... Done Reconnecting to DUT ..................................................... Done Checking version ........................................................ Warning Warning! bios: Cannot get current version on UUT, defaulting to upgrade *********************************************************************************** Test Summary *********************************************************************************** Name Previous Current Package Result Time elapsed ----------------------------------------------------------------------------------- bios N/A N/A 4.10 Passed 86.81s scm 1.13 1.13 1.13 Passed 65.83s smb 1.18 1.18 1.18 Passed 66.06s smb_cpld 4.1 4.1 4.1 Passed 26.35s fan 1.2 1.2 1.2 Passed 26.44s pim_base 1.1 1.1 1.1 Passed 5.28s pim16q 6.4 6.4 6.4 Passed 7.49s pim8ddm 7.3 7.3 7.3 Passed 7.51s ----------------------------------------------------------------------------------- ok ---------------------------------------------------------------------- Ran 1 test in 621.406s Pull Request resolved: facebookexternal/openbmc.arista#102 Reviewed By: mikechoifb fbshipit-source-id: a67b5e19c3
- Loading branch information
1 parent
f2258b4
commit 710cafd
Showing
11 changed files
with
494 additions
and
49 deletions.
There are no files selected for viewing
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
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
97 changes: 97 additions & 0 deletions
97
tests2/tests/elbert/external_fw_upgrade_test_individual.py
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,97 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright 2020-present Facebook. All Rights Reserved. | ||
# | ||
# This program file is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by the | ||
# Free Software Foundation; version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program in a file named COPYING; if not, write to the | ||
# Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, | ||
# Boston, MA 02110-1301 USA | ||
# | ||
|
||
import unittest | ||
|
||
from tests.elbert.test_data.firmware_upgrade.firmware_upgrade_config import ( | ||
FwUpgradeTest, | ||
) | ||
|
||
|
||
class BiosFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for Master BIOS | ||
""" | ||
|
||
def test_bios_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("bios") | ||
|
||
|
||
class ScmFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for System Control Management CPLD | ||
""" | ||
|
||
def test_scm_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("scm") | ||
|
||
|
||
class SmbFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for System Management Board CPLD | ||
""" | ||
|
||
def test_smb_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("smb") | ||
|
||
|
||
class SmbCpldFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for System Management Board Extra CPLD | ||
""" | ||
|
||
def test_smb_cpld_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("smb_cpld") | ||
|
||
|
||
class FanFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for Fan CPLD | ||
""" | ||
|
||
def test_fan_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("fan") | ||
|
||
|
||
class PimBaseUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for Port Interface Module CPLD Base Partition | ||
""" | ||
|
||
def test_pim_base_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("pim_base") | ||
|
||
|
||
class Pim16qUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for Port Interface Module CPLD PIM16Q Partition | ||
""" | ||
|
||
def test_pim16q_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("pim16q") | ||
|
||
|
||
class Pim8ddmUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Individual test for Port Interface Module CPLD PIM8DDM Partition | ||
""" | ||
|
||
def test_pim8ddm_fw_upgrade(self): | ||
super().do_external_firmware_upgrade("pim8ddm") |
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,43 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright 2020-present Facebook. All Rights Reserved. | ||
# | ||
# This program file is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by the | ||
# Free Software Foundation; version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program in a file named COPYING; if not, write to the | ||
# Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, | ||
# Boston, MA 02110-1301 USA | ||
# | ||
|
||
import unittest | ||
|
||
from tests.elbert.test_data.firmware_upgrade.firmware_upgrade_config import ( | ||
FwUpgradeTest, | ||
) | ||
|
||
|
||
class CollectiveFwUpgradeTest(FwUpgradeTest, unittest.TestCase): | ||
""" | ||
Collective test for all components which is found in json file | ||
""" | ||
|
||
def test_collective_firmware_upgrade(self): | ||
""" | ||
This test file will enable us to do all the upgrade and | ||
one power cycle at the end. While this has its advantages, | ||
it makes it impossible for us to catch which specific FW | ||
break a device in cases a box don't come up after upgrade. | ||
Therefore, we will skip this test for now. Please comment | ||
out the skipTest line and uncomment the line of code of | ||
that come right before pass to activate this test. | ||
""" | ||
super().do_external_firmware_upgrade() |
Oops, something went wrong.