Re: mips randconfig builds?
Randy Dunlap <[email protected]>
| Newsgroups | org.kernel.vger.linux-mips |
|---|---|
| Message-ID | <[email protected]> |
On 8/11/26 5:47 AM, Maciej W. Rozycki wrote:
> On Wed, 5 Aug 2026, Randy Dunlap wrote:
>
>> I do lots of randconfig builds but I don't have a reliable way to
>> specify mips 32BIT or mips 64BIT builds.
>
> How is the MIPS port different from other dual-wordsize ones, such as
> RISC-V?
To me it's the dependencies of the 32BIT and 64BIT symbols:
config 32BIT
bool "32-bit kernel"
depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL
select TRAD_SIGNALS
help
Select this option if you want to build a 32-bit kernel.
config 64BIT
bool "64-bit kernel"
depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
For RISC-V (after s/32BIT/RV32I/ and s/64BIT/RV64I/), it's:
config ARCH_RV32I
bool "RV32I"
depends on NONPORTABLE
select 32BIT
select GENERIC_LIB_UCMPDI2
config ARCH_RV64I
bool "RV64I"
select 64BIT
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select SWIOTLB if MMU
and the NONPORTABLE part of RV32I is easily handled in
arch/riscv/configs/32-bit.config.
Most of the other ARCHes -- if they have any 32/64BIT dependencies --
are easily handled via a mini.config file.
> Can you just grep .config resulting for 32BIT/64BIT and assign the build > accordingly?
That will still depend on the other dependencies listed above.
And since they have dependencies, it's probably not reliable.
And I'm looking for something that is scriptable.
In the end, what I'm looking for is something similar to what
arch/powerpc/ and arch/riscv/ have for randconfig targets:
ppc32_randconfig
ppc64_randconfig
rv32_randconfig
rv64_randconfig
I'll play around with setting {CPU,SYS}_SUPPORTS_32BIT_KERNEL for 32-bit
and {CPU,SYS}_SUPPORTS_64BIT_KERNEL for 64-bit [done via mini.config files]
to see if that will help me make some progress.
> One target toolchain will handle both, so there is no need to know that
> in advance of `make randconfig' invocation (one advantage of not linking
> libgcc.a or any other target libraries is there's no need for multilibs).
OK. That might be useful info.
thanks.
--
~Randy