Add local build option with Docker and README
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
/firmware/*.uf2
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
FROM zmkfirmware/zmk-build-arm:2.4
|
||||||
|
|
||||||
|
RUN mkdir -p /app/firmware
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY config config
|
||||||
|
COPY bin/build.sh ./
|
||||||
|
|
||||||
|
CMD ["./build.sh"]
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# ADV360-PRO-ZMK
|
||||||
|
|
||||||
|
## To build Firmware in GitHub Actions
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
1. Fork this repo.
|
||||||
|
2. Enable GitHub Actions on your fork.
|
||||||
|
|
||||||
|
### Build firmware
|
||||||
|
|
||||||
|
1. Push a commit to trigger the build.
|
||||||
|
2. Download the artifact.
|
||||||
|
|
||||||
|
## To build Firmware locally using Docker
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
1. Execute `setup.sh`.
|
||||||
|
|
||||||
|
### Build firmware
|
||||||
|
|
||||||
|
1. Execute `run.sh`
|
||||||
|
2. Check the `firmware` directory for the latest firmware build.
|
||||||
Executable
+27
@@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PWD=$(pwd)
|
||||||
|
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
|
||||||
|
|
||||||
|
# West Init
|
||||||
|
west init -l config
|
||||||
|
# West Update
|
||||||
|
west update
|
||||||
|
# West Zephyr export
|
||||||
|
west zephyr-export
|
||||||
|
# West Build (left)
|
||||||
|
west build -s zmk/app -d build/left -b adv360_left -- -DZMK_CONFIG="${PWD}/config"
|
||||||
|
# Adv360 Left DTS File
|
||||||
|
cat -n build/left/zephyr/adv360_left.dts.pre.tmp
|
||||||
|
# Adv360 Left Kconfig file
|
||||||
|
cat build/left/zephyr/.config | grep -v "^#" | grep -v "^$"
|
||||||
|
# West Build (right)
|
||||||
|
west build -s zmk/app -d build/right -b adv360_right -- -DZMK_CONFIG="${PWD}/config"
|
||||||
|
# Adv360 Right DTS File
|
||||||
|
cat -n build/right/zephyr/adv360_right.dts.pre.tmp
|
||||||
|
# Adv360 Right Kconfig file
|
||||||
|
cat build/right/zephyr/.config | grep -v "^#" | grep -v "^$"
|
||||||
|
# Rename zmk.uf2
|
||||||
|
cp build/left/zephyr/zmk.uf2 ./firmware/${TIMESTAMP}-left.uf2 && cp build/right/zephyr/zmk.uf2 ./firmware/${TIMESTAMP}-right.uf2
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
docker run -it --name zmk zmk
|
||||||
|
docker cp zmk:/app/firmware/ ./
|
||||||
|
docker stop zmk
|
||||||
|
docker rm zmk
|
||||||
Reference in New Issue
Block a user