Skip to content

Commit

Permalink
RSDK-4695 - installer CLI part 3: implement write and flash (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaradarajan authored Aug 31, 2023
1 parent 7df5d0a commit 7625e78
Show file tree
Hide file tree
Showing 6 changed files with 1,080 additions and 20 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
SHELL := /bin/bash
ESPFLASHVERSION = $(shell expr `cargo espflash -V | grep ^cargo-espflash | sed 's/^.* //g' | cut -f1 -d. ` \< 2)

DATE := $(shell date +%F)
IMAGE_BASE = ghcr.io/viamrobotics/micro-rdk-dev-env

buf-clean:
find src/gen -type f \( -iname "*.rs" \) -delete

Expand Down Expand Up @@ -83,3 +86,23 @@ ifneq (,$(wildcard ./examples/target/esp32-server.bin))
else
$(error esp32-server.bin not found, run build-esp32-bin first)
endif

canon-image: canon-image-amd64 canon-image-arm64

canon-image-amd64:
cd etc/docker && docker buildx build . --load --no-cache --platform linux/amd64 -t $(IMAGE_BASE):amd64

canon-image-arm64:
cd etc/docker && docker buildx build . --load --no-cache --platform linux/arm64 -t $(IMAGE_BASE):arm64

canon-upload: canon-upload-amd64 canon-upload-arm64

canon-upload-amd64:
docker tag $(IMAGE_BASE):amd64 $(IMAGE_BASE):amd64_$(DATE)
docker push $(IMAGE_BASE):amd64
docker push $(IMAGE_BASE):amd64_$(DATE)

canon-upload-arm64:
docker tag $(IMAGE_BASE):arm64 $(IMAGE_BASE):arm64_$(DATE)
docker push $(IMAGE_BASE):arm64
docker push $(IMAGE_BASE):arm64_$(DATE)
2 changes: 1 addition & 1 deletion etc/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/

RUN apt update

RUN apt-get install -y --no-install-recommends git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 openssh-client software-properties-common sudo && \
RUN apt-get install -y --no-install-recommends git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev libudev-dev dfu-util libusb-1.0-0 openssh-client software-properties-common sudo && \
apt-add-repository 'deb http://deb.debian.org/debian bullseye-backports main' && \
apt update && \
apt-get install -y --no-install-recommends cmake/bullseye-backports && \
Expand Down
Loading

0 comments on commit 7625e78

Please sign in to comment.