arch: allow riscv32 noMMU configuration

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Waldemar Brodkorb 2024-05-12 12:06:27 +02:00 committed by Thomas Petazzoni
parent 8cb0f6e011
commit e32d404f6c
2 changed files with 4 additions and 6 deletions

View File

@ -51,7 +51,6 @@ choice
config BR2_RISCV_32 config BR2_RISCV_32
bool "32-bit" bool "32-bit"
select BR2_USE_MMU
config BR2_RISCV_64 config BR2_RISCV_64
bool "64-bit" bool "64-bit"
@ -62,7 +61,6 @@ endchoice
config BR2_RISCV_USE_MMU config BR2_RISCV_USE_MMU
bool "MMU support" bool "MMU support"
default y default y
depends on BR2_RISCV_64
select BR2_USE_MMU select BR2_USE_MMU
help help
Enable this option if your RISC-V core has a MMU (Memory Enable this option if your RISC-V core has a MMU (Memory

View File

@ -41,9 +41,9 @@ endif
# Compute GNU_TARGET_NAME # Compute GNU_TARGET_NAME
GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
# FLAT binary format needs uclinux, except RISC-V 64-bits which needs # FLAT binary format needs uclinux, except RISC-V which needs the
# the regular linux name. # regular linux name.
ifeq ($(BR2_BINFMT_FLAT):$(BR2_RISCV_64),y:) ifeq ($(BR2_BINFMT_FLAT):$(BR2_riscv),y:)
TARGET_OS = uclinux TARGET_OS = uclinux
else else
TARGET_OS = linux TARGET_OS = linux
@ -181,7 +181,7 @@ TARGET_CXXFLAGS += -fno-dwarf2-cfi-asm
endif endif
ifeq ($(BR2_BINFMT_FLAT),y) ifeq ($(BR2_BINFMT_FLAT),y)
ifeq ($(BR2_RISCV_64),y) ifeq ($(BR2_riscv),y)
TARGET_CFLAGS += -fPIC TARGET_CFLAGS += -fPIC
endif endif
ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\ ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\