imx-digi-base.inc: Set generic tuning for i.MX8/i.MX9

This replicates meta-imx commit addc08b02f9a, which was added to be able to
re-use packages in i.MX8/i.MX9 builds. Without this change, there are
compilation errors when building recent versions of the onnxruntime package
because some .S files are built with specific -march switches that conflict
with our current tunings. For example, when building for the ccimx8x-sbc-pro:

    cc1: error: switch '-mcpu=cortex-a35+crc+crypto' conflicts with '-march=armv8.2-a+fp16' switch [-Werror]
    [...]HalfGemmKernelNeon.S:151: Error: selected processor does not support `fmla v20.8h,v16.8h,v0.h[0]'

Using the generic tuning solves this issue, and according to the log in the
original meta-imx commit, this has minimal to no impact on binaries, so use
said tuning in all relevant platforms.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-12-19 16:59:34 +01:00
parent 02be8225ca
commit 99134ca87c
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,7 @@ XSERVER = "xserver-xorg \
# Ship kernel modules
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
# DEFAULTTUNE values ported form meta-freescale (imx-base.inc)
# Tunes for hard/soft float-point selection. Note that we allow building for
# thumb support giving distros the chance to enable thumb by setting
# ARM_INSTRUCTION_SET = "thumb"
@ -47,6 +48,13 @@ DEFAULTTUNE:mx8x-generic-bsp ?= "cortexa35-crypto"
DEFAULTTUNE:mx91-generic-bsp ?= "cortexa55"
DEFAULTTUNE:mx93-generic-bsp ?= "cortexa55"
# DEFAULTTUNE values ported form meta-imx (fsl-imx-base.inc)
# Set a more generic tuning for code reuse across parts
DEFAULTTUNE:mx8m-nxp-bsp ?= "armv8a-crc-crypto"
DEFAULTTUNE:mx8x-nxp-bsp ?= "armv8a-crc-crypto"
DEFAULTTUNE:mx91-nxp-bsp ?= "armv8a-crc-crypto"
DEFAULTTUNE:mx93-nxp-bsp ?= "armv8a-crc-crypto"
INHERIT += "machine-overrides-extender"
#######