On Mon, Oct 03, 2022 at 09:23:01AM -0600, Simon Glass wrote: > Hi, > > On Mon, 3 Oct 2022 at 09:05, Tom Rini <tr...@konsulko.com> wrote: > > > > On Mon, Oct 03, 2022 at 08:57:41AM -0600, Simon Glass wrote: > > > Hi Heinrich, > > > > > > On Mon, 3 Oct 2022 at 03:56, Heinrich Schuchardt > > > <heinrich.schucha...@canonical.com> wrote: > > > > > > > > > > > > > > > > On 10/3/22 03:10, Simon Glass wrote: > > > > > Hi Heinrich, > > > > > > > > > > On Sat, 1 Oct 2022 at 20:21, Heinrich Schuchardt > > > > > <heinrich.schucha...@canonical.com> wrote: > > > > >> > > > > >> riscv32 needs a different toolchain than riscv64 > > > > >> > > > > >> Signed-off-by: Heinrich Schuchardt > > > > >> <heinrich.schucha...@canonical.com> > > > > >> --- > > > > >> v3: > > > > >> new patch > > > > >> --- > > > > >> tools/buildman/boards.py | 11 +++++++++++ > > > > >> 1 file changed, 11 insertions(+) > > > > >> > > > > >> diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py > > > > >> index 8a0971aa40..cdc4d9ffd2 100644 > > > > >> --- a/tools/buildman/boards.py > > > > >> +++ b/tools/buildman/boards.py > > > > >> @@ -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 > > > > >> > > > > >> > > > > >> -- > > > > >> 2.37.2 > > > > >> > > > > > > > > > > Should we instead do what ARM does? > > > > > > > > My patch does exactly the same for RISC-V that was done previously for > > > > ARM: > > > > It sets the correct value of arch in dependence of the bitness of the > > > > architecture. > > > > > > Sort of. Can we use the 'cpu' for this, insteading of reading a config > > > symbol? > > > > The problem is that "cpu" for riscv is not that determines this. None of > > the existing symbols that buildman puts in a handy table are. > > OK, so can we fix/change that? Or do we need to add yet another field > to boards.cfg, just for riscv?
Well, it's a side effect of what we do / don't do with Kconfig. ARCH_RV32I and ARCH_RV64I set 32BIT or 64BIT which are also more common symbols. It's also not that cpu should be what matters here as we have configa/ae350_rv{32,64}_defconfig using the ax25 CPU. -- Tom
signature.asc
Description: PGP signature