All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection
@ 2022-04-19 21:34 Thomas Petazzoni via buildroot
  2022-04-19 21:34 ` [Buildroot] [PATCH 2/5] arch/Config.in: remove BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64* Thomas Petazzoni via buildroot
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-04-19 21:34 UTC (permalink / raw)
  To: Buildroot List, James Hilliard; +Cc: Thomas Petazzoni

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>
---
 arch/Config.in    | 1 -
 arch/Config.in.sh | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/Config.in b/arch/Config.in
index 98b0e40d51..e51ef60f40 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -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
diff --git a/arch/Config.in.sh b/arch/Config.in.sh
index c1ba449dd5..a012cbf491 100644
--- a/arch/Config.in.sh
+++ b/arch/Config.in.sh
@@ -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
-- 
2.35.1

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

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

* [Buildroot] [PATCH 2/5] arch/Config.in: remove BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64*
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
@ 2022-04-19 21:34 ` Thomas Petazzoni via buildroot
  2022-04-19 21:34 ` [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection Thomas Petazzoni via buildroot
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-04-19 21:34 UTC (permalink / raw)
  To: Buildroot List, James Hilliard; +Cc: Thomas Petazzoni

Selecting BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64 and
BR2_aarch64_be doesn't make much sense, because the actual ARM cores
described in arch/Config.in.arm then all select
BR2_ARCH_HAS_MMU_OPTIONAL. So we end up with both
BR2_ARCH_HAS_MMU_OPTIONAL and BR2_ARCH_HAS_MMU_MANDATORY, which
doesn't make any sense.

To prevent this, we remove the selection of BR2_ARCH_HAS_MMU_MANDATORY
from BR2_aarch64 and BR2_aarch64_be, and let arch/Config.in.arm do its
job. What arch/Config.in.arm does is currently incorrect, but it will
be fixed in a separate commit.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/Config.in | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/Config.in b/arch/Config.in
index e51ef60f40..d0d8854c2d 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -60,7 +60,6 @@ config BR2_armeb
 config BR2_aarch64
 	bool "AArch64 (little endian)"
 	select BR2_ARCH_IS_64
-	select BR2_ARCH_HAS_MMU_MANDATORY
 	help
 	  Aarch64 is a 64-bit architecture developed by ARM Holdings.
 	  http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
@@ -69,7 +68,6 @@ config BR2_aarch64
 config BR2_aarch64_be
 	bool "AArch64 (big endian)"
 	select BR2_ARCH_IS_64
-	select BR2_ARCH_HAS_MMU_MANDATORY
 	help
 	  Aarch64 is a 64-bit architecture developed by ARM Holdings.
 	  http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
-- 
2.35.1

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

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

* [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
  2022-04-19 21:34 ` [Buildroot] [PATCH 2/5] arch/Config.in: remove BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64* Thomas Petazzoni via buildroot
