buildroot/boot
Thomas De Schampheleire dd8a410eaf 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-02-08 21:20:23 +01:00
..
afboot-stm32 boot/afboot-stm32: upgrade version 2021-12-17 22:58:11 +01:00
arm-trusted-firmware boot/arm-trusted-firmware: point LICENSE_FILES to correct file 2021-09-24 21:49:37 +02:00
at91bootstrap boot/at91bootstrap: rename patches with the proper naming convention 2021-12-11 20:48:58 +01:00
at91bootstrap3 boot/at91bootstrap3: add svn repository method 2021-12-30 17:36:45 +01:00
at91dataflashboot boot/at91dataflashboot: rename patches with the proper naming convention 2021-12-11 20:48:58 +01:00
barebox core: introduce NORMALIZED_ARCH as non-kernel replacement for KERNEL_ARCH 2022-02-08 21:20:23 +01:00
beaglev-ddrinit boot/beaglev-ddrinit: update to c0839f25 to add LICENSE file 2021-07-13 21:18:19 +02:00
beaglev-secondboot boot/beaglev-secondboot: update to 2d200479 to add LICENSE file 2021-07-13 21:18:50 +02:00
binaries-marvell binaries-marvell: bump version and switch to common firmware 2019-09-21 18:31:26 +02:00
boot-wrapper-aarch64 boot/boot-wrapper-aarch64: bump version 2021-01-02 18:42:57 +01:00
edk2 boot/edk2: add support to build 32bit edk2 when using x86_64 architecture 2021-10-15 21:34:25 +02:00
grub2 package: remove numbered subject from patches 2021-12-11 20:48:58 +01:00
gummiboot board, boot, package: remove usage of startup.nsh in EFI partition 2021-09-27 21:27:02 +02:00
lpc32xxcdl boot/lpc32xxcdl: rename patches with the proper naming convention 2021-12-11 20:48:58 +01:00
mv-ddr-marvell boot/mv-ddr-marvell: fix license file hash 2021-09-24 21:45:20 +02:00
mxs-bootlets boot/*/Config.in: fix attributes order 2018-04-01 08:06:37 +02:00
opensbi boot/opensbi: introduce BR2_TARGET_OPENSBI_FW_FDT_PATH 2021-07-18 21:24:37 +02:00
optee-os boot/optee-os: bump to version 3.15.0 2021-10-27 22:28:03 +02:00
s500-bootloader boot: add s500-bootloader package 2016-05-26 10:35:34 +02:00
shim boot/shim: re-enable on ARM32 2021-04-06 11:46:09 +02:00
sun20i-d1-spl boot/sun20i-d1-spl: new package 2021-11-08 09:45:40 +01:00
syslinux boot/syslinux: define OBJCOPY and AS 2021-11-30 17:39:58 +01:00
uboot core: introduce NORMALIZED_ARCH as non-kernel replacement for KERNEL_ARCH 2022-02-08 21:20:23 +01:00
vexpress-firmware support/download: change format of archives generated from git 2021-01-10 22:06:58 +01:00
common.mk Fix build reproducibility in Make 3.82 2013-09-06 23:27:42 +02:00
Config.in boot/sun20i-d1-spl: new package 2021-11-08 09:45:40 +01:00