Build firmware with Docker (#8)

Dockerfile and script to quickly build the firmware without the need to configure a local environment and keep it as a baseline for development.
This commit is contained in:
nrlourenco 2023-08-15 09:08:55 +01:00 committed by GitHub
parent 37afa8c956
commit 44b2abd68e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM archlinux:latest
WORKDIR /app
COPY . .
RUN pacman -Syyu base-devel --noconfirm
RUN pacman -Syyu arm-none-eabi-gcc --noconfirm
RUN pacman -Syyu arm-none-eabi-newlib --noconfirm
RUN pacman -Syyu git --noconfirm
RUN git submodule update --init --recursive
#RUN make && cp firmware* compiled-firmware/

3
compile-with-docker.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker build -t uvk5 .
docker run -v $(PWD)/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"