summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2017-02-22 14:12:04 +0100
committerNicolas Dechesne <nicolas.dechesne@linaro.org>2017-02-22 14:12:04 +0100
commit1d2adbe04c39990199e3e0a10ebf52ffb13ce936 (patch)
tree4ddcb66999e01e1f3cb83c99d22a8ad5caa986f6
parent1246deade3367a9ddea9d2d9ce98f9fc15ebcec9 (diff)
wncss-start: ensure that 'state' field exists
with newer implementation of remoteproc, the 'state' field has been moved from debugfs into /sys/class/remoteproc/xxx. So with newer kernel, wcnss-start will find the WCN core, but starting the core would fail since 'state' does not exist in debugfs. So let's add an additional check to make sure that this field exist before using it. Change-Id: Ic471014d277f892ae7453082b7347b3f9b357c1d Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
-rwxr-xr-xwcnss-start8
1 files changed, 5 insertions, 3 deletions
diff --git a/wcnss-start b/wcnss-start
index 40550b7..dac40c4 100755
--- a/wcnss-start
+++ b/wcnss-start
@@ -6,9 +6,11 @@ for f in $(ls /sys/kernel/debug/remoteproc/*/name 2> /dev/null); do
name=$(cat "$f")
if [ "${name%.wcnss}" != "$name" ] ; then
f=$(dirname "$f")
- echo "Found WCN at $f"
- found=1
- break
+ if [ -f "$f"/state ]; then
+ echo "Found WCN at $f"
+ found=1
+ break
+ fi
fi
done