From 6d7f5f31899a4113f2fa343cea391aba156c1334 Mon Sep 17 00:00:00 2001 From: Ferry Toth Date: Fri, 3 Jan 2020 19:45:31 +0100 Subject: [PATCH] clloader: silence when ttyGS0 not found Signed-off-by: Ferry Toth --- .../recipes-devtools/clloader/clloader.bb | 3 +- ...loader-silence-when-ttyGS0-not-found.patch | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 meta-intel-arduino/recipes-devtools/clloader/files/0001-clloader-silence-when-ttyGS0-not-found.patch diff --git a/meta-intel-arduino/recipes-devtools/clloader/clloader.bb b/meta-intel-arduino/recipes-devtools/clloader/clloader.bb index 209b201b..ee0af259 100644 --- a/meta-intel-arduino/recipes-devtools/clloader/clloader.bb +++ b/meta-intel-arduino/recipes-devtools/clloader/clloader.bb @@ -8,7 +8,8 @@ TARGET_CC_ARCH += "${LDFLAGS}" SRC_URI = "git://github.com/01org/clloader.git;protocol=https;branch=edison \ file://clloader.service \ - file://sketch_reset.service" + file://sketch_reset.service \ + file://0001-clloader-silence-when-ttyGS0-not-found.patch" SRCREV = "ef2fe0ae9f7fba836df696441fd9053ed07b770e" diff --git a/meta-intel-arduino/recipes-devtools/clloader/files/0001-clloader-silence-when-ttyGS0-not-found.patch b/meta-intel-arduino/recipes-devtools/clloader/files/0001-clloader-silence-when-ttyGS0-not-found.patch new file mode 100644 index 00000000..e65ed373 --- /dev/null +++ b/meta-intel-arduino/recipes-devtools/clloader/files/0001-clloader-silence-when-ttyGS0-not-found.patch @@ -0,0 +1,33 @@ +From 899539d94608574de1e12b8ba57c741e01468fe2 Mon Sep 17 00:00:00 2001 +From: Ferry Toth +Date: Fri, 3 Jan 2020 19:38:54 +0100 +Subject: [PATCH] clloader: silence when ttyGS0 not found + +When /dev/ttyGS0 not found do not spam syslog. With Yocto Warrior the device is +only created with the USB in gadged mode. + +Signed-off-by: Ferry Toth +--- + scripts/launcher.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/scripts/launcher.sh b/scripts/launcher.sh +index af4f785..73d0bf0 100644 +--- a/scripts/launcher.sh ++++ b/scripts/launcher.sh +@@ -14,8 +14,10 @@ trap 'mytrap' USR1 + keepgoing=true + while $keepgoing + do +- $CLLOADER $CLLOADER_OPTS < /dev/ttyGS0 > /dev/ttyGS0 & clPID=$! +- wait $clPID ++ if [ -f /dev/ttyGS0 ]; then ++ $CLLOADER $CLLOADER_OPTS < /dev/ttyGS0 > /dev/ttyGS0 & clPID=$! ++ wait $clPID ++ fi + usleep 200000 + done + +-- +2.20.1 +