From ea08faf5b0f3173a413206b9f9a9b8c6c28739b5 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 7 Aug 2018 20:21:07 -0500 Subject: [PATCH] kmod_scripts: look for timeout errors and stop loops Timeout errors happen randomly but need to be checked. This helps check issues reported at https://github.com/thesofproject/sof/issues/209 Signed-off-by: Pierre-Louis Bossart --- kmod_scripts/sof_bootloop.sh | 2 ++ kmod_scripts/sof_bootone.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kmod_scripts/sof_bootloop.sh b/kmod_scripts/sof_bootloop.sh index f1bc99b..da9296d 100755 --- a/kmod_scripts/sof_bootloop.sh +++ b/kmod_scripts/sof_bootloop.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + MAXLOOPS=100 COUNTER=0 diff --git a/kmod_scripts/sof_bootone.sh b/kmod_scripts/sof_bootone.sh index 0b533a6..92071fa 100755 --- a/kmod_scripts/sof_bootone.sh +++ b/kmod_scripts/sof_bootone.sh @@ -9,10 +9,13 @@ unset FW_BOOT unset ERROR FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete") ERROR=$(dmesg | grep sof-audio | grep -v "DSP trace buffer overflow" | grep "error") +TIMEOUT=$(dmesg | grep sof-audio | grep "ipc timed out") -if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] +if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] || [ ! -z "$TIMEOUT" ] then - echo "boot failed" + dmesg > boot_fail.log + echo "boot failed, see boot_fail.log for details" + exit 1 else echo "boot success" fi