From 4f635cfda6632f3972a204e77a6b26781d70c621 Mon Sep 17 00:00:00 2001 From: Vamsee Narapareddi Date: Wed, 8 Oct 2025 16:43:17 +0530 Subject: [PATCH] Added function support to find remoteproc path Added function support to find remoteproc path by firmware string Signed-off-by: Vamsee Narapareddi --- Runner/utils/functestlib.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Runner/utils/functestlib.sh b/Runner/utils/functestlib.sh index 76f744c..b95757e 100755 --- a/Runner/utils/functestlib.sh +++ b/Runner/utils/functestlib.sh @@ -1264,6 +1264,19 @@ dt_has_remoteproc_fw() { return 1 } +# Find remoteproc path by firmware substring +get_remoteproc_path_by_firmware() { + name="$1" + idx="" + path="" + idx=$(cat /sys/class/remoteproc/remoteproc*/firmware 2>/dev/null | grep -n "$name" | cut -d: -f1 | head -n1) + [ -z "$idx" ] && return 1 + idx=$((idx - 1)) + path="/sys/class/remoteproc/remoteproc${idx}" + [ -d "$path" ] && echo "$path" && return 0 + return 1 +} + # Get remoteproc state get_remoteproc_state() { rp="$1"