Update documentation

This commit is contained in:
Jeremy Soller 2021-06-04 06:55:48 -06:00 committed by Jeremy Soller
parent df469a9eea
commit ca09e86987

View File

@ -12,13 +12,20 @@ currently using.
something like "2020-09-17_f10af76". something like "2020-09-17_f10af76".
* Clone the [system76/firmware-open](https://github.com/system76/firmware-open) * Clone the [system76/firmware-open](https://github.com/system76/firmware-open)
repository. repository.
* Checkout the version that matches your firmware, e.g.: `git checkout f10af76`. * Checkout the version that matches your firmware, e.g.:
`git checkout f10af76`.
* Run `git submodule init && git submodule update && cd ec`. * Run `git submodule init && git submodule update && cd ec`.
* This documentation is subject to change, please use the version in the
repository you just cloned.
## Adding your layout ## Adding your layout
* In `src/board/system76/{your-model}/keymap/`, copy `default.c` and rename it. * In `src/board/system76/{your-model}/board.mk`, locate the line starting with
There are two examples to reference in the `lemp9` directory: `jeremy.c` and `KEYBOARD=`. The value after the equal sign is your keyboard type, the most
`levi.c`. common is `15in_102`. We will use the `lemp9` keyboard as an example, which
is `14in_83`
* In `src/board/keyboard/{keyboard-type}/keymap/`, copy `default.c` and rename
it. There are two examples to reference in the `14in_83` directory:
`jeremy.c` and `levi.c`.
* In `src/common/include/common/keymap.h` you will find a list of the key * In `src/common/include/common/keymap.h` you will find a list of the key
definitions. definitions.
* You will notice two sets of keys in these layout files. The top one is the * You will notice two sets of keys in these layout files. The top one is the
@ -26,15 +33,15 @@ currently using.
the Fn key is being held. If you look at the Fn layer in the `levi.c` layout, the Fn key is being held. If you look at the Fn layer in the `levi.c` layout,
you will see that there are arrow keys at WASD, media and volume keys on the you will see that there are arrow keys at WASD, media and volume keys on the
bottom row, etc. bottom row, etc.
* Hint: To avoid losing your place change one key at a time, referencing the key * Hint: To avoid losing your place change one key at a time, referencing the
code you are deleting to keep yourself positioned correctly in the list of key code you are deleting to keep yourself positioned correctly in the list
keycodes. of keycodes.
## Configure your EC to build with your layout ## Configure your EC to build with your layout
* Create a file in the project's root directory called `config.mk` and add your * Create a file in the project's root directory called `config.mk` and add your
board and keyboard layout to it. For example, if you want to build lemp9 board and keyboard layout to it. For example, if you want to build lemp9
firmware with Jeremy's layout (which is at firmware with Jeremy's layout (which is at
`ec/src/board/system76/lemp9/keymap/jeremy.c`): `ec/src/keyboard/14in_83/keymap/jeremy.c`):
``` ```
BOARD?=system76/lemp9 BOARD?=system76/lemp9
KEYMAP?=jeremy KEYMAP?=jeremy