From 224fc57582268e91b488ec69ebd5219af648421e Mon Sep 17 00:00:00 2001 From: Eleon Date: Sun, 3 Oct 2021 02:02:26 +0200 Subject: [PATCH] Adding flash_docker function --- Makefile | 5 +++++ docker/firmware/Dockerfile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8fafbe1..e298e7a 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ clean: +@make -C firmware clean +@make -C pcb clean +flash_docker: + sh -c "docker build -t fiatlux_firmware_env docker/firmware" + sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware --device=/dev/ttyUSB0 fiatlux_firmware_env make -C firmware flash" + + firmware_docker: sh -c "docker build -t fiatlux_firmware_env docker/firmware" sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware fiatlux_firmware_env make -C firmware all" diff --git a/docker/firmware/Dockerfile b/docker/firmware/Dockerfile index 582fe2f..825fa4f 100644 --- a/docker/firmware/Dockerfile +++ b/docker/firmware/Dockerfile @@ -8,6 +8,6 @@ RUN cd app/modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT= USER 0 RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial perl RUN apt install -y --reinstall python-is-python3 -USER 1000 +USER 0 WORKDIR /app -ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH \ No newline at end of file +ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH