docs: add script usage to readme
This commit is contained in:
parent
6d4a3542f0
commit
bbfcf3c910
1 changed files with 8 additions and 21 deletions
29
README.md
29
README.md
|
|
@ -9,6 +9,7 @@ in progress...
|
||||||
- no visible screws from the top
|
- no visible screws from the top
|
||||||
- no visible seams from the top
|
- no visible seams from the top
|
||||||
- custom graphics and silk screen
|
- custom graphics and silk screen
|
||||||
|
- super easy, local zmk development
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -67,32 +68,18 @@ Usually ZMK is compiled throug a GitHub actions workflow. However, I prefer to u
|
||||||
|
|
||||||
## Setting up the ZMK docker toolchain
|
## Setting up the ZMK docker toolchain
|
||||||
```bash
|
```bash
|
||||||
cd <path-to-phiboard>
|
|
||||||
nix develop # or install devcontainer cli otherwise
|
nix develop # or install devcontainer cli otherwise
|
||||||
docker volume create --driver local -o o=bind -o type=none -o device="<absolute-path-to-phiboard>/firmware/zmk-config/" zmk-config
|
cd <path-to-phiboard>/firmware
|
||||||
git clone https://github.com/zmkfirmware/zmk.git firmware/zmk
|
./setup-zmk.sh # this may take a while
|
||||||
devcontainer up --workspace-folder firmware/zmk
|
|
||||||
docker ps -a # get zmk container name
|
|
||||||
docker exec -it <zmk-container-name> /usr/bin/env bash
|
|
||||||
# now from within container
|
|
||||||
cd /workspaces/zmk
|
|
||||||
west init -l app/
|
|
||||||
west update
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compiling the ZMK firmware
|
## Compiling the ZMK firmware
|
||||||
```bash
|
```bash
|
||||||
# enter the docker container
|
nix develop # or install devcontainer cli otherwise
|
||||||
docker ps -a # get zmk container name
|
cd <path-to-phiboard>/firmware
|
||||||
docker exec -it <zmk-container-name> /usr/bin/env bash
|
./build.sh # clean build, is needed the first time
|
||||||
# now from within the container
|
./build.sh --cached # faster, if a build has been done before
|
||||||
cd /workspaces/zmk/app
|
# the firmware is now located at <path-to-phiboard>/firmware/(left|right).uf2
|
||||||
rm -rf build/
|
|
||||||
west build -p -d build/left -b seeeduino_xiao_ble -- -DSHIELD=phiboard_left -DZMK_CONFIG="/workspaces/zmk-config"
|
|
||||||
west build -p -d build/right -b seeeduino_xiao_ble -- -DSHIELD=phiboard_right -DZMK_CONFIG="/workspaces/zmk-config"
|
|
||||||
cp build/left/zephyr/zmk.uf2 build/left.uf2
|
|
||||||
cp build/right/zephyr/zmk.uf2 build/right.uf2
|
|
||||||
# the firmware can now be accessed outside the docker container at <path-to-phiboard>/firmware/zmk/app/build/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Flashing the firmware
|
## Flashing the firmware
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue