2018-02-15 09:30:57 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
dmesg -C
|
|
|
|
./sof_remove.sh
|
|
|
|
./sof_insert.sh
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
unset FW_BOOT
|
|
|
|
unset ERROR
|
|
|
|
FW_BOOT=$(dmesg | grep sof-audio | grep "boot complete")
|
2018-08-08 09:02:46 +08:00
|
|
|
ERROR=$(dmesg | grep sof-audio | grep -v "DSP trace buffer overflow" | grep "error")
|
2018-08-08 09:21:07 +08:00
|
|
|
TIMEOUT=$(dmesg | grep sof-audio | grep "ipc timed out")
|
2018-02-15 09:30:57 +08:00
|
|
|
|
2018-08-08 09:21:07 +08:00
|
|
|
if [ ! -z "$ERROR" ] || [ -z "$FW_BOOT" ] || [ ! -z "$TIMEOUT" ]
|
2018-02-15 09:30:57 +08:00
|
|
|
then
|
2018-08-08 09:21:07 +08:00
|
|
|
dmesg > boot_fail.log
|
|
|
|
echo "boot failed, see boot_fail.log for details"
|
|
|
|
exit 1
|
2018-02-15 09:30:57 +08:00
|
|
|
else
|
|
|
|
echo "boot success"
|
|
|
|
fi
|
|
|
|
|