Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sjg20 committed Jun 8, 2024
1 parent 92676fe commit 7079d06
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions contrib/u-boot/get_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ export build_dir=
# limit the number of active buildman processors
export process_limit=2

# debug flag for labgrid
export debug=

while getopts "${allowed_args}" opt; do
case $opt in
d )
build_dir="$OPTARG"
;;
D )
debug=-d
;;
c )
clean=1
;;
Expand Down
6 changes: 4 additions & 2 deletions contrib/u-boot/ub-cli
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ usage() {
echo "Usage: ub-cli [-csv] <target>"
echo " -B Don't build U-Boot"
echo " -c Run 'make mrproper' before building"
echo " -d Set build directory"
echo " -D Enable debugging"
echo " -h Help"
echo " -s Send over USB (instead of writing to boot media)"
echo " -T Don't bootstrap U-Boot"
Expand All @@ -23,11 +25,11 @@ mydir=$(dirname $0)

. ${mydir}/lg-env

allowed_args="BchsTv"
allowed_args="BcDhsTv"
. ${mydir}/get_args.sh

ret=0
labgrid-client ${V} ${vars} -r ${target} -s uboot -a console || ret=$?
labgrid-client ${V} ${debug} ${vars} -r ${target} -s uboot -a console || ret=$?

labgrid-client ${V} -r "${target}" release -a

Expand Down
5 changes: 3 additions & 2 deletions contrib/u-boot/ub-int
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ usage() {
echo " -B Don't build U-Boot"
echo " -c Run 'make mrproper' before building"
echo " -d Set build directory"
echo " -D Enable debugging"
echo " -h Help"
echo " -R Don't reset the board, just connect as is"
echo " -s Send over USB (instead of writing to boot media)"
Expand All @@ -25,11 +26,11 @@ mydir=$(dirname $0)

. ${mydir}/lg-env

allowed_args="d:cBhRsTv"
allowed_args="d:cBDhRsTv"
. ${mydir}/get_args.sh

ret=0
labgrid-client ${V} ${vars} -r ${target} ${strategy} -a console || ret=$?
labgrid-client ${V} ${debug} ${vars} -r ${target} ${strategy} -a console || ret=$?

labgrid-client ${V} -r "${target}" release -a

Expand Down
4 changes: 4 additions & 0 deletions labgrid/util/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
from pexpect import TIMEOUT
from serial.serialutil import SerialException
import termios
import time

Expand Down Expand Up @@ -65,6 +66,9 @@ async def run(serial):
except TIMEOUT:
pass

except SerialException:
break

data = os.read(sys.stdin.fileno(), BUF_SIZE)
if data:
activity = True
Expand Down

0 comments on commit 7079d06

Please sign in to comment.