Skip to content

support/scripts/gen-bootlin-toolchains: add missing BR2_USE_MMU dependencies

Fengwei Tan buildroot 1 version In review

Get series with b4
b4 am SY8P300MB0041EFD8D13BF20DAB3D61FCB5AB2@SY8P300MB0041.AUSP300.PROD.OUTLOOK.COM change-id 20260829-missing-toolchain-deps-cb57f97ceca4

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3toolchain/toolchain-external/toolchain-external-bootlin: drop duplicate BR2_TOOLCHAIN_HAS_THREADS selectionstoolchain/toolchain-external/toolchain-external-bootlin/Config.in.options+0 -4320 replies
2/3support/scripts/gen-bootlin-toolchains: add missing BR2_USE_MMU dependenciessupport/scripts/gen-bootlin-toolchains+3 -30 replies
3/3support/testing, toolchain/toolchain-external/toolchain-external-bootlin: regenerate after MMU dependency updatesupport/testing/tests/toolchain/test_external_bootlin.py toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options+25 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 0/3] support/scripts/gen-bootlin-toolchains: add missing BR2_USE_MMU dependencies

Hello all,

Buildroot supports both MMU and noMMU configurations for the m68k-68xxx, riscv32-ilp32d, and xtensa-lx60 architectures. The configurations used by Bootlin's toolchains-builder [1] do not explicitly set BR2_USE_MMU. Instead, it is enabled through Buildroot's architecture-specific Kconfig selections and defaults, as illustrated by the RISC-V configuration [2]. As a result, the corresponding Bootlin uClibc toolchains are built with MMU support.

This can be confirmed by running, for example:

curl -fsSL 'https://toolchains.bootlin.com/downloads/releases/toolchains/riscv32-ilp32d/tarballs/riscv32-ilp32d--uclibc--stable-2025.08-1.tar.xz' \
| tar -xOJf - --wildcards --no-anchored 'uClibc_config.h' \
| grep -E '^#define __ARCH_(HAS|USE)_MMU__ 1$'

However, their generated Kconfig entries lack a BR2_USE_MMU dependency, allowing them to be selected for noMMU targets. External toolchain validation then fails with:

MMU support available in C library, please enable BR2_USE_MMU

Patch 1 regenerates Config.in.options to bring it in sync with an existing generator fix for duplicate BR2_TOOLCHAIN_HAS_THREADS selections.

Patch 2 adds the missing BR2_USE_MMU dependencies for m68k-68xxx, riscv32-ilp32d, and xtensa-lx60 to the generator script.

Patch 3 regenerates the Bootlin toolchain Kconfig and test cases using the updated generator script from Patch 2.

This should address the immediate issue in Buildroot. A possible longer-term solution would be to expose in the toolchain metadata whether a toolchain requires MMU support, allowing the generator to derive the dependency automatically.

Please let me know if I missed anything. Thanks a lot!

[1] https://github.com/bootlin/toolchains-builder
[2] https://gitlab.com/buildroot.org/buildroot/-/blob/83fc4aa55eeab8f6dab64e6fe26a04284fa73881/arch/Config.in.riscv#L73

---
Fengwei Tan (3):
toolchain/toolchain-external/toolchain-external-bootlin: drop duplicate BR2_TOOLCHAIN_HAS_THREADS selections support/scripts/gen-bootlin-toolchains: add missing BR2_USE_MMU dependencies
support/testing, toolchain/toolchain-external/toolchain-external-bootlin: regenerate after MMU dependency update

 support/scripts/gen-bootlin-toolchains             |   6 +-
 .../tests/toolchain/test_external_bootlin.py       |   8 +
 .../toolchain-external-bootlin/Config.in.options   | 460 +--------------------
 3 files changed, 28 insertions(+), 446 deletions(-)

---
base-commit: 83fc4aa55eeab8f6dab64e6fe26a04284fa73881
change-id: 20260829-missing-toolchain-deps-cb57f97ceca4

Best regards,

Signature · 5 lines
Fengwei Tan <[email protected]>
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot