Skip to content

Commit

Permalink
clloader: silence when ttyGS0 not found
Browse files Browse the repository at this point in the history
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
  • Loading branch information
htot committed Jan 3, 2020
1 parent 3efd0e0 commit 6d7f5f3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meta-intel-arduino/recipes-devtools/clloader/clloader.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 899539d94608574de1e12b8ba57c741e01468fe2 Mon Sep 17 00:00:00 2001
From: Ferry Toth <ftoth@exalondelft.nl>
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 <ftoth@exalondelft.nl>
---
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

0 comments on commit 6d7f5f3

Please sign in to comment.