Skip to content

Commit eee1273

Browse files
committed
Add build-step
1 parent 91a91e6 commit eee1273

5 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build firmware
2+
3+
on:
4+
push:
5+
6+
pull_request:
7+
8+
jobs:
9+
10+
build:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 20
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Build docker image
17+
run: make lxr-docker-builder
18+
19+
- name: Build firmware
20+
run: |
21+
make firmware-docker
22+
tar -czvf firmware.tar.gz firmware\ image/FIRMWARE.BIN
23+
24+
- name: Archive firmware
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: Firmware binary
28+
if-no-files-found: error
29+
path: firmware.tar.gz

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*.bin
2929
*.lss
3030

31+
tools/bin/
32+
3133
!firmware image/FIRMWARE.BIN
3234

3335
#eclipse staging areas

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:trusty
2+
3+
RUN mkdir installing \
4+
&& cd installing \
5+
&& apt-get update \
6+
&& apt-get install curl gcc-avr avr-libc lib32ncurses5 cpio build-essential make --yes \
7+
&& curl -OL https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2
8+
9+
WORKDIR installing
10+
11+
RUN tar xvjf gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2 \
12+
&& mv gcc-arm-none-eabi-4_8-2014q1 /opt/ARM \
13+
&& rm gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2
14+
15+
ENV PATH="/opt/ARM/bin:${PATH}"
16+
17+
WORKDIR /app

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ clean:
5555
.PHONY: firmware
5656
firmware: $(IMAGE)
5757

58+
.PHONY: lxr-docker-builder
59+
lxr-docker-builder:
60+
docker build -t lxr-docker-builder .
61+
62+
.PHONY: firmware-docker
63+
firmware-docker: lxr-docker-builder
64+
docker run -v ${PWD}:/app lxr-docker-builder:latest make firmware
65+
5866
$(IMAGE): $(ARM_BINARY) $(AVR_BINARY) $(FIB)
5967
@echo "Building final firmware image $@..."
6068
$(AT)$(FIB) $(ARM_BINARY) $(AVR_BINARY) "$@"

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Please note that there are libraries from ST and ARM used in the mainboard code
1919

2020
Many Thanks to user Rudeog who contributet a lot of bugfixes and features for version 0.26 and 0.33 as well as Patrick Dowling for the Makefiles for the Linux build system!
2121

22+
To build the firmware in docker follow these instructions:
23+
----------------------------------------------------------------
24+
You will need:
25+
- docker
26+
27+
```sh
28+
make firmware-docker
29+
```
2230

2331

2432
Instructions for building on Linux using the provided makefiles:

0 commit comments

Comments
 (0)