Skip to content

Commit 5d4595d

Browse files
rddunlappalmer-dabbelt
authored andcommitted
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 <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 21ccdcc commit 5d4595d

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

arch/riscv/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,13 @@ install zinstall:
140140

141141
archclean:
142142
$(Q)$(MAKE) $(clean)=$(boot)
143+
144+
PHONY += rv32_randconfig
145+
rv32_randconfig:
146+
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/32-bit.config \
147+
-f $(srctree)/Makefile randconfig
148+
149+
PHONY += rv64_randconfig
150+
rv64_randconfig:
151+
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/64-bit.config \
152+
-f $(srctree)/Makefile randconfig

arch/riscv/configs/32-bit.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_ARCH_RV32I=y
2+
CONFIG_32BIT=y

arch/riscv/configs/64-bit.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_ARCH_RV64I=y
2+
CONFIG_64BIT=y

0 commit comments

Comments
 (0)