diff --git a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh index 2f379f6..f9959da 100755 --- a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh +++ b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh @@ -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 diff --git a/Runner/utils/lib_video.sh b/Runner/utils/lib_video.sh index e553550..b75791a 100755 --- a/Runner/utils/lib_video.sh +++ b/Runner/utils/lib_video.sh @@ -451,42 +451,41 @@ video_normalize_stack() { video_detect_platform() { model="" compat="" - + if [ -r /proc/device-tree/model ]; then model=$(tr -d '\000' /dev/null) fi - + if [ -r /proc/device-tree/compatible ]; then compat=$(tr -d '\000' /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" }