From 99134ca87ca45924d46b634f5b62ab5293c12220 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Thu, 19 Dec 2024 16:59:34 +0100 Subject: [PATCH] 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 --- meta-digi-arm/conf/machine/include/imx-digi-base.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index c5627a7c7..36affae9e 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -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" #######