Skip to content

[libcpu] Make arm/Kconfig source optional in dist projects - #11995

Open
BernardXiong wants to merge 1 commit into
RT-Thread:masterfrom
BernardXiong:fix/libcpu-kconfig-optional-source
Open

BernardXiong wants to merge 1 commit into
RT-Thread:masterfrom
BernardXiong:fix/libcpu-kconfig-optional-source

Conversation

@BernardXiong

Copy link
Copy Markdown
Member

Summary

scons --dist only copies the libcpu directory of the target architecture (tools/mkdist.py), so a dist project built for a non-ARM architecture does not contain libcpu/arm. Since 89c70ab moved the ARM Kconfig definitions into libcpu/arm/Kconfig and included them with an unconditional rsource, scons --pyconfig-silent fails in those dist projects:

defconfig: rt-thread/libcpu/Kconfig:27: 'rt-thread/libcpu/arm/Kconfig' not found (in 'rsource "arm/Kconfig"')

This breaks the BSP build CI for every non-ARM BSP on master (aarch64, simulator, xuantie, i386, ESP32, riscv and others).

Change

  • Source arm/Kconfig with orsource, matching how the aarch64 and risc-v Kconfig files are already included. The file is still parsed normally when it exists, and is skipped when it does not.

Testing

  • Parsed libcpu/Kconfig with kconfiglib in a tree without libcpu/arm: the old version fails with the CI error above, the new version parses without warnings.
  • CI will confirm the full BSP build matrix.

scons --dist only copies the libcpu directory of the target
architecture, so a dist project built for a non-ARM architecture has no
libcpu/arm. The unconditional rsource of arm/Kconfig added by
89c70ab then makes scons --pyconfig-silent fail, which breaks the
BSP build CI for every non-ARM BSP.

Source arm/Kconfig with orsource, matching how the aarch64 and risc-v
Kconfig files are already included.

Fixes: 89c70ab ("kconfig部分搬至arm/kconfig")
@github-actions github-actions Bot added the libcpu label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • Use workflow from 保持默认分支(通常为 master)
    Keep the default branch (usually master) in Use workflow from
  • 在 branch 输入框填写 PR 分支 fix/libcpu-kconfig-optional-source
    Enter PR branch fix/libcpu-kconfig-optional-source in the branch field
  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将作为独立提交推送至你的分支。
    The formatting changes will be pushed to your branch as a separate commit.

完成后,提交将自动更新至 fix/libcpu-kconfig-optional-source 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the fix/libcpu-kconfig-optional-source branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant