#!/bin/sh # check if we have a qDSP available on the platform # new implementation of remoteproc use /sys/class/remoteproc # instead of debugfs for f in $(ls -d /sys/class/remoteproc/* 2> /dev/null); do device=$(readlink -f "$f"/device) name=$(basename "$device") if [ "${name%.hexagon}" != "$name" ] ; then echo "Found Hexagon at $f" echo start > "$f"/state exit fi done for f in $(ls /sys/kernel/debug/remoteproc/*/name 2> /dev/null); do name=$(cat "$f") if [ "${name%.hexagon}" != "$name" ] ; then f=$(dirname "$f") echo "Found Hexagon at $f" echo start > "$f"/state exit fi done # no found, then move on.. exit