From 471d605f9e4173a37a41e83c21f07c114e216085 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Fri, 17 Mar 2023 13:48:34 +0100 Subject: [PATCH] ti-calibrator-wl18xxx: Make bt script compatible with OEM linux cli is not available on OEM linux, but we can just ignore this part of the code since what it does it already done at boot-time in OEM linux. id:376256 (cherry picked from commit b1a8cc203af4281a86f93fbcdefe80391d08c050) --- .../ti-calibrator-wl18xx/btgod-ng | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/recipes-testing/ti-calibrator-wl18xx/ti-calibrator-wl18xx/btgod-ng b/recipes-testing/ti-calibrator-wl18xx/ti-calibrator-wl18xx/btgod-ng index a9f8c80..2aebc36 100644 --- a/recipes-testing/ti-calibrator-wl18xx/ti-calibrator-wl18xx/btgod-ng +++ b/recipes-testing/ti-calibrator-wl18xx/ti-calibrator-wl18xx/btgod-ng @@ -262,17 +262,22 @@ while getopts a:c:f:hi:m:p:r:s:t: OPT; do done shift $(expr $OPTIND - 1) -cli set bluez.0.status=2 bluez.1.status=2 -sleep 1 -echo "configure hci interface please wait" -for i in $(seq 0 240); do - cnt=$(ls /tmp/progress | wc -l) - if [ $cnt -eq 0 ]; then - break - fi - echo -n ".." +if which cli &>/dev/null; then + # CLI is not available on OEM linux and this part of + # the code is not required. + + cli set bluez.0.status=2 bluez.1.status=2 sleep 1 -done + echo "configure hci interface please wait" + for i in $(seq 0 240); do + cnt=$(ls /tmp/progress | wc -l) + if [ $cnt -eq 0 ]; then + break + fi + echo -n ".." + sleep 1 + done +fi btgod_stop