kumquat-buildroot/arch/Config.in.sh

36 lines
710 B
Bash
Raw Normal View History

choice
prompt "Target Architecture Variant"
default BR2_sh4
depends on BR2_sh
help
Specific CPU variant to use
config BR2_sh4
bool "sh4 (SH4 little endian)"
config BR2_sh4eb
bool "sh4eb (SH4 big endian)"
config BR2_sh4a
bool "sh4a (SH4A little endian)"
config BR2_sh4aeb
bool "sh4aeb (SH4A big endian)"
endchoice
config BR2_ARCH
default "sh4" if BR2_sh4
default "sh4eb" if BR2_sh4eb
default "sh4a" if BR2_sh4a
default "sh4aeb" if BR2_sh4aeb
core: introduce NORMALIZED_ARCH as non-kernel replacement for KERNEL_ARCH The variable 'KERNEL_ARCH' is actually a normalized version of 'ARCH'/'BR2_ARCH'. For example, 'arcle' and 'arceb' both become 'arc', just as all powerpc variants become 'powerpc'. It is presumably called 'KERNEL_ARCH' because the Linux kernel is typically the first place where support for a new architecture is added, and thus is the entity that defines the normalized name. However, the term 'KERNEL_ARCH' can also be interpreted as 'the architecture used by the kernel', which need not be exactly the same as 'the normalized name for a certain arch'. In particular, for cases where a 64-bit architecture is running a 64-bit kernel but 32-bit userspace. Examples include: * aarch64 architecture, with aarch64 kernel and 32-bit (ARM) userspace * x86_64 architecture, with x86_64 kernel and 32-bit (i386) userspace In such cases, the 'architecture used by the kernel' needs to refer to the 64-bit name (aarch64, x86_64), whereas all userspace applications need to refer the, potentially normalized, 32-bit name. This means that there need to be two different variables: KERNEL_ARCH: the architecture used by the kernel NORMALIZED_ARCH: the normalized name for the current userspace architecture At this moment, both will actually have the same content. But a subsequent patch will add basic support for situations described above, in which KERNEL_ARCH may become overwritten to the 64-bit architecture, while NORMALIZED_ARCH needs to remain the same (32-bit) case. This commit replaces use of KERNEL_ARCH where actually the userspace arch is needed. Places that use KERNEL_ARCH in combination with building of kernel modules are not touched. There may be cases where a package builds both a kernel module as userspace, in which case it may need to know about both KERNEL_ARCH and NORMALIZED_ARCH, for the case where they differ. But this is to be fixed on a per-need basis. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Reviewed-by: Romain Naour <romain.naour@gmail.com> [Arnout: Also rename BR2_KERNEL_ARCH to BR2_NORMALIZED_ARCH] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-15 21:03:00 +01:00
config BR2_NORMALIZED_ARCH
default "sh"
config BR2_ENDIAN
default "LITTLE" if BR2_sh4 || BR2_sh4a
arch: drop support for SH2A 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 seldom used, so it's time to kill it. It is worth mentioning that there had 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> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-04-19 23:34:48 +02:00
default "BIG" if BR2_sh4eb || BR2_sh4aeb
config BR2_READELF_ARCH_NAME
default "Renesas / SuperH SH"
# vim: ft=kconfig
# -*- mode:kconfig; -*-