From 5d4595db0e1ca4c7fbe9c6870007df3578d1a20b Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 11 Sep 2021 20:45:38 -0700 Subject: [PATCH] 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 Signed-off-by: Palmer Dabbelt --- arch/riscv/Makefile | 10 ++++++++++ arch/riscv/configs/32-bit.config | 2 ++ arch/riscv/configs/64-bit.config | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 arch/riscv/configs/32-bit.config create mode 100644 arch/riscv/configs/64-bit.config diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 0eb4568fbd29..9247407b95d6 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -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 diff --git a/arch/riscv/configs/32-bit.config b/arch/riscv/configs/32-bit.config new file mode 100644 index 000000000000..43f41323b67e --- /dev/null +++ b/arch/riscv/configs/32-bit.config @@ -0,0 +1,2 @@ +CONFIG_ARCH_RV32I=y +CONFIG_32BIT=y diff --git a/arch/riscv/configs/64-bit.config b/arch/riscv/configs/64-bit.config new file mode 100644 index 000000000000..313edc554d84 --- /dev/null +++ b/arch/riscv/configs/64-bit.config @@ -0,0 +1,2 @@ +CONFIG_ARCH_RV64I=y +CONFIG_64BIT=y