Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,31 @@ if [ -n "$VIDEO_APP" ] && [ -f "$VIDEO_APP" ] && [ ! -x "$VIDEO_APP" ]; then
fi
fi

# Decide final app path: if --app given, require it; otherwise try default path, else PATH
# ---- Default firmware path for Kodiak downstream if CLI not given ----
if [ -z "${VIDEO_FW_DS:-}" ]; then
default_fw="/data/vendor/iris_test_app/firmware/vpu20_1v.mbn"
if [ -f "$default_fw" ]; then
VIDEO_FW_DS="$default_fw"
export VIDEO_FW_DS
log_info "Using default downstream firmware path: $VIDEO_FW_DS"
fi
fi

# Decide final app path: if --app given, require it; otherwise search PATH, /usr/bin, /data/vendor/iris_test_app
final_app=""

if [ -n "$VIDEO_APP" ] && [ -x "$VIDEO_APP" ]; then
final_app="$VIDEO_APP"
else
if [ "$VIDEO_APP" = "/usr/bin/iris_v4l2_test" ]; then
if command -v iris_v4l2_test >/dev/null 2>&1; then
final_app="$(command -v iris_v4l2_test)"
if command -v iris_v4l2_test >/dev/null 2>&1; then
final_app="$(command -v iris_v4l2_test)"
else
if [ -x "/usr/bin/iris_v4l2_test" ]; then
final_app="/usr/bin/iris_v4l2_test"
else
if [ -x "/data/vendor/iris_test_app/iris_v4l2_test" ]; then
final_app="/data/vendor/iris_test_app/iris_v4l2_test"
fi
fi
fi
fi
Expand Down
45 changes: 22 additions & 23 deletions Runner/utils/lib_video.sh
Original file line number Diff line number Diff line change
Expand Up @@ -451,42 +451,41 @@ video_normalize_stack() {
video_detect_platform() {
model=""
compat=""

if [ -r /proc/device-tree/model ]; then
model=$(tr -d '\000' </proc/device-tree/model 2>/dev/null)
fi

if [ -r /proc/device-tree/compatible ]; then
compat=$(tr -d '\000' </proc/device-tree/compatible 2>/dev/null)
fi

s=$(printf '%s\n%s\n' "$model" "$compat" | tr '[:upper:]' '[:lower:]')

echo "$s" | grep -q "qcs9100" && {
printf '%s\n' "lemans"
return 0
}
echo "$s" | grep -q "qcs8300" && {
printf '%s\n' "monaco"
return 0
}
echo "$s" | grep -q "qcs6490" && {
printf '%s\n' "kodiak"
return 0
}
echo "$s" | grep -q "ride-sx" && echo "$s" | grep -q "9100" && {

# Monaco: qcs8300-ride, iq-8275-evk, qcs8275, generic qcs8300, or ride-sx+8300
monaco_pat='qcs8300-ride|iq-8275-evk|qcs8275|qcs8300|ride-sx.*8300|8300.*ride-sx'

# LeMans: qcs9100-ride, qcs9075, generic qcs9100, or ride-sx+9100
lemans_pat='qcs9100-ride|qcs9075|qcs9100|ride-sx.*9100|9100.*ride-sx'

# Kodiak: qcs6490, qcm6490, or rb3+6490
kodiak_pat='qcs6490|qcm6490|rb3.*6490|6490.*rb3'

if printf '%s' "$s" | grep -Eq "$lemans_pat"; then
printf '%s\n' "lemans"
return 0
}
echo "$s" | grep -q "ride-sx" && echo "$s" | grep -q "8300" && {
fi

if printf '%s' "$s" | grep -Eq "$monaco_pat"; then
printf '%s\n' "monaco"
return 0
}
echo "$s" | grep -q "rb3" && echo "$s" | grep -q "6490" && {
fi

if printf '%s' "$s" | grep -Eq "$kodiak_pat"; then
printf '%s\n' "kodiak"
return 0
}

fi
printf '%s\n' "unknown"
}

Expand Down
Loading