riscv: add rv32 and rv64 randconfig build targets

Add the ability to do randconfig build targets for both
rv32 and rv64.

Based on a similar patch by Michael Ellerman for PowerPC.

Usage:
  make ARCH=riscv rv32_randconfig
or
  make ARCH=riscv rv64_randconfig

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Randy Dunlap 2021-09-11 20:45:38 -07:00 committed by Palmer Dabbelt
parent 21ccdccd21
commit 5d4595db0e
No known key found for this signature in database
GPG Key ID: 2E1319F35FBB1889
3 changed files with 14 additions and 0 deletions

View File

@ -140,3 +140,13 @@ install zinstall:
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
PHONY += rv32_randconfig
rv32_randconfig:
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/32-bit.config \
-f $(srctree)/Makefile randconfig
PHONY += rv64_randconfig
rv64_randconfig:
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/64-bit.config \
-f $(srctree)/Makefile randconfig

View File

@ -0,0 +1,2 @@
CONFIG_ARCH_RV32I=y
CONFIG_32BIT=y

View File

@ -0,0 +1,2 @@
CONFIG_ARCH_RV64I=y
CONFIG_64BIT=y