@ 2022-04-19 21:34 ` Thomas Petazzoni via buildroot
  2022-05-18 20:24   ` Romain Naour
  2022-04-19 21:34 ` [Buildroot] [PATCH 4/5] arch: drop support for SH2A Thomas Petazzoni via buildroot
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-04-19 21:34 UTC (permalink / raw)
  To: Buildroot List, James Hilliard; +Cc: Thomas Petazzoni

So far, all ARM cores were selecting BR2_ARCH_HAS_MMU_OPTIONAL, except
no-MMU cores which were selecting nothing.

In practice, MMU-capable ARM cores are always used with their MMU
enabled, so it doesn't make sense to support the use case of not using
the MMU on such cores.

Consequently, to simplify things, we group the MMU handling in the
BR2_ARM_CPU_ARM* options: BR2_ARM_CPU_ARMV4, BR2_ARM_CPU_ARMV5,
BR2_ARM_CPU_ARMV6, BR2_ARM_CPU_ARMV7A, BR2_ARM_CPU_ARMV8A all select
BR2_ARCH_HAS_MMU_MANDATORY, while BR2_ARM_CPU_ARMV7M continues to
select nothing, indicating that there is no MMU available at all.

Fixes:

 http://autobuild.buildroot.net/results/33277d4687ca9a04dbfb02c50e5755ff9e55b0b4/ (FLAT
 selected on AArch64)

 http://autobuild.buildroot.net/results/5e34d11393e14fc36fd6e72b69679bc4fd1e3798/ (FLAT
 selected on AArch64 big-endian)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/Config.in.arm | 59 ++++------------------------------------------
 1 file changed, 5 insertions(+), 54 deletions(-)

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 85040ac89f..fa2e882550 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -73,21 +73,26 @@ config BR2_ARM_CPU_HAS_THUMB2
 
 config BR2_ARM_CPU_ARMV4
 	bool
+	select BR2_ARCH_HAS_MMU_MANDATORY
 
 config BR2_ARM_CPU_ARMV5
 	bool
+	select BR2_ARCH_HAS_MMU_MANDATORY
 
 config BR2_ARM_CPU_ARMV6
 	bool
+	select BR2_ARCH_HAS_MMU_MANDATORY
 
 config BR2_ARM_CPU_ARMV7A
 	bool
+	select BR2_ARCH_HAS_MMU_MANDATORY
 
 config BR2_ARM_CPU_ARMV7M
 	bool
 
 config BR2_ARM_CPU_ARMV8A
 	bool
+	select BR2_ARCH_HAS_MMU_MANDATORY
 
 choice
 	prompt "Target Architecture Variant"
@@ -103,23 +108,19 @@ config BR2_arm920t
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV4
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_arm922t
 	bool "arm922t"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV4
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_fa526
 	bool "fa526/626"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_ARMV4
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_strongarm
 	bool "strongarm sa110/sa1100"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_ARMV4
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 
 comment "armv5 cores"
 config BR2_arm926t
@@ -128,18 +129,15 @@ config BR2_arm926t
 	select BR2_ARM_CPU_MAYBE_HAS_VFPV2
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV5
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_iwmmxt
 	bool "iwmmxt"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_ARMV5
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_xscale
 	bool "xscale"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV5
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 
 comment "armv6 cores"
 config BR2_arm1136j_s
@@ -147,34 +145,29 @@ config BR2_arm1136j_s
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV6
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_arm1136jf_s
 	bool "arm1136jf-s"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_VFPV2
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV6
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_arm1176jz_s
 	bool "arm1176jz-s"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV6
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_arm1176jzf_s
 	bool "arm1176jzf-s"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_VFPV2
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV6
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_arm11mpcore
 	bool "mpcore"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_MAYBE_HAS_VFPV2
 	select BR2_ARM_CPU_HAS_THUMB
 	select BR2_ARM_CPU_ARMV6
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 
 comment "armv7a cores"
 config BR2_cortex_a5
@@ -184,7 +177,6 @@ config BR2_cortex_a5
 	select BR2_ARM_CPU_MAYBE_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a7
 	bool "cortex-A7"
 	select BR2_ARM_CPU_HAS_ARM
@@ -192,7 +184,6 @@ config BR2_cortex_a7
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a8
 	bool "cortex-A8"
 	select BR2_ARM_CPU_HAS_ARM
@@ -200,7 +191,6 @@ config BR2_cortex_a8
 	select BR2_ARM_CPU_HAS_VFPV3
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a9
 	bool "cortex-A9"
 	select BR2_ARM_CPU_HAS_ARM
@@ -208,7 +198,6 @@ config BR2_cortex_a9
 	select BR2_ARM_CPU_MAYBE_HAS_VFPV3
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a12
 	bool "cortex-A12"
 	select BR2_ARM_CPU_HAS_ARM
@@ -216,7 +205,6 @@ config BR2_cortex_a12
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a15
 	bool "cortex-A15"
 	select BR2_ARM_CPU_HAS_ARM
@@ -224,7 +212,6 @@ config BR2_cortex_a15
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a15_a7
 	bool "cortex-A15/A7 big.LITTLE"
 	select BR2_ARM_CPU_HAS_ARM
@@ -232,7 +219,6 @@ config BR2_cortex_a15_a7
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
 config BR2_cortex_a17
 	bool "cortex-A17"
@@ -241,7 +227,6 @@ config BR2_cortex_a17
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_cortex_a17_a7
 	bool "cortex-A17/A7 big.LITTLE"
@@ -250,14 +235,12 @@ config BR2_cortex_a17_a7
 	select BR2_ARM_CPU_HAS_VFPV4
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_pj4
 	bool "pj4"
 	select BR2_ARM_CPU_HAS_ARM
 	select BR2_ARM_CPU_HAS_VFPV3
 	select BR2_ARM_CPU_ARMV7A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 
 comment "armv7m cores"
 config BR2_cortex_m3
@@ -286,7 +269,6 @@ config BR2_cortex_a32
 	select BR2_ARM_CPU_HAS_THUMB2
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_cortex_a35
 	bool "cortex-A35"
@@ -295,7 +277,6 @@ config BR2_cortex_a35
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_cortex_a53
 	bool "cortex-A53"
@@ -304,7 +285,6 @@ config BR2_cortex_a53
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a57
 	bool "cortex-A57"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -312,7 +292,6 @@ config BR2_cortex_a57
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a57_a53
 	bool "cortex-A57/A53 big.LITTLE"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -320,7 +299,6 @@ config BR2_cortex_a57_a53
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_cortex_a72
 	bool "cortex-A72"
@@ -329,7 +307,6 @@ config BR2_cortex_a72
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_cortex_a72_a53
 	bool "cortex-A72/A53 big.LITTLE"
@@ -338,7 +315,6 @@ config BR2_cortex_a72_a53
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_cortex_a73
 	bool "cortex-A73"
@@ -347,7 +323,6 @@ config BR2_cortex_a73
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_cortex_a73_a35
 	bool "cortex-A73/A35 big.LITTLE"
@@ -356,7 +331,6 @@ config BR2_cortex_a73_a35
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_cortex_a73_a53
 	bool "cortex-A73/A53 big.LITTLE"
@@ -365,14 +339,12 @@ config BR2_cortex_a73_a53
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_emag
 	bool "emag"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_exynos_m1
 	bool "exynos-m1"
@@ -381,63 +353,54 @@ config BR2_exynos_m1
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_falkor
 	bool "falkor"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_phecda
 	bool "phecda"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_qdf24xx
 	bool "qdf24xx"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_thunderx
 	bool "thunderx (aka octeontx)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_thunderxt81
 	bool "thunderxt81 (aka octeontx81)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt83
 	bool "thunderxt83 (aka octeontx83)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt88
 	bool "thunderxt88"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt88p1
 	bool "thunderxt88p1"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_xgene1
 	bool "xgene1"
@@ -446,7 +409,6 @@ config BR2_xgene1
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 
 comment "armv8.1a cores"
@@ -455,21 +417,18 @@ config BR2_thunderx2t99
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderx2t99p1
 	bool "thunderx2t99p1"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_vulcan
 	bool "vulcan"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 
 comment "armv8.2a cores"
@@ -478,21 +437,18 @@ config BR2_cortex_a55
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 config BR2_cortex_a75
 	bool "cortex-A75"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 config BR2_cortex_a75_a55
 	bool "cortex-A75/A55 big.LITTLE"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 config BR2_cortex_a76
 	bool "cortex-A76"
@@ -501,7 +457,6 @@ config BR2_cortex_a76
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_cortex_a76_a55
 	bool "cortex-A76/A55 big.LITTLE"
@@ -510,7 +465,6 @@ config BR2_cortex_a76_a55
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_neoverse_n1
 	bool "neoverse-N1 (aka ares)"
@@ -519,14 +473,12 @@ config BR2_neoverse_n1
 	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_tsv110
 	bool "tsv110"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 
 comment "armv8.4a cores"
@@ -535,7 +487,6 @@ config BR2_saphira
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
-	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 endchoice
 
-- 
2.35.1

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

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

* [Buildroot] [PATCH 4/5] arch: drop support for SH2A
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
  2022-04-19 21:34 ` [Buildroot] [PATCH 2/5] arch/Config.in: remove BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64* Thomas Petazzoni via buildroot
  2022-04-19 21:34 ` [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection Thomas Petazzoni via buildroot
@ 2022-04-19 21:34 ` Thomas Petazzoni via buildroot
  2022-04-24  8:54   ` Yann E. MORIN
  2022-04-19 21:34 ` [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up Thomas Petazzoni via buildroot
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-04-19 21:34 UTC (permalink / raw)
  To: Buildroot List, James Hilliard
  Cc: Thomas De Schampheleire, Romain Naour, Giulio Benetti, Thomas Petazzoni

Until commit "arch/Config.in.sh: fixup MMU selection" in this series,
SH2A could either be used with BR2_USE_MMU disabled or BR2_USE_MMU
enabled.

The later made absolutely no sense, since SH2A does not have a MMU:
MMU support was introduced starting from SH3 according to
https://en.wikipedia.org/wiki/SuperH#SH-3

Also, since commit 22d5501e03b019218b718b5de7ca74824a8eaf42 ("arch:
tidy up binary formats config"), which was merged in Buildroot
2015.05, the architecture tuple used when BR2_sh2a=y and BR2_USE_MMU
disabled is sh2a-buildroot-uclinux-uclibc, and this was already
unsupported back in the days of Buildroot 2015.08 and binutils 2.24,
causing the build to fail with:

*** BFD does not support target sh2a-buildroot-uclinux-uclibc.

just like it fails to build today with recent version of binutils.

So, this has been broken since 2015.08, and nobody complained. SH2A is
seldomly used, so it's time to kill.

It is worth mentioning that there has been an attempt at resurrecting
SH2 support around 2015 (see https://lwn.net/Articles/647636/) as part
of the J2 core. This effort led to the addition of FDPIC support for
SH2A in the musl C library (and therefore proper ELF binaries, with
shared libraries), but that was never supported in Buildroot. Now that
the J2 project is essentially dead, there is no reason to bother with
this.

Fixes:

  http://autobuild.buildroot.net/results/63d01d33ae30f86b63b9f42a9fea116f2f3e9005/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy                        | 7 +++++++
 arch/Config.in.sh                       | 5 +----
 package/uclibc/Config.in                | 1 -
 toolchain/toolchain-buildroot/Config.in | 2 +-
 utils/genrandconfig                     | 9 +++------
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 27f19f14e7..1578ffd016 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2022.05"
 
+config BR2_sh2a
+	bool "sh2a architecture support removed"
+	select BR2_LEGACY
+	help
+	  The SuperH 2A (SH2A) architecture was not maintained, and
+	  broken, so its support was dropped.
+
 config BR2_PACKAGE_BOOST_LAYOUT_VERSIONED
 	bool "boost versioned layout removed"
 	select BR2_LEGACY
diff --git a/arch/Config.in.sh b/arch/Config.in.sh
index a012cbf491..f00954bb5e 100644
--- a/arch/Config.in.sh
+++ b/arch/Config.in.sh
@@ -5,8 +5,6 @@ choice
 	help
 	  Specific CPU variant to use
 
-config BR2_sh2a
-	bool "sh2a (SH2A big endian)"
 config BR2_sh4
 	bool "sh4 (SH4 little endian)"
 	select BR2_ARCH_HAS_MMU_MANDATORY
@@ -22,7 +20,6 @@ config BR2_sh4aeb
 endchoice
 
 config BR2_ARCH
-	default "sh2a"		if BR2_sh2a
 	default "sh4"		if BR2_sh4
 	default "sh4eb"		if BR2_sh4eb
 	default "sh4a"		if BR2_sh4a
@@ -33,7 +30,7 @@ config BR2_NORMALIZED_ARCH
 
 config BR2_ENDIAN
 	default "LITTLE"	if BR2_sh4 || BR2_sh4a
-	default "BIG"		if BR2_sh2a || BR2_sh4eb || BR2_sh4aeb
+	default "BIG"		if BR2_sh4eb || BR2_sh4aeb
 
 config BR2_READELF_ARCH_NAME
 	default "Renesas / SuperH SH"
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 2091166b62..310414bebc 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -124,7 +124,6 @@ config BR2_UCLIBC_MIPS_NAN
 
 config BR2_UCLIBC_SH_TYPE
 	string
-	default "SH2A" if BR2_sh2a
 	default "SH4"  if BR2_sh4 || BR2_sh4eb
 	depends on BR2_UCLIBC_TARGET_ARCH = "sh"
 
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 4004c0edf8..be89f68ab5 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -31,7 +31,7 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 		   BR2_arm     || BR2_armeb    || \
 		   BR2_i386    || BR2_m68k   || BR2_microblaze || \
 		   BR2_mips    || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
-		   BR2_or1k    || BR2_powerpc || BR2_RISCV_64 || BR2_sh2a   || \
+		   BR2_or1k    || BR2_powerpc || BR2_RISCV_64 || \
 		   BR2_sh4     || BR2_sh4eb   || BR2_sparc || BR2_xtensa || \
 		   BR2_x86_64
 	select BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/utils/genrandconfig b/utils/genrandconfig
index 59fe34e58d..adefb8f502 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -237,12 +237,9 @@ def fixup_config(sysinfo, configfile):
     if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \
        BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines:
         return False
-    # libffi not available on sh2a and ARMv7-M, but propagating libffi
-    # arch dependencies in Buildroot is really too much work, so we
-    # handle this here.
-    if 'BR2_sh2a=y\n' in configlines and \
-       'BR2_PACKAGE_LIBFFI=y\n' in configlines:
-        return False
+    # libffi not available on ARMv7-M, but propagating libffi arch
+    # dependencies in Buildroot is really too much work, so we handle
+    # this here.
     if 'BR2_ARM_CPU_ARMV7M=y\n' in configlines and \
        'BR2_PACKAGE_LIBFFI=y\n' in configlines:
         return False
-- 
2.35.1

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

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

* [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
                   ` (2 preceding siblings ...)
  2022-04-19 21:34 ` [Buildroot] [PATCH 4/5] arch: drop support for SH2A Thomas Petazzoni via buildroot
@ 2022-04-19 21:34 ` Thomas Petazzoni via buildroot
  2022-05-26  9:46   ` Peter Korsgaard
  2022-04-24  8:56 ` [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Yann E. MORIN
  2022-05-26  9:44 ` Peter Korsgaard
  5 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-04-19 21:34 UTC (permalink / raw)
  To: Buildroot List, James Hilliard; +Cc: Thomas Petazzoni

Now that all SuperH cores have a MMU, and must use it, move back the
select BR2_ARCH_HAS_MMU_MANDATORY one level up.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/Config.in    | 1 +
 arch/Config.in.sh | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/Config.in b/arch/Config.in
index d0d8854c2d..49e16fce38 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -226,6 +226,7 @@ config BR2_s390x
 
 config BR2_sh
 	bool "SuperH"
+	select BR2_ARCH_HAS_MMU_MANDATORY
 	help
 	  SuperH (or SH) is a 32-bit reduced instruction set computer
 	  (RISC) instruction set architecture (ISA) developed by
diff --git a/arch/Config.in.sh b/arch/Config.in.sh
index f00954bb5e..d3acc8ccf8 100644
--- a/arch/Config.in.sh
+++ b/arch/Config.in.sh
@@ -7,16 +7,12 @@ choice
 
 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
-- 
2.35.1

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

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

* Re: [Buildroot] [PATCH 4/5] arch: drop support for SH2A
  2022-04-19 21:34 ` [Buildroot] [PATCH 4/5] arch: drop support for SH2A Thomas Petazzoni via buildroot
@ 2022-04-24  8:54   ` Yann E. MORIN
  0 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2022-04-24  8:54 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Giulio Benetti, James Hilliard, Romain Naour,
	Thomas De Schampheleire, Buildroot List

Thomas, All,

On 2022-04-19 23:34 +0200, Thomas Petazzoni via buildroot spake thusly:
> Until commit "arch/Config.in.sh: fixup MMU selection" in this series,
> SH2A could either be used with BR2_USE_MMU disabled or BR2_USE_MMU
> enabled.
> 
> The later made absolutely no sense, since SH2A does not have a MMU:
> MMU support was introduced starting from SH3 according to
> https://en.wikipedia.org/wiki/SuperH#SH-3
> 
> Also, since commit 22d5501e03b019218b718b5de7ca74824a8eaf42 ("arch:
> tidy up binary formats config"), which was merged in Buildroot
> 2015.05, the architecture tuple used when BR2_sh2a=y and BR2_USE_MMU
> disabled is sh2a-buildroot-uclinux-uclibc, and this was already
> unsupported back in the days of Buildroot 2015.08 and binutils 2.24,
> causing the build to fail with:
> 
> *** BFD does not support target sh2a-buildroot-uclinux-uclibc.
> 
> just like it fails to build today with recent version of binutils.
> 
> So, this has been broken since 2015.08, and nobody complained. SH2A is
> seldomly used, so it's time to kill.

seldomly is archaic [0]; seldom is an adverb [1]. ;-)
[0] https://www.merriam-webster.com/dictionary/seldomly
[1] https://www.merriam-webster.com/dictionary/seldom

Applied to master, thanks.

Regards,
Yann E. MORIN.

> It is worth mentioning that there has been an attempt at resurrecting
> SH2 support around 2015 (see https://lwn.net/Articles/647636/) as part
> of the J2 core. This effort led to the addition of FDPIC support for
> SH2A in the musl C library (and therefore proper ELF binaries, with
> shared libraries), but that was never supported in Buildroot. Now that
> the J2 project is essentially dead, there is no reason to bother with
> this.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/63d01d33ae30f86b63b9f42a9fea116f2f3e9005/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  Config.in.legacy                        | 7 +++++++
>  arch/Config.in.sh                       | 5 +----
>  package/uclibc/Config.in                | 1 -
>  toolchain/toolchain-buildroot/Config.in | 2 +-
>  utils/genrandconfig                     | 9 +++------
>  5 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 27f19f14e7..1578ffd016 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -146,6 +146,13 @@ endif
>  
>  comment "Legacy options removed in 2022.05"
>  
> +config BR2_sh2a
> +	bool "sh2a architecture support removed"
> +	select BR2_LEGACY
> +	help
> +	  The SuperH 2A (SH2A) architecture was not maintained, and
> +	  broken, so its support was dropped.
> +
>  config BR2_PACKAGE_BOOST_LAYOUT_VERSIONED
>  	bool "boost versioned layout removed"
>  	select BR2_LEGACY
> diff --git a/arch/Config.in.sh b/arch/Config.in.sh
> index a012cbf491..f00954bb5e 100644
> --- a/arch/Config.in.sh
> +++ b/arch/Config.in.sh
> @@ -5,8 +5,6 @@ choice
>  	help
>  	  Specific CPU variant to use
>  
> -config BR2_sh2a
> -	bool "sh2a (SH2A big endian)"
>  config BR2_sh4
>  	bool "sh4 (SH4 little endian)"
>  	select BR2_ARCH_HAS_MMU_MANDATORY
> @@ -22,7 +20,6 @@ config BR2_sh4aeb
>  endchoice
>  
>  config BR2_ARCH
> -	default "sh2a"		if BR2_sh2a
>  	default "sh4"		if BR2_sh4
>  	default "sh4eb"		if BR2_sh4eb
>  	default "sh4a"		if BR2_sh4a
> @@ -33,7 +30,7 @@ config BR2_NORMALIZED_ARCH
>  
>  config BR2_ENDIAN
>  	default "LITTLE"	if BR2_sh4 || BR2_sh4a
> -	default "BIG"		if BR2_sh2a || BR2_sh4eb || BR2_sh4aeb
> +	default "BIG"		if BR2_sh4eb || BR2_sh4aeb
>  
>  config BR2_READELF_ARCH_NAME
>  	default "Renesas / SuperH SH"
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index 2091166b62..310414bebc 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -124,7 +124,6 @@ config BR2_UCLIBC_MIPS_NAN
>  
>  config BR2_UCLIBC_SH_TYPE
>  	string
> -	default "SH2A" if BR2_sh2a
>  	default "SH4"  if BR2_sh4 || BR2_sh4eb
>  	depends on BR2_UCLIBC_TARGET_ARCH = "sh"
>  
> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> index 4004c0edf8..be89f68ab5 100644
> --- a/toolchain/toolchain-buildroot/Config.in
> +++ b/toolchain/toolchain-buildroot/Config.in
> @@ -31,7 +31,7 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
>  		   BR2_arm     || BR2_armeb    || \
>  		   BR2_i386    || BR2_m68k   || BR2_microblaze || \
>  		   BR2_mips    || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
> -		   BR2_or1k    || BR2_powerpc || BR2_RISCV_64 || BR2_sh2a   || \
> +		   BR2_or1k    || BR2_powerpc || BR2_RISCV_64 || \
>  		   BR2_sh4     || BR2_sh4eb   || BR2_sparc || BR2_xtensa || \
>  		   BR2_x86_64
>  	select BR2_TOOLCHAIN_USES_UCLIBC
> diff --git a/utils/genrandconfig b/utils/genrandconfig
> index 59fe34e58d..adefb8f502 100755
> --- a/utils/genrandconfig
> +++ b/utils/genrandconfig
> @@ -237,12 +237,9 @@ def fixup_config(sysinfo, configfile):
>      if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \
>         BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines:
>          return False
> -    # libffi not available on sh2a and ARMv7-M, but propagating libffi
> -    # arch dependencies in Buildroot is really too much work, so we
> -    # handle this here.
> -    if 'BR2_sh2a=y\n' in configlines and \
> -       'BR2_PACKAGE_LIBFFI=y\n' in configlines:
> -        return False
> +    # libffi not available on ARMv7-M, but propagating libffi arch
> +    # dependencies in Buildroot is really too much work, so we handle
> +    # this here.
>      if 'BR2_ARM_CPU_ARMV7M=y\n' in configlines and \
>         'BR2_PACKAGE_LIBFFI=y\n' in configlines:
>          return False
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
                   ` (3 preceding siblings ...)
  2022-04-19 21:34 ` [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up Thomas Petazzoni via buildroot
@ 2022-04-24  8:56 ` Yann E. MORIN
  2022-05-26  9:44 ` Peter Korsgaard
  5 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2022-04-24  8:56 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: James Hilliard, Buildroot List

Thomas, All,

On 2022-04-19 23:34 +0200, Thomas Petazzoni via buildroot spake thusly:
> 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>

Whole series of 5 patches applied to master.

I reorganised them to apply all the Super-H patches together, then the
ARM patches, as I thought it made more sense to group by architecture
than by "MMU fixup".

Regards,
Yann E. MORIN.

> ---
>  arch/Config.in    | 1 -
>  arch/Config.in.sh | 4 ++++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/Config.in b/arch/Config.in
> index 98b0e40d51..e51ef60f40 100644
> --- a/arch/Config.in
> +++ b/arch/Config.in
> @@ -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
> diff --git a/arch/Config.in.sh b/arch/Config.in.sh
> index c1ba449dd5..a012cbf491 100644
> --- a/arch/Config.in.sh
> +++ b/arch/Config.in.sh
> @@ -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
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection
  2022-04-19 21:34 ` [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection Thomas Petazzoni via buildroot
@ 2022-05-18 20:24   ` Romain Naour
  2022-05-18 21:35     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 12+ messages in thread
From: Romain Naour @ 2022-05-18 20:24 UTC (permalink / raw)
  To: Thomas Petazzoni, Buildroot List, James Hilliard

Hello Thomas,

Le 19/04/2022 à 23:34, Thomas Petazzoni via buildroot a écrit :
> So far, all ARM cores were selecting BR2_ARCH_HAS_MMU_OPTIONAL, except
> no-MMU cores which were selecting nothing.
> 
> In practice, MMU-capable ARM cores are always used with their MMU
> enabled, so it doesn't make sense to support the use case of not using
> the MMU on such cores.

So, it means that we can remove qemu_arm_versatile_nommu_defconfig since
BR2_arm926t -> BR2_ARM_CPU_ARMV5 -> BR2_ARCH_HAS_MMU_MANDATORY

Best regards,
Romain


> 
> Consequently, to simplify things, we group the MMU handling in the
> BR2_ARM_CPU_ARM* options: BR2_ARM_CPU_ARMV4, BR2_ARM_CPU_ARMV5,
> BR2_ARM_CPU_ARMV6, BR2_ARM_CPU_ARMV7A, BR2_ARM_CPU_ARMV8A all select
> BR2_ARCH_HAS_MMU_MANDATORY, while BR2_ARM_CPU_ARMV7M continues to
> select nothing, indicating that there is no MMU available at all.
> 
> Fixes:
> 
>  http://autobuild.buildroot.net/results/33277d4687ca9a04dbfb02c50e5755ff9e55b0b4/ (FLAT
>  selected on AArch64)
> 
>  http://autobuild.buildroot.net/results/5e34d11393e14fc36fd6e72b69679bc4fd1e3798/ (FLAT
>  selected on AArch64 big-endian)
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  arch/Config.in.arm | 59 ++++------------------------------------------
>  1 file changed, 5 insertions(+), 54 deletions(-)
> 
> diff --git a/arch/Config.in.arm b/arch/Config.in.arm
> index 85040ac89f..fa2e882550 100644
> --- a/arch/Config.in.arm
> +++ b/arch/Config.in.arm
> @@ -73,21 +73,26 @@ config BR2_ARM_CPU_HAS_THUMB2
>  
>  config BR2_ARM_CPU_ARMV4
>  	bool
> +	select BR2_ARCH_HAS_MMU_MANDATORY
>  
>  config BR2_ARM_CPU_ARMV5
>  	bool
> +	select BR2_ARCH_HAS_MMU_MANDATORY
>  
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection
  2022-05-18 20:24   ` Romain Naour
@ 2022-05-18 21:35     ` Thomas Petazzoni via buildroot
  2022-05-26  9:49       ` Peter Korsgaard
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-05-18 21:35 UTC (permalink / raw)
  To: Romain Naour; +Cc: James Hilliard, Buildroot List

On Wed, 18 May 2022 22:24:28 +0200
Romain Naour <romain.naour@gmail.com> wrote:

> > In practice, MMU-capable ARM cores are always used with their MMU
> > enabled, so it doesn't make sense to support the use case of not using
> > the MMU on such cores.  
> 
> So, it means that we can remove qemu_arm_versatile_nommu_defconfig since
> BR2_arm926t -> BR2_ARM_CPU_ARMV5 -> BR2_ARCH_HAS_MMU_MANDATORY

Yes. I don't think supporting ARMv5 noMMU makes much sense, as
explained in the commit log. Supporting ARMv7-M definitely makes sense,
but not ARMv5 noMMU.

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] 12+ messages in thread

* Re: [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection
  2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
                   ` (4 preceding siblings ...)
  2022-04-24  8:56 ` [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Yann E. MORIN
@ 2022-05-26  9:44 ` Peter Korsgaard
  5 siblings, 0 replies; 12+ messages in thread
From: Peter Korsgaard @ 2022-05-26  9:44 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: James Hilliard, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > 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>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up
  2022-04-19 21:34 ` [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up Thomas Petazzoni via buildroot
@ 2022-05-26  9:46   ` Peter Korsgaard
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Korsgaard @ 2022-05-26  9:46 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: James Hilliard, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > Now that all SuperH cores have a MMU, and must use it, move back the
 > select BR2_ARCH_HAS_MMU_MANDATORY one level up.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection
  2022-05-18 21:35     ` Thomas Petazzoni via buildroot
@ 2022-05-26  9:49       ` Peter Korsgaard
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Korsgaard @ 2022-05-26  9:49 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot
  Cc: Romain Naour, James Hilliard, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Wed, 18 May 2022 22:24:28 +0200
 > Romain Naour <romain.naour@gmail.com> wrote:

 >> > In practice, MMU-capable ARM cores are always used with their MMU
 >> > enabled, so it doesn't make sense to support the use case of not using
 >> > the MMU on such cores.  
 >> 
 >> So, it means that we can remove qemu_arm_versatile_nommu_defconfig since
 >> BR2_arm926t -> BR2_ARM_CPU_ARMV5 -> BR2_ARCH_HAS_MMU_MANDATORY

 > Yes. I don't think supporting ARMv5 noMMU makes much sense, as
 > explained in the commit log. Supporting ARMv7-M definitely makes sense,
 > but not ARMv5 noMMU.

So what do we about the test coverage from
qemu_arm_versatile_nommu_defconfig? Does QEMU emulate any ARMv7-M
platforms we could use instead?

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-05-26  9:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 21:34 [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Thomas Petazzoni via buildroot
2022-04-19 21:34 ` [Buildroot] [PATCH 2/5] arch/Config.in: remove BR2_ARCH_HAS_MMU_MANDATORY from BR2_aarch64* Thomas Petazzoni via buildroot
2022-04-19 21:34 ` [Buildroot] [PATCH 3/5] arch/Config.in.arm: re-organize MMU selection Thomas Petazzoni via buildroot
2022-05-18 20:24   ` Romain Naour
2022-05-18 21:35     ` Thomas Petazzoni via buildroot
2022-05-26  9:49       ` Peter Korsgaard
2022-04-19 21:34 ` [Buildroot] [PATCH 4/5] arch: drop support for SH2A Thomas Petazzoni via buildroot
2022-04-24  8:54   ` Yann E. MORIN
2022-04-19 21:34 ` [Buildroot] [PATCH 5/5] arch/Config.in.sh: move BR2_ARCH_HAS_MMU_MANDATORY one level up Thomas Petazzoni via buildroot
2022-05-26  9:46   ` Peter Korsgaard
2022-04-24  8:56 ` [Buildroot] [PATCH 1/5] arch/Config.in.sh: fixup MMU selection Yann E. MORIN
2022-05-26  9:44 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.