Skip to content

fix: migrate eyelash_sofle board to Zephyr 4.x board format#3

Open
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-actions-hardware-compile-error
Open

fix: migrate eyelash_sofle board to Zephyr 4.x board format#3
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-actions-hardware-compile-error

Conversation

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
  • Confirm whether any legacy hardware behavior changed in the Zephyr 4.x migration
  • Restore legacy behavior if the migration introduced a regression
  • Run targeted build validation for the affected board variants
  • Reply on the PR with the verified compatibility status and any remaining caveats

@DarinRowe

Copy link
Copy Markdown
Owner

@copilot 还是会错误喔

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Author

@copilot 还是会错误喔

找到了第二个问题:外部模块 a741725193/zmk-sofle 仍有旧格式的 eyelash_sofle_left_defconfig,其中包含 CONFIG_BOARD_EYELASH_SOFLE_LEFT=y。Zephyr 4.x 在加载新格式的 defconfig 之前会先加载这个旧文件,但新的 Kconfig v2 格式不允许用户直接设置 BOARD_EYELASH_SOFLE_LEFT,导致构建失败。

由于 DarinRowe/zmk-sofle 仓库本身已包含所有必要的板卡文件(eyelash_sofle.dtsi、layouts、Kconfig 等),在 commit 02583c6 中从 config/west.yml 移除了不再需要的外部 eyelash_sofle 模块,消除了冲突。

Copilot AI requested a review from DarinRowe April 3, 2026 02:26
@DarinRowe

Copy link
Copy Markdown
Owner

@copilot 检查下

- Remove CONFIG_WS2812_STRIP=y (undefined symbol in Zephyr 4.x; WS2812
  SPI driver is auto-selected from DTS compatible node)
- Remove deprecated SOC_DCDC_NRF52X/SOC_DCDC_NRF52X_HV Kconfig selects
  from Kconfig.defconfig; replace with DTS-based DCDC via &reg0
- Remove deprecated BT_CTLR default from Kconfig.defconfig
- Remove CONFIG_EC11=y/EC11_TRIGGER_GLOBAL_THREAD=y from left defconfig
  and user conf (auto-selected from DT; right board has no encoder)
- Remove CONFIG_BT_CTLR_TX_PWR_PLUS_8=y from left defconfig (causes
  warning in settings_reset build where BLE is disabled)
- Remove user-preference configs from board defconfig (passkey, bonds,
  USB manufacturer name) — kept in eyelash_sofle.conf where appropriate

Agent-Logs-Url: https://github.com/DarinRowe/zmk-sofle/sessions/5c31c00a-c57d-4d5c-bc6f-41a90bda7a0d

Co-authored-by: DarinRowe <5706314+DarinRowe@users.noreply.github.com>

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Author

@copilot 检查下

找到并修复了第二轮构建错误(commit 1770be9):

问题根源(多个 Kconfig 警告在 Zephyr 4.x 中导致构建中止):

  1. CONFIG_WS2812_STRIP=yeyelash_sofle.conf)— 该符号在 Zephyr 4.x 中已被移除(undefined symbol),WS2812 SPI 驱动现在通过 DTS 的 compatible = "worldsemi,ws2812-spi" 自动选择
  2. SOC_DCDC_NRF52X / SOC_DCDC_NRF52X_HVKconfig.defconfig)— 已弃用,改为 DTS 方式:在 eyelash_sofle.dtsi 末尾添加 &reg0 { status = "okay"; }
  3. BT_CTLR default BTKconfig.defconfig)— 已弃用,移除
  4. CONFIG_EC11=y / CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y(左侧 defconfig 和 user conf)— 右侧板卡没有编码器,导致 DT_HAS_ALPS_EC11_ENABLED=n 时出现警告;EC11 会根据 DTS 自动启用,无需显式设置
  5. CONFIG_BT_CTLR_TX_PWR_PLUS_8=y(左侧 defconfig)— settings_reset 构建禁用了 BLE,导致该选择符号无法被选中,触发警告

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/zmkfirmware/zmk/contents/app/boards/arm/nice_nano
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@DarinRowe

