Compare commits
3 Commits
6e84592338
...
1c213ed8da
Author | SHA1 | Date | |
---|---|---|---|
1c213ed8da | |||
065ab5b166 | |||
7082172bc4 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,5 +1,3 @@
|
|||||||
/venv
|
output
|
||||||
/build
|
|
||||||
qmk/qmk.conf
|
|
||||||
|
|
||||||
secrets.h
|
secrets.h
|
10
.gitmodules
vendored
10
.gitmodules
vendored
@ -1,10 +0,0 @@
|
|||||||
[submodule "qmk/qmk_fw"]
|
|
||||||
path = qmk/qmk_fw
|
|
||||||
url = ssh://git@git.betalupi.com:33/mirrors-QMK/qmk_firmware.git
|
|
||||||
[submodule "qmk/qmk_cli"]
|
|
||||||
path = qmk/qmk_cli
|
|
||||||
url = ssh://git@git.betalupi.com:33/mirrors-QMK/qmk_cli.git
|
|
||||||
[submodule "qmk_cli"]
|
|
||||||
url = ssh://git@git.betalupi.com:33/QMK/qmk_cli.git
|
|
||||||
[submodule "qmk_fw"]
|
|
||||||
url = ssh://git@git.betalupi.com:33/QMK/qmk_firmware.git
|
|
85
Makefile
85
Makefile
@ -1,85 +0,0 @@
|
|||||||
QMK_REPO := ssh://git@git.betalupi.com:33/Mark/qmk_betalupi.git
|
|
||||||
|
|
||||||
# QMK command
|
|
||||||
QMK_CONF := $(shell pwd)/qmk/qmk.conf
|
|
||||||
QMK := qmk --config-file $(QMK_CONF)
|
|
||||||
|
|
||||||
# Where to create venv
|
|
||||||
VENV := $(shell pwd)/venv
|
|
||||||
|
|
||||||
# Where to build firmware
|
|
||||||
BUILD_DIR := $(shell pwd)/build
|
|
||||||
|
|
||||||
# Path to submodules
|
|
||||||
QMK_CLI := $(shell pwd)/qmk/qmk_cli
|
|
||||||
QMK_DIR := $(shell pwd)/qmk/qmk_fw
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: git-submodule
|
|
||||||
git-submodule:
|
|
||||||
@git submodule sync --recursive
|
|
||||||
@git submodule update --init --recursive --progress
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
|
|
||||||
# Link keyboards into qmk_fw
|
|
||||||
KEYBOARDS := $(notdir $(shell find keyboards -maxdepth 1 -mindepth 1 -type d))
|
|
||||||
.PHONY: $(KEYBOARDS)
|
|
||||||
$(KEYBOARDS):
|
|
||||||
@echo "Linking keyboards into $(QMK_DIR)/keyboards..."
|
|
||||||
@ln -sT \
|
|
||||||
$(shell pwd)/keyboards/$@ \
|
|
||||||
$(QMK_DIR)/keyboards/$@
|
|
||||||
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
# Clone all repos and configure qmk
|
|
||||||
.PHONY: setup
|
|
||||||
setup: git-submodule $(KEYBOARDS)
|
|
||||||
@echo "Preparing venv..."
|
|
||||||
@python -m venv $(VENV) --prompt=qmk_venv
|
|
||||||
|
|
||||||
@echo "Building and installing qmk_cli"
|
|
||||||
@source $(VENV)/bin/activate && \
|
|
||||||
cd $(QMK_CLI) && \
|
|
||||||
python3 -m pip install build --quiet && \
|
|
||||||
python3 -m build > /dev/null && \
|
|
||||||
python3 -m pip install $$(find dist -name 'qmk-*.tar.gz') --quiet
|
|
||||||
|
|
||||||
@echo ""
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
@source $(VENV)/bin/activate && \
|
|
||||||
$(QMK) config user.qmk_home=$(QMK_DIR) && \
|
|
||||||
$(QMK) doctor
|
|
||||||
|
|
||||||
|
|
||||||
# Undo all changes done in setup
|
|
||||||
.PHONY: unsetup
|
|
||||||
unsetup:
|
|
||||||
-rm -drf $(VENV) $(BUILD_DIR)
|
|
||||||
-rm $(QMK_CONF)
|
|
||||||
-rm -dr $(QMK_CLI)/dist $(QMK_CLI)/qmk.egg-info
|
|
||||||
-rm $(KEYBOARDS:%=$(QMK_DIR)/keyboards/%)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Compile and flash a keyboard
|
|
||||||
.PHONY: flash
|
|
||||||
flash:
|
|
||||||
@source $(VENV)/bin/activate && \
|
|
||||||
$(QMK) flash \
|
|
||||||
-e AVR_CFLAGS="-Wno-array-bounds" \
|
|
||||||
-e BUILD_DIR=$(BUILD_DIR) \
|
|
||||||
-kb betalupi_ergodox \
|
|
||||||
-km default
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Compile and flash a keyboard
|
|
||||||
.PHONY: comp-db
|
|
||||||
comp-db:
|
|
||||||
@source $(VENV)/bin/activate && \
|
|
||||||
$(QMK) generate-compilation-database \
|
|
||||||
-kb betalupi_ergodox \
|
|
||||||
-km default
|
|
18
README.md
18
README.md
@ -13,22 +13,8 @@ This repository contains everything required to build qmk firmware.
|
|||||||
|
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
## Setup
|
|
||||||
|
|
||||||
To initialize the build environment, run `make setup`. This does a few things:
|
## Building
|
||||||
|
|
||||||
- Updates all submodules
|
Run `./build.sh`. Uses docker, doesn't need a local install of qmk.
|
||||||
- Symlinks all directories in `keyboards` into `qmk/qmk_fm/keyboards`
|
|
||||||
- Creates a python virtualenv in `venv`
|
|
||||||
- Builds and installs `qmk/qmk_cli` into that venv
|
|
||||||
- Creates a QMK config file in `qmk/qmk.conf`
|
|
||||||
- Runs `qmk doctor` to make sure everything worked.
|
|
||||||
|
|
||||||
Once `make setup` has been run, this directory (or its parents) CANNOT BE RENAMED OR MOVED!
|
|
||||||
If you want to move this directory, run `make unsetup`, then run `make setup` again. No data should be lost.
|
|
||||||
|
|
||||||
|
|
||||||
## Using QMK
|
|
||||||
|
|
||||||
Run `make flash` to build and flash firmware. If you want to execute qmk manually, activate the virtualenv and use `./qmk.sh`.
|
|
||||||
|
|
||||||
|
13
build.sh
Executable file
13
build.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Uses the qmk container found here:
|
||||||
|
# https://git.betalupi.com/Mark/docker
|
||||||
|
#
|
||||||
|
# Be careful, it may not be using the latest QMK.
|
||||||
|
|
||||||
|
docker run -it \
|
||||||
|
--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
|
@ -10,15 +10,17 @@
|
|||||||
// Values that should not be saved to git.
|
// Values that should not be saved to git.
|
||||||
// Create a `secrets.h` in the keymap directory.
|
// Create a `secrets.h` in the keymap directory.
|
||||||
//
|
//
|
||||||
// It should define the following:
|
// It should contain the following:
|
||||||
// SECRET_EMAIL
|
// #define SECRET_EMAIL "val"
|
||||||
|
// #define SECRET_GMAIL "val"
|
||||||
|
// #define SECRET_SCHOOL_EMAIL "val"
|
||||||
#include "secrets.h"
|
#include "secrets.h"
|
||||||
|
|
||||||
|
|
||||||
// Send a special character.
|
// Send a special character.
|
||||||
// Returns false if character was caught, true otherwise.
|
// Returns false if character was caught, true otherwise.
|
||||||
bool send_special_character(uint16_t keycode) {
|
bool send_special_character(uint16_t keycode) {
|
||||||
if ( (keycode > M_SPECIAL_TOP) && (keycode < M_SPECIAL_BOTTОM) ) {
|
if ( (keycode > M_SPECIAL_TOP) && (keycode < M_SPECIAL_BOTTOM) ) {
|
||||||
hid_send_special_char(keycode - M_SPECIAL_TOP - 1);
|
hid_send_special_char(keycode - M_SPECIAL_TOP - 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -123,4 +125,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -55,5 +55,5 @@ enum custom_keycodes {
|
|||||||
M_SC_BYUS,
|
M_SC_BYUS,
|
||||||
M_SC_YAE,
|
M_SC_YAE,
|
||||||
M_SC_SHRUG,
|
M_SC_SHRUG,
|
||||||
M_SPECIAL_BOTTОM
|
M_SPECIAL_BOTTOM
|
||||||
};
|
};
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 7cb41c2daa0e90ced9bbb25e46df810aded78d9c
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 2106acc24a5c223a5429ea5413bd78f6f0ad038c
|
|
Loading…
x
Reference in New Issue
Block a user