Skip to contentSkip to conversation

buildman: Differentiate 32-bit and 64-bit LoongArch variants

PATCH In review Yao Zi 2 participants 2 messages Aug 6 – Aug 18

lore
Share & tools
lore

Yao Zi

author
#0 lore raw

PATCH v2 1/1 buildman: Differentiate 32-bit and 64-bit LoongArch variants

Similar to RISC-V and ARM, 32-bit and 64-bit LoongArch cannot be distinguished solely by CONFIG_SYS_ARCH, but require different toolchains if multilib is disabled in compiler, which is the case of toolchain provided by kernel.org.

Override the parsed arch parameter for LoongArch configs based on CONFIG_ARCH_LA64 Kconfig symbol.

---

This patch is based on the latest main branch.

Changed from v1
- Reword the commit message
- Catch only AttributeError in the except block
- Link to v1: https://lists.u-boot-project.org/pipermail/u-boot/2026-July/627018.html

 tools/buildman/boards.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
tools/buildman/boards.py +11 -0
index 2fe43c3fc896..5d5d3a3822b1 100644
@@ -309,6 +309,17 @@ class KconfigScanner:
             else:
                 params['arch'] = 'riscv64'
 
+        # fix-up for loongarch
+        if params['arch'] == 'loongarch':
+            try:
+                value = self._conf.syms.get('ARCH_LA64').str_value
+            except AttributeError:
+                value = ''
+            if value == 'y':
+                params['arch'] = 'loongarch64'
+            else:
+                params['arch'] = 'loongarch32'
+
         return params, warnings
 
 

base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5

Signature · 1 line
2.54.0
#1 lore raw
Quoted 9 lines · Yao Zi

Similar to RISC-V and ARM, 32-bit and 64-bit LoongArch cannot be distinguished solely by CONFIG_SYS_ARCH, but require different toolchains if multilib is disabled in compiler, which is the case of toolchain provided by kernel.org.

Override the parsed arch parameter for LoongArch configs based on CONFIG_ARCH_LA64 Kconfig symbol.

[...]

Applied to u-boot/next, thanks!

[1/1] buildman: Differentiate 32-bit and 64-bit LoongArch variants

      commit: d2b6f7d9c4b42ce48c83593cdec7ae9780a31057
Signature · 1 line
Tom