diff options
author | Kyle Nieman <kyle.nieman@fii-na.com> | 2022-10-20 21:51:09 +0300 |
---|---|---|
committer | Vivekanand Veeracholan <vveerach@google.com> | 2023-06-30 20:09:27 +0300 |
commit | b52f6b8b2d5adc28f2b9b1c6a9c6157b584e16d4 (patch) | |
tree | 8f7f96855fdb6dda2ab23f3ec0f2a770379097d0 /meta-fii | |
parent | 6f32677b4230f90fb60eae10959708619534a44e (diff) | |
download | openbmc-b52f6b8b2d5adc28f2b9b1c6a9c6157b584e16d4.tar.xz |
meta-fii: meta-mori: Add setup for firmware verification
Firmware of an older stage board will not be allowed on a
current stage board. During the flashing process, AC cycles
are prevented.
Overview of Changes:
1.)mori-lib.sh
-Modify to add definitions that will be used for AC power cycle
delay.
2.)init_once.sh
-Modify to no longer use HPM_STBY_RST_N.
3.)mori-fw-ver.service
-Modify to wait until fw verification process is finished to prevent
failed version retrieval.
Signed-off-by: Kyle Nieman <kyle.nieman@fii-na.com>
Change-Id: Idd5a9613bc3e1086dd44e2579b5cb56108d430d0
Diffstat (limited to 'meta-fii')
3 files changed, 16 insertions, 1 deletions
diff --git a/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-fw-ver.service b/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-fw-ver.service index b0a6618220..b7444648f7 100644 --- a/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-fw-ver.service +++ b/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-fw-ver.service @@ -1,5 +1,7 @@ [Unit] Description=Firmware Version Daemon +Wants=host-powerctrl.service +After=host-powerctrl.service [Service] RemainAfterExit=yes diff --git a/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh b/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh index 47b704e76c..9c443bf718 100644 --- a/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh +++ b/meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh @@ -76,6 +76,15 @@ rst_bios_spi() { set_gpio_ctrl RST_BIOS_EEPROM0_N 1 } +function Does_File_Exist() { + local FILE=$1 + + if [[ ! -f "${FILE}" ]]; then + echo "${FILE} file does not exist" >&2 + return 1 + fi +} + # Start definitions # I2C Definitions @@ -88,3 +97,7 @@ I2C_MB_PWRSEQ=(40 40) I2C_CPU_EEPROM=(19 50) I2C_STBUCK=(33 74) I2C_HOTSWAP_CTRL=(25 1f) + +# File Path Definition +# File path used to prevent hotswapping +RST_LOCK_FILE="/etc/FW_FLASH_ONGOING" diff --git a/meta-fii/meta-mori/recipes-mori/mori-sys-utility/mori-boot/init_once.sh b/meta-fii/meta-mori/recipes-mori/mori-sys-utility/mori-boot/init_once.sh index 4ee4701143..8df22724c6 100644 --- a/meta-fii/meta-mori/recipes-mori/mori-sys-utility/mori-boot/init_once.sh +++ b/meta-fii/meta-mori/recipes-mori/mori-sys-utility/mori-boot/init_once.sh @@ -15,7 +15,7 @@ function set_mux_default(){ } set_mux_default -set_gpio_ctrl HPM_STBY_RST_N 1 + sleep 5 set_gpio_ctrl S0_BMC_OK 1 |