arch/Config.in.sh: fixup MMU selection

BR2_sh selects BR2_ARCH_HAS_MMU_OPTIONAL, which means that it's up to
the user to decide whether he wants to use MMU or not on SuperH
platforms.

However:

 - On SH2A, there is no MMU at all, so being to select "Use MMU"
   doesn't make any sense.

 - On SH4, there is no support for *not* using the MMU, so disabling
   "Use MMU" will cause the build to fail.

In order to fix this, we move the MMU selection to arch/Config.in.sh:

 - BR2_sh2a selects nothing, so that it's always noMMU

 - BR2_sh4* select BR2_ARCH_HAS_MMU_MANDATORY so that the MMU is
   always used.

Fixes:

 http://autobuild.buildroot.net/results/f4d52cabee61ee0f234b03c1ec1bd02e85e7bb20/ (FLAT
 selected with sh4aeb)

 http://autobuild.buildroot.net/results/d1b1dfe449f82944bd48215da3cdffd05797e2e9/ (FLAT
 selected with sh4a)

 http://autobuild.buildroot.net/results/45bc90fd2dde7bb201d7f999db1a8024cf889a06/ (FLAT
 selected with sh4)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Thomas Petazzoni 2022-04-19 23:34:45 +02:00 committed by Yann E. MORIN
parent 664f1fc1c7
commit aa8a2dacf2
2 changed files with 4 additions and 1 deletions

View File

@ -228,7 +228,6 @@ config BR2_s390x
config BR2_sh
bool "SuperH"
select BR2_ARCH_HAS_MMU_OPTIONAL
help
SuperH (or SH) is a 32-bit reduced instruction set computer
(RISC) instruction set architecture (ISA) developed by

View File

@ -9,12 +9,16 @@ config BR2_sh2a
bool "sh2a (SH2A big endian)"
config BR2_sh4
bool "sh4 (SH4 little endian)"
select BR2_ARCH_HAS_MMU_MANDATORY
config BR2_sh4eb
bool "sh4eb (SH4 big endian)"
select BR2_ARCH_HAS_MMU_MANDATORY
config BR2_sh4a
bool "sh4a (SH4A little endian)"
select BR2_ARCH_HAS_MMU_MANDATORY
config BR2_sh4aeb
bool "sh4aeb (SH4A big endian)"
select BR2_ARCH_HAS_MMU_MANDATORY
endchoice
config BR2_ARCH