-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Add the stub blog post for Zephyr 3.2.
- Loading branch information
1 parent
39358f6
commit 246f8e9
Showing
1 changed file
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
--- | ||
title: "Zephyr 3.2 Update" | ||
author: Pete Johanson | ||
author_title: Project Creator | ||
author_url: https://gitlab.com/petejohanson | ||
author_image_url: https://www.gravatar.com/avatar/2001ceff7e9dc753cf96fcb2e6f41110 | ||
tags: [firmware, zephyr, core] | ||
--- | ||
|
||
I'm happy to announce that we have completed the [work](https://github.com/zmkfirmware/zmk/pull/1499) to upgrade ZMK to [Zephyr 3.2](https://docs.zephyrproject.org/3.2.0/releases/release-notes-3.2.html)! | ||
|
||
[petejohanson] did the upgrade work to adjust ZMK for the Zephyr changes. | ||
|
||
- Upgrade to LVGL 8.x Kconfig settings. | ||
- Tons of RP2040 work | ||
- Zephyr core API changes, including DTS `label` use changes. | ||
|
||
## Getting The Changes | ||
|
||
Use the following steps to update to the latest tooling in order to properly use the new ZMK changes: | ||
|
||
### User Config Repositories Using GitHub Actions | ||
|
||
Existing user config repositories using Github Actions to build will pull down Zephyr 3.2 automatically, however to build properly, if it hasn't already been changed, the repository needs to be updated to use the `stable` Docker image tag for the build: | ||
|
||
- Open `.github/workflows/build.yml` in your editor/IDE | ||
- Change `zmkfirmware/zmk-build-arm:2.5` to `zmkfirmware/zmk-build-arm:stable` wherever it is found | ||
- Locate and delete the lines for the DTS output step, which is no longer needed: | ||
|
||
``` | ||
- name: ${{ steps.variables.outputs.display-name }} DTS File | ||
if: ${{ always() }} | ||
run: | | ||
if [ -f "build/zephyr/${{ matrix.board }}.pre.tmp" ]; then cat -n build/zephyr/${{ matrix.board }}.pre.tmp; fi | ||
if [ -f "build/zephyr/zephyr.dts" ]; then cat -n build/zephyr/zephyr.dts; fi | ||
``` | ||
|
||
:::note | ||
|
||
If you created your user config repository a while ago, you may find that your `build.yml` file instead references | ||
a `zephyr-west-action-arm` custom GitHub Action instead. In this case, the upgrade is not as direct. We suggest that | ||
instead you [re-create your config repository](/docs/user-setup) to get an updated setup using the new automation | ||
approach. | ||
|
||
::: | ||
|
||
### VS Code & Docker (Dev Container) | ||
|
||
If you build locally using VS Code & Docker then: | ||
|
||
- pull the latest ZMK `main` with `git pull` for your ZMK checkout | ||
- reload the project | ||
- if you are prompted to rebuild the remote container, click `Rebuild` | ||
- otherwise, press `F1` and run `Remote Containers: Rebuild Container` | ||
- Once the container has rebuilt and reloaded, run `west update` to pull the updated Zephyr version and its dependencies. | ||
|
||
Once the container has rebuilt, VS Code will be running the 3.2 Docker image. | ||
|
||
### Local Host Development | ||
|
||
The following steps will get you building ZMK locally against Zephyr 3.2: | ||
|
||
- Run the updated [toolchain installation](/docs/development/setup#toolchain-installation) steps, and once completed, remove the previously installed SDK version (optional, existing SDK should still work) | ||
- Install the latest version of `west` by running `pip3 install --user --update west`. | ||
- pull the latest ZMK `main` with `git pull` for your ZMK checkout | ||
- run `west update` to pull the updated Zephyr version and its dependencies | ||
|
||
From there, you should be ready to build as normal! | ||
|
||
## Board/Shield Changes | ||
|
||
The following changes have [already been completed](https://github.com/zmkfirmware/zmk/pull/1143/commits) for all boards/shields in ZMK `main` branch. For existing or new PRs, or out of tree boards, the following changes are necessary to properly work with the latest changes. | ||
|
||
### LVGL Kconfig changes. | ||
|
||
With the update to LVGL 8.x, Zephyr now leverages an upstream Kconfig file for most LVGL settings. Due to this, the naming for many existing configs has been adjusted. For any configs moved upstream, the naming mostly involves a prefix change from `LVGL_` to the shorter `LV_`. For any that are still Zephyr specific configs, they are now prefixed with `LV_Z_` prefix. | ||
|
||
If you maintain or use an out of tree board/shield with a display, the following will need to be changed in your Kconfig files: | ||
|
||
- `LVGL_VDB_SIZE` -> `LV_Z_VDB_SIZE` | ||
- `LVGL_DPI` -> `LV_Z_DPI` | ||
- `LVGL_BITS_PER_PIXEL` -> `LV_Z_BITS_PER_PIXEL` | ||
- `LVGL_COLOR_DEPTH` -> `LV_COLOR_DEPTH` | ||
|
||
## Raspberry Pi Pico/RP2040 Support | ||
|
||
This Zephyr update allows ZMK to support the new(-ish) RP2040 SoC found in the Raspberry Pi Pico. | ||
|
||
::: note | ||
|
||
ZMK does _not_ support wired split communication yet, so RP2040 is only usable for non-split keyboards. | ||
|
||
::: | ||
|
||
### Supported Controllers | ||
|
||
The following RP2040 powered controllers have board definitions for folks to test: | ||
|
||
- Raspberry Pi Pico (`rpi_pico`) | ||
- SparkFun Pro Micro RP2040 (`sparkfun_pro_micro_rp2040`) | ||
- Adafruit Keyboar/KB2040 (`adafruit_kb2040`) | ||
- Seeeduin XIAO RP2040 (`seeeduino_xiao_rp2040`) | ||
- Adafruit Qt PY RP2040 (`adafruit_qt_py_rp2040`) | ||
- BoardSource blok (`boardsource_blok`) | ||
- TODO ? | ||
|
||
## Upcoming Changes | ||
|
||
### Display re-init | ||
|
||
Zephyr's improved [power domain](https://docs.zephyrproject.org/3.2.0/services/pm/power_domain.html#pm-power-domain) support is a foundation | ||
upon which we can provide a proper fix for the [longstanding display re-init bug](https://github.com/zmkfirmware/zmk/issues/674) which has prevented | ||
ZMK from formally supporting our display code. | ||
|
||
There is work still remaining to fully leverage the power domain system within ZMK to fix the bug, but upgrading Zephyr is the first necessary step. | ||
|
||
## Thanks! | ||
|
||
Thanks to all the testers who have helped verify ZMK functionality on the newer Zephyr version. | ||
|
||
[petejohanson]: https://github.com/petejohanson |