diff mbox series

[1/2] arch: allow riscv32 noMMU configuration

Message ID ZkCUo5vHs4Mc3cQx@waldemar-brodkorb.de
State Accepted
Headers show
Series [1/2] arch: allow riscv32 noMMU configuration | expand

Commit Message

Waldemar Brodkorb May 12, 2024, 10:06 a.m. UTC
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 arch/Config.in.riscv | 3 +--
 package/Makefile.in  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

Comments

Thomas Petazzoni May 12, 2024, 10:20 a.m. UTC | #1
On Sun, 12 May 2024 12:06:27 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

>  config BR2_RISCV_64
>  	bool "64-bit"
> @@ -62,7 +61,7 @@ endchoice
>  config BR2_RISCV_USE_MMU
>  	bool "MMU support"
>  	default y
> -	depends on BR2_RISCV_64
> +	depends on BR2_RISCV_64 || BR2_RISCV_32

This depends on was no longer needed. When RISC-V is selected, you are
sure that either BR2_RISCV_32 or BR2_RISCV_64 is enabled, so the
depends on does not make sense.

>  # FLAT binary format needs uclinux, except RISC-V 64-bits which needs

                                                     ^^^^^^  this comment needed an updated

Applied with both issues fixed. Thanks!

Thomas
diff mbox series

Patch

diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv
index d62e4ebc6c..3461f75800 100644
--- a/arch/Config.in.riscv
+++ b/arch/Config.in.riscv
@@ -51,7 +51,6 @@  choice
 
 config BR2_RISCV_32
 	bool "32-bit"
-	select BR2_USE_MMU
 
 config BR2_RISCV_64
 	bool "64-bit"
@@ -62,7 +61,7 @@  endchoice
 config BR2_RISCV_USE_MMU
 	bool "MMU support"
 	default y
-	depends on BR2_RISCV_64
+	depends on BR2_RISCV_64 || BR2_RISCV_32
 	select BR2_USE_MMU
 	help
 	  Enable this option if your RISC-V core has a MMU (Memory
diff --git a/package/Makefile.in b/package/Makefile.in
index b350c4b7b5..0a965c3a02 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -43,7 +43,7 @@  GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
 
 # FLAT binary format needs uclinux, except RISC-V 64-bits which needs
 # the regular linux name.
-ifeq ($(BR2_BINFMT_FLAT):$(BR2_RISCV_64),y:)
+ifeq ($(BR2_BINFMT_FLAT):$(BR2_riscv),y:)
 TARGET_OS = uclinux
 else
 TARGET_OS = linux
@@ -181,7 +181,7 @@  TARGET_CXXFLAGS += -fno-dwarf2-cfi-asm
 endif
 
 ifeq ($(BR2_BINFMT_FLAT),y)
-ifeq ($(BR2_RISCV_64),y)
+ifeq ($(BR2_riscv),y)
 TARGET_CFLAGS += -fPIC
 endif
 ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\