Copy link
Copy Markdown
Owner

@copilot 现在的修改后还兼容我之前的键盘吗?

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Author

@copilot 现在的修改后还兼容我之前的键盘吗?

兼容现有硬件,可以放心:这几次修改主要是把板卡描述迁到 Zephyr 4.x 要求的新格式,没有改矩阵引脚、左右半区板名、keymap 入口或 build.yaml 里的 eyelash_sofle_left/right 名称。我也查了最新 CI,当前提交 9062f31Build ZMK firmware 已经通过,所以左右两侧固件现在能正常编译。

需要区分两件事:

  1. 对你之前那把键盘的硬件兼容性:保持兼容。
  2. 对旧固件/旧源码格式:不兼容,必须用这套新配置重新编译再刷。

唯一我不敢 100% 打包票的是:如果你之前那把键盘额外依赖某个“靠旧 Kconfig 强行打开”的功能(尤其左侧 EC11 编码器),那部分我建议我再单独帮你核对一次;但就普通按键矩阵、左右分体、显示、RGB/背光这些,这次改动没有改硬件定义本身。

@DarinRowe

Copy link
Copy Markdown
Owner

@copilot 现在的修改后还兼容我之前的键盘吗?

兼容现有硬件,可以放心:这几次修改主要是把板卡描述迁到 Zephyr 4.x 要求的新格式,没有改矩阵引脚、左右半区板名、keymap 入口或 build.yaml 里的 eyelash_sofle_left/right 名称。我也查了最新 CI,当前提交 9062f31Build ZMK firmware 已经通过,所以左右两侧固件现在能正常编译。

需要区分两件事:

  1. 对你之前那把键盘的硬件兼容性:保持兼容。
  2. 对旧固件/旧源码格式:不兼容,必须用这套新配置重新编译再刷。

唯一我不敢 100% 打包票的是:如果你之前那把键盘额外依赖某个“靠旧 Kconfig 强行打开”的功能(尤其左侧 EC11 编码器),那部分我建议我再单独帮你核对一次;但就普通按键矩阵、左右分体、显示、RGB/背光这些,这次改动没有改硬件定义本身。

但我现在也没有旧版的固件备份,也没法试用这个新版,否则无法恢复

Agent-Logs-Url: https://github.com/DarinRowe/zmk-sofle/sessions/0cdeacf7-f861-480b-af36-85ec924cc539

Co-authored-by: DarinRowe <5706314+DarinRowe@users.noreply.github.com>

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Author

@copilot 现在的修改后还兼容我之前的键盘吗?

兼容现有硬件,可以放心:这几次修改主要是把板卡描述迁到 Zephyr 4.x 要求的新格式,**没有��...

你这个担心是对的,我重新逐项核对后发现迁移时左侧 encoder 的启用行被我误删了,这确实会影响“旧键盘直接刷新版”的安全性。我已经在 0509b57 把它恢复回旧行为了。

所以结论更新为:

  • 不要刷我前一个结论对应的版本;那个版本对左侧 encoder 兼容性不够稳。
  • 如果后续要刷,至少用包含 0509b57 的版本;它把这次迁移里唯一确认的硬件回归补回来了。
  • 在你没有旧固件备份的前提下,最稳妥还是等这次修复的构建结果完全确认后再刷

我会继续把这次修复的构建状态盯完,再给你一个明确的可刷/不可刷结论。

@DarinRowe

Copy link
Copy Markdown
Owner

@copilot 现在的修改后还兼容我之前的键盘吗?

兼容现有硬件,可以放心:这几次修改主要是把板卡描述迁到 Zephyr 4.x 要求的新格式,**没有��...

你这个担心是对的,我重新逐项核对后发现迁移时左侧 encoder 的启用行被我误删了,这确实会影响“旧键盘直接刷新版”的安全性。我已经在 0509b57 把它恢复回旧行为了。

