From b61712a01cca1dd99981985d60ec107183c99722 Mon Sep 17 00:00:00 2001 From: Nick Anstee Date: Fri, 10 May 2024 18:05:30 +0200 Subject: [PATCH] Functional UART logging both inside and outside dev container Adds minicom and sudo to the docker image Switches the shebang line to bash to fix a bug in uart_log.sh when inside the container (-n option to read requires bash) --- Dockerfile | 5 +++++ uart_log.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50beb99..32b8684 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,11 @@ RUN apt-get update \ && curl \ https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-$(arch)-linux.tar.bz2 | tar -xj -C /src/ +RUN apt-get update \ + && apt-get install -y \ + minicom \ + sudo + ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin" COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool COPY . /usr/src diff --git a/uart_log.sh b/uart_log.sh index 3ae39c7..72f71c7 100755 --- a/uart_log.sh +++ b/uart_log.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash rightbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if00 leftbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if02