updated for newer zmk version with built-in mouse key support
This commit is contained in:
parent
4e3b75ec6a
commit
3f948e5c31
44
Dockerfile
44
Dockerfile
|
@ -1,30 +1,30 @@
|
|||
from ubuntu:22.04
|
||||
|
||||
env ZSDK_VERSION=0.13.2
|
||||
|
||||
run apt update
|
||||
run apt install -y \
|
||||
git \
|
||||
wget \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
ccache \
|
||||
device-tree-compiler \
|
||||
dfu-util \
|
||||
g++ \
|
||||
gcc \
|
||||
libtool \
|
||||
make \
|
||||
ninja-build \
|
||||
cmake \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
xz-utils
|
||||
run apt upgrade -y
|
||||
run DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
|
||||
run wget -O - https://apt.kitware.com/kitware-archive.sh | bash
|
||||
run pip3 install -U west
|
||||
|
||||
run groupadd -g 1000 builder
|
||||
run useradd -m -u 1000 -g 1000 -s /bin/bash builder
|
||||
user builder
|
||||
workdir /home/builder
|
||||
|
||||
run git clone https://github.com/zmkfirmware/zmk.git
|
||||
workdir /home/builder/zmk
|
||||
run west init -l app/
|
||||
run west update
|
||||
|
||||
user root
|
||||
run pip3 install -r /home/builder/zmk/zephyr/scripts/requirements.txt
|
||||
workdir /usr/local
|
||||
run wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/zephyr-sdk-0.16.3_linux-x86_64.tar.xz
|
||||
run tar xvf zephyr-sdk-0.16.3_linux-x86_64.tar.xz
|
||||
run rm zephyr-sdk-0.16.3_linux-x86_64.tar.xz
|
||||
workdir /usr/local/zephyr-sdk-0.16.3
|
||||
run ./setup.sh -t all -h
|
||||
|
||||
user builder
|
||||
run ./setup.sh -t all -c
|
||||
workdir /home/builder/zmk/app
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
1. Run `build-env.sh`
|
||||
- checks out a fresh `zmk` and applies patches
|
||||
- creates and initializes a `zmk` docker image to use for builds
|
||||
1. Run `docker build -t zmk .`
|
||||
|
||||
2. Run `build-zmk.sh`
|
||||
2. Run `./build-zmk.sh`
|
||||
- uses the `zmk` image to build left and right binaries
|
||||
|
||||
3. Run `flash.sh`
|
||||
3. Run `./flash.sh`
|
||||
- flashes the binaries
|
||||
|
|
27
build-env.sh
27
build-env.sh
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rm -rf zmk
|
||||
docker build -t zmk .
|
||||
|
||||
git clone https://github.com/zmkfirmware/zmk.git
|
||||
for p in ./patches/*.patch; do
|
||||
patch -d zmk/ -p1 < "$p"
|
||||
done
|
||||
|
||||
docker run -it --rm -d --name zmk \
|
||||
-v "$(pwd)/zmk:/home/builder/zmk" \
|
||||
-v "$(pwd)/config:/home/builder/zmk-config" \
|
||||
zmk
|
||||
|
||||
docker exec -it zmk \
|
||||
bash -c 'export PATH=~/.local/bin:$PATH && \
|
||||
pip3 install -U west pyelftools && \
|
||||
wget "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZSDK_VERSION}/zephyr-toolchain-arm-${ZSDK_VERSION}-linux-x86_64-setup.run" && \
|
||||
sh "zephyr-toolchain-arm-${ZSDK_VERSION}-linux-x86_64-setup.run" --quiet -- -d ~/.local/zephyr-sdk-${ZSDK_VERSION} && \
|
||||
rm "zephyr-toolchain-arm-${ZSDK_VERSION}-linux-x86_64-setup.run" && \
|
||||
cd /home/builder/zmk && west init -l app/ && west update && \
|
||||
west zephyr-export && pip3 install --user -r zephyr/scripts/requirements-base.txt'
|
||||
|
||||
docker commit zmk zmk
|
||||
docker rm -vf zmk
|
||||
docker system prune -f
|
|
@ -1,12 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
docker run -it --rm \
|
||||
-v "$(pwd)/zmk:/home/builder/zmk" \
|
||||
-v "$(pwd)/config:/home/builder/zmk-config" \
|
||||
-v "$(pwd)/out:/home/builder/out" \
|
||||
zmk bash -c 'export PATH="~/.local/bin:$PATH" && \
|
||||
source /home/builder/zmk/zephyr/zephyr-env.sh && \
|
||||
cd /home/builder/zmk/app && \
|
||||
zmk bash -c '
|
||||
west build --pristine -b nice_nano_v2 -- -DZMK_CONFIG=/home/builder/zmk-config -DSHIELD=corne_left && \
|
||||
cp build/zephyr/zmk.uf2 ~/out/corne_left.uf2 && \
|
||||
west build --pristine -b nice_nano_v2 -- -DZMK_CONFIG=/home/builder/zmk-config -DSHIELD=corne_right && \
|
||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue