buildman: differentiate between riscv32, riscv64
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 3 Oct 2022 16:07:53 +0000 (18:07 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 7 Oct 2022 12:42:51 +0000 (08:42 -0400)
riscv32 needs a different toolchain than riscv64

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
tools/buildman/boards.py

index 8a0971a..cdc4d9f 100644 (file)
@@ -263,6 +263,17 @@ class KconfigScanner:
         if params['arch'] == 'arm' and params['cpu'] == 'armv8':
             params['arch'] = 'aarch64'
 
+        # fix-up for riscv
+        if params['arch'] == 'riscv':
+            try:
+                value = self._conf.syms.get('ARCH_RV32I').str_value
+            except:
+                value = ''
+            if value == 'y':
+                params['arch'] = 'riscv32'
+            else:
+                params['arch'] = 'riscv64'
+
         return params