OSDN Git Service

riscv: add rv32 and rv64 randconfig build targets
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 12 Sep 2021 03:45:38 +0000 (20:45 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 5 Oct 2021 00:46:02 +0000 (17:46 -0700)
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>
arch/riscv/Makefile
arch/riscv/configs/32-bit.config [new file with mode: 0644]
arch/riscv/configs/64-bit.config [new file with mode: 0644]

index 0eb4568..9247407 100644 (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
diff --git a/arch/riscv/configs/32-bit.config b/arch/riscv/configs/32-bit.config
new file mode 100644 (file)
index 0000000..43f4132
--- /dev/null
@@ -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 (file)
index 0000000..313edc5
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG_ARCH_RV64I=y
+CONFIG_64BIT=y