所以结论更新为:

  • 不要刷我前一个结论对应的版本;那个版本对左侧 encoder 兼容性不够稳。
  • 如果后续要刷,至少用包含 0509b57 的版本;它把这次迁移里唯一确认的硬件回归补回来了。
  • 在你没有旧固件备份的前提下,最稳妥还是等这次修复的构建结果完全确认后再刷

我会继续把这次修复的构建状态盯完,再给你一个明确的可刷/不可刷结论。

构建是通过了。

@DarinRowe DarinRowe marked this pull request as ready for review April 3, 2026 07:07
Copilot AI review requested due to automatic review settings April 3, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the eyelash_sofle split board definition to the Zephyr 4.x “new board format” (multi-board via board.yml + per-SOC DTS/defconfig + per-board Kconfig stubs), and updates the ZMK config to align with that layout.

Changes:

  • Switch to Zephyr 4.x board discovery by adding boards/arm/eyelash_sofle/board.yml and introducing Kconfig.eyelash_sofle_left/right.
  • Restructure defconfigs to the per-SOC naming scheme (add *_left_nrf52840_defconfig, trim redundant symbols from right defconfig, remove legacy left defconfig file).
  • Minor device-tree and config cleanups (enable &reg0, remove trailing blank lines, update eyelash_sofle.conf, and drop the extra west manifest project).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
config/west.yml Removes the eyelash_sofle project entry from the west manifest.
config/eyelash_sofle.conf Updates board/user config options (notably trims some previously-set symbols and repositions ext power config).
boards/arm/eyelash_sofle/Kconfig.eyelash_sofle_right Adds Zephyr-4-style per-board Kconfig entry for the right half.
boards/arm/eyelash_sofle/Kconfig.eyelash_sofle_left Adds Zephyr-4-style per-board Kconfig entry for the left half.
boards/arm/eyelash_sofle/Kconfig.defconfig Simplifies board defconfig defaults for Zephyr 4.x layout.
boards/arm/eyelash_sofle/Kconfig.board Removes legacy board Kconfig definitions (replaced by per-board Kconfig files).
boards/arm/eyelash_sofle/eyelash_sofle.dtsi Enables &reg0 and adjusts node closure to fit the new addition.
boards/arm/eyelash_sofle/eyelash_sofle_right_nrf52840.dts Removes a trailing blank line.
boards/arm/eyelash_sofle/eyelash_sofle_right_nrf52840_defconfig Removes redundant SOC/BOARD symbols (now expected to come from board selection).
boards/arm/eyelash_sofle/eyelash_sofle_left_nrf52840.dts Removes a trailing blank line.
boards/arm/eyelash_sofle/eyelash_sofle_left_nrf52840_defconfig Adds per-SOC left defconfig file required by the new board format.
boards/arm/eyelash_sofle/eyelash_sofle_left_defconfig Removes legacy left defconfig (replaced by per-SOC defconfig).
boards/arm/eyelash_sofle/board.yml Adds Zephyr 4.x board metadata for eyelash_sofle_left/right with nrf52840.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# SPDX-License-Identifier: MIT
#

config BOARD_EYELASH_SOFLE_RIGHT

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOARD_EYELASH_SOFLE_RIGHT is being defined here but the entry is missing a Kconfig type (e.g., bool). In the previous Kconfig.board this symbol was a bool, and without a type Kconfig can fail to parse or leave the symbol undefined. Add a bool (optionally with a prompt) before the select statements.

Suggested change
config BOARD_EYELASH_SOFLE_RIGHT
config BOARD_EYELASH_SOFLE_RIGHT
bool

Copilot uses AI. Check for mistakes.
# SPDX-License-Identifier: MIT
#

config BOARD_EYELASH_SOFLE_LEFT

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOARD_EYELASH_SOFLE_LEFT is being defined here but the entry is missing a Kconfig type (e.g., bool). The removed Kconfig.board defined this as a bool, and omitting the type can cause Kconfig parse errors or leave the symbol undefined. Add a bool (optionally with a prompt) before the select statements.

Suggested change
config BOARD_EYELASH_SOFLE_LEFT
config BOARD_EYELASH_SOFLE_LEFT
bool

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants