diff options
author | Brandon Kim <brandonkim@google.com> | 2021-03-30 04:01:40 +0300 |
---|---|---|
committer | Brandon Kim <brandonkim@google.com> | 2021-03-30 19:59:37 +0300 |
commit | b9a8673456a72cabb858f8b8d2c202105cefee69 (patch) | |
tree | 28e54325805ba32e54769268168523fd597d886c /meta-quanta | |
parent | da5117af41a23e05b912fed1008503b09a361feb (diff) | |
download | openbmc-b9a8673456a72cabb858f8b8d2c202105cefee69.tar.xz |
meta-quanta: gbs: detect-gpio-present: Mapper wait once
mapper wait call should not be called every loop
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I7763f8dfbd78fdacbdbf21076cbc56cde8b7bc17
Diffstat (limited to 'meta-quanta')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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 2bbe46e84..eec0a0ba2 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 @@ -25,10 +25,14 @@ LOG_DEASSERT_FLAG="false" LOG_GENID_FLAG="0x0020" present_state=("true" "true" "true" "true" "true" "true" "true" "true" "true" "true") +for i in ${!PRESENT_OBJPATH[@]} +do + mapper wait ${PRESENT_OBJPATH[$i]} +done + while true; do for i in ${!PRESENT_OBJPATH[@]} do - mapper wait ${PRESENT_OBJPATH[$i]} boot_status="$(busctl get-property $SERVICE_NAME ${PRESENT_OBJPATH[$i]} $INTERFACE_NAME Present | awk '{print $2}')" if [ $boot_status == "false" ] && [ ${present_state[$i]} == "true" ];then |