From 8d870812a38e1022b9b2d3c8f4d0588c10fdfb18 Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Wed, 5 Jun 2024 20:12:10 -0700 Subject: [PATCH] Add instructions for building locally --- README.md | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f112b0f9..6f9e89e8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,41 @@ -# Zephyr™ Mechanical Keyboard (ZMK) Firmware +# ZMK -[![Discord](https://img.shields.io/discord/719497620560543766)](https://zmk.dev/community/discord/invite) -[![Build](https://github.com/zmkfirmware/zmk/workflows/Build/badge.svg)](https://github.com/zmkfirmware/zmk/actions) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) +NOTE: Try to keep the repo up to date as much as possible. Pull from the +upstream master and then rebase my branch on top of it. -[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues. +## Instructions for building -Check out the website to learn more: https://zmk.dev/. +1. Install devcontainer cli -You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite). + ```sh + brew install devcontainer + ``` + +2. Setup the devcontainer + + ```sh + devcontainer up --workspace-path . --docker-path $(which podman) + ``` + +3. Initialize west (this takes a while) + + ```sh + devcontainer exec --workspace-path . --docker-path $(which podman) + west init -l app/ + west update + ``` + +4. Build the firmware + + ```sh + cd app + west build --pristine -b nice_nano_v2 -- -DSHIELD=chrysemys + ``` + +5. Copy the uf2 file onto the root of the USB mass storage for the keyboard. The uf2 file can be found at `app/build/zephyr/zmk.uf2`. + +## Documentation + +- [Docker setup](https://zmk.dev/docs/development/setup/docker) +- [Building](https://zmk.dev/docs/development/build-flash) -To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.