Convenience script for ZMODEM upload Change-Id: I1d84554f813106a3aaed1567d6e591ba559e3e54
diff --git a/install-prereqs.sh b/install-prereqs.sh index 6f92368..6da5bb5 100755 --- a/install-prereqs.sh +++ b/install-prereqs.sh
@@ -62,6 +62,7 @@ ninja-build perl protobuf-compiler + pv python-dev python3-protobuf python3
diff --git a/kupload.sh b/kupload.sh new file mode 100755 index 0000000..fdf44d6 --- /dev/null +++ b/kupload.sh
@@ -0,0 +1,10 @@ +#!/bin/bash +# ZMODEM upload to the Kata rz command over the pty simulating the UART +# +# sz is "send ZMODEM", while pv, "pipe viewer" is used for rate limiting. +# +# Severe rate limiting is needed to avoid the Renode UART simulation dropping +# bytes when the RX FIFO is full, since it doesn't provide "hardware" flow +# control. + +sz -O $1 < /tmp/term | pv -L 150 > /tmp/term