diff --git a/Documentation/how-to-build.rst b/Documentation/how-to-build.rst index 781fc44a1920309b82f63a13b61dc3f1c12d5657..b152bf75f58bc22170a040547b3e441d096b4439 100644 --- a/Documentation/how-to-build.rst +++ b/Documentation/how-to-build.rst @@ -183,3 +183,25 @@ Otherwise, rerunning ``./bootstrap.sh`` will also clean the build-directory. (it's supposed to create a large file with 0xff in it) - this requires the LC_ALL environment variable to be not set, or set to "C" (but not UTF8 or similar). + +Docker +====== +Alternatively, clone the ``master`` branch of the firmware repository and enter it: + +.. code-block:: shell-session + + $ git clone https://git.card10.badge.events.ccc.de/card10/firmware.git + $ cd firmware + +Afterwards, build a docker-container which will build the firmware via: + +.. code-block:: shell-session + + $ docker build -f docker/Dockerfile_fwbuild -t card10-firmware-builder . + +Now, you can start the container with the firmware directory mounted, which will build the +firmware into the firmware/build directory: + +.. code-block:: shell-session + + $ docker run -v $(pwd):/firmware card10-firmware-builder diff --git a/docker/Dockerfile_fwbuild b/docker/Dockerfile_fwbuild new file mode 100644 index 0000000000000000000000000000000000000000..6845cb52fb3715dc885ec5670e38cb40b41c3e31 --- /dev/null +++ b/docker/Dockerfile_fwbuild @@ -0,0 +1,10 @@ +FROM ubuntu + +RUN apt-get update && apt-get -y install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi python3 python3-pip ninja-build git + +RUN pip3 install meson crc16 pillow + +VOLUME /firmware +WORKDIR /firmware + +CMD ./bootstrap.sh && ninja -C build && chown -R --reference=/firmware build