Build system cleanup

master
Mark 2023-12-16 11:21:51 -08:00
parent c0c1312a6b
commit 80276758fd
No known key found for this signature in database
GPG Key ID: B4DF96450FAAD9F2
6 changed files with 26 additions and 49 deletions

17
Makefile Executable file
View File

@ -0,0 +1,17 @@
default:
@mkdir -p "$$(pwd)/output"
docker run -it --rm \
--user $$(id -u):$$(id -g) \
-v "$$(pwd)/output:/build_output" \
-v "$$(pwd)/keyboards:/qmk_firmware/keyboards:ro" \
-e QMK_TARGET="betalupi_ergodox:default" \
git.betalupi.com/mark/qmk
upload:
wally-cli output/betalupi_ergodox_default.hex
docker:
docker build docker -t git.betalupi.com/mark/qmk
.PHONY: docker upload default

View File

@ -2,17 +2,14 @@
This repository contains my keyboards' firmware and everything you need to build it. It includes a docker container for building QMK firmware, since QMK installation modifies my computer a bit more than I'd like.
## Usage
You do not need a local install of QMK to build this firmware.
You'll need docker, but there's a good chance you have that installed anyway.
1. `cd` into [`./docker`](./docker) and build the container.
2. `mkdir ./output`
3. Run `./build.sh`.
4. Upload the firmware in `./output` to your keyboard using the proper tool.
- `wally-cli` works pretty well for the `betalupi_ergodox`
## Todo
- FFT Animation: clear leds on sleep
1. `make docker`
2. `make`
3. `make upload`
Read [`Makefile`](./Makefile) for details.

View File

@ -1,18 +0,0 @@
#!/bin/bash
# Uses the docker container defined in
# the `docker` directory of this repo.
# Run from the root directory of this repo.
# Targets in this repo:
# betalupi_ergodox:default
#
# Usage:
# bash build.sh betalupi_ergodox:default
docker run -it --rm \
--user $(id -u):$(id -g) \
-v "$(pwd)/output:/build_output" \
-v "$(pwd)/keyboards:/qmk_firmware/keyboards:ro" \
-e QMK_TARGET="$1" \
git.betalupi.com/mark/qmk

View File

@ -1,15 +0,0 @@
root = false
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
[qmk_cli/*]
indent_style = space
[qmk_firmware/*]
indent_style = space

View File

@ -74,10 +74,4 @@ WORKDIR /qmk_firmware
ENV SKIP_GIT true
COPY entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
# How to use:
# docker run -it \
# --user 1000:1001 \
# -v "$(pwd)/kb:/qmk_firmware/keyboards" \
#
CMD ["/bin/bash", "/entrypoint.sh"]

View File

@ -9,4 +9,6 @@ make $QMK_TARGET
# Move output files to output directory.
# These are the only extensions qmk can produce,
# as far as I know.
mv *.{bin,hex,uf2} /build_output > /dev/null 2>&1
mv *.{bin,hex,uf2} /build_output > /dev/null 2>&1
exit 0