diff --git a/example/renode/Dockerfile b/example/renode/Dockerfile new file mode 100644 index 00000000..39a8976e --- /dev/null +++ b/example/renode/Dockerfile @@ -0,0 +1,22 @@ +FROM debian:11.5-slim + +RUN apt-get update --yes && \ + apt-get upgrade --yes && \ + apt-get install --yes --no-install-recommends \ + ca-certificates \ + build-essential \ + git python gcc gcc-arm-none-eabi libnewlib-arm-none-eabi \ + vim \ + && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + + +RUN useradd --create-home -d /home/tiny --shell /bin/bash --password tiny tiny +USER tiny +WORKDIR /home/tiny + +COPY --chown=tiny:tiny . ./renode + +WORKDIR /home/tiny/renode +RUN make diff --git a/example/renode/README.md b/example/renode/README.md new file mode 100644 index 00000000..b5dd04ae --- /dev/null +++ b/example/renode/README.md @@ -0,0 +1,23 @@ +# Renode example + +https://interrupt.memfault.com/blog/intro-to-renode + + +## Docker build container + + +### Build renode minimal example + +Create a minimal docker image that contains everything to build +the binary. The binary is build during the creation of the image. + +> docker build --progress=plain -t renode . + + +### Get example to host + +Start the container with +> docker run --mount src="$(pwd)",target=/mnt,type=bind -it renode /bin/bash + +In the container go into folder renode and copy the build binary to the host. +> cp renode-example.elf /mnt