Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] arch: allow riscv32 noMMU configuration
@ 2024-05-12 10:06 Waldemar Brodkorb
  2024-05-12 10:20 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2024-05-12 10:06 UTC (permalink / raw)
  To: buildroot

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

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),\
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/2] arch: allow riscv32 noMMU configuration
  2024-05-12 10:06 [Buildroot] [PATCH 1/2] arch: allow riscv32 noMMU configuration Waldemar Brodkorb
@ 2024-05-12 10:20 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-12 10:20 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-12 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 10:06 [Buildroot] [PATCH 1/2] arch: allow riscv32 noMMU configuration Waldemar Brodkorb
2024-05-12 10:20 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox