diff options
author | George Hung <george.hung@quantatw.com> | 2020-09-02 17:20:04 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-09-03 18:17:39 +0300 |
commit | cad1788fe19a7a8186d9c9b98390357dd8ab71fa (patch) | |
tree | 1d77143f4d53626154808d83d160536b195f3bb7 /meta-quanta/meta-gbs/recipes-gbs | |
parent | 6113cc091b925318205d15c836dc8d1bf38697ce (diff) | |
download | openbmc-cad1788fe19a7a8186d9c9b98390357dd8ab71fa.tar.xz |
meta-quanta: gbs: fix BMC can't record gpio present SEL logs
It needs to set the correct sensor type in sensor DBus path and
then records the gpio present SEL logs successfully
cable sensors -> set sensor type 'cable'
Non-cable sensors -> set sensor type 'entity presence'
(From meta-quanta rev: c144969b7fc813610fa55a24629ead297ff24cfe)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I454d87439141b1b55d995a3276384429ad10d9a9
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-gbs')
3 files changed, 20 insertions, 19 deletions
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service index 9731ee388..982ae6f5a 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service @@ -1,7 +1,7 @@ [Unit] Description=Detect GPIO Present Manager After=phosphor-gpio-presence@.service -Requires=phosphor-gpio-presence@.service +Wants=phosphor-gpio-presence@.service [Service] ExecStart=/usr/bin/detect-gpio-present.sh diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh index 66f52f067..2bbe46e84 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh @@ -1,16 +1,16 @@ #!/bin/bash SERVICE_NAME="xyz.openbmc_project.Inventory.Manager" -PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab0_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab1_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab2_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab3_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/hsbp_cab_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/fanbd_cab_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/bp12v_cab_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/sata0_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot0_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot1_prsnt") +PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab1_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab2_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab3_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/hsbp_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/fanbd_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/cable/bp12v_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/entity/sata0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot1_prsnt") INTERFACE_NAME="xyz.openbmc_project.Inventory.Item" IPMI_LOG_SERVICE="xyz.openbmc_project.Logging.IPMI" @@ -34,11 +34,11 @@ while true; do if [ $boot_status == "false" ] && [ ${present_state[$i]} == "true" ];then echo "Update cable $(($i+1)) state." present_state[$i]="false" - busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_ASSERT_FLAG $LOG_GENID_FLAG + busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT "$LOG_ERR" ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_ASSERT_FLAG $LOG_GENID_FLAG elif [ $boot_status == "true" ] && [ ${present_state[$i]} == "false" ];then echo "Update cable $(($i+1)) state." present_state[$i]="true" - busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_DEASSERT_FLAG $LOG_GENID_FLAG + busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT "$LOG_ERR" ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_DEASSERT_FLAG $LOG_GENID_FLAG fi done sleep 1 diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh index 7b4571091..71a608fff 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh @@ -25,12 +25,13 @@ pe_eeprom_addr=( 50 54 ) SERVICE_NAME="xyz.openbmc_project.Inventory.Manager" INTERFACE_NAME="xyz.openbmc_project.Inventory.Item" -PE_PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot0_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot1_prsnt") -HSBP_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/gpios/hsbp_cab_prsnt" -FANBD_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/gpios/fanbd_cab_prsnt" -BP12V_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/gpios/bp12v_cab_prsnt" -SATA0_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/gpios/sata0_prsnt" +PE_PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot1_prsnt") +HSBP_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/cable/hsbp_cab_prsnt" +FANBD_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/cable/fanbd_cab_prsnt" +BP12V_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/cable/bp12v_cab_prsnt" +SATA0_PRESENT_OBJPATH="/xyz/openbmc_project/inventory/system/chassis/entity/sata0_prsnt" + set_gpio_persistence() { reg_val=$(devmem ${WD1RCR_ADDR} 32) |