Kampi
August 22, 2024, 6:47am
1
Hello,
I´m working on a Yocto project for a iMX8M based product and Yocto is showing me that no target FPU is set:
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-22.04"
TARGET_SYS = "aarch64-tdx-linux"
MACHINE = "verdin-imx8mm"
DISTRO = "tdx-xwayland"
DISTRO_VERSION = "5.7.2-devel-20240822062915+build.0"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta-hannah-bsp = "main:437bee986e5ff568ca3b12bce04f5270f7d49563"
meta-toradex-nxp = "HEAD:b288744310a77181db0fde2bee5d86e7d890f28b"
meta-freescale = "HEAD:325c08c0773a2f1c54d28ea8aeda7c3d110d88a3"
meta-freescale-3rdparty = "HEAD:f37f72a85ba273b27347169b727c889f42b91d6c"
meta-toradex-tegra = "HEAD:43b5af1d01a9c166e41e0ec3c93efc57c5c130b9"
meta-toradex-bsp-common = "HEAD:f88e4c50e64ca144a7a15bd50c92a13d325f6780"
meta-oe = "HEAD:01358b6d705071cc0ac5aefa7670ab235709729a"
...
I checked verdin-im8mm.conf
from Toradex and there is no FPU used, but the processor supports a FPU for the A53 cores.
How can I enable this and NEON support?
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
To set the target FPU and enable NEON support for the Verdin iMX8M Mini in your Yocto project, you need to modify the machine configuration file (verdin-imx8mm.conf
) or create a custom layer to override the default settings. Here’s how you can do it:
Edit the Machine Configuration File:
Locate the verdin-imx8mm.conf
file in your Yocto project. This file is typically found in the meta-toradex-nxp/conf/machine/
directory.
Open the file and add the following lines to set the FPU and enable NEON support:
TUNE_FEATURES_append = " neon"
TARGET_FPU = "hard"
Create a Custom Layer (Optional):
If you prefer not to modify the original machine configuration file, you can create a custom layer to override the settings.
Create a new layer (if you don’t have one already) and add a conf/machine/
directory within it.
Create a new file named verdin-imx8mm.conf
in the conf/machine/
directory of your custom layer.
Add the following lines to the new verdin-imx8mm.conf
file:
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa53.inc
TUNE_FEATURES_append = " neon"
TARGET_FPU = "hard"
Rebuild Your Yocto Project:
After making the changes, rebuild your Yocto project to apply the new settings.
This will enable the FPU and NEON support for the A53 cores on the Verdin iMX8M Mini.
Best regards, Toradex AI Assistant
Kampi
August 22, 2024, 6:56am
3
I added
TUNE_FEATURES_append = " neon"
TARGET_FPU = "hard"
at the end of the verdin-im8mm.conf
file but Yocto isn´t showing a target FPU.
Hello @Kampi ,
Do you get an error message saying “no FPU is set” during your yocto build?
If yes, could you please post your error logs here?
Also, could you please try a clean build and see if that solves the issue?
Kampi
August 23, 2024, 6:01am
5
Hi @rudhi.tx
thanks for your response. I figured out the problem. It looks like the old build files weren´t cleaned up completely so the new configuration wasn´t applied. After fixing this I get the following output
TUNE_FEATURES = "aarch64 cortexa53 crc crypto neon"
TARGET_FPU = "hard"
meta-hannah-bsp = "ZD0022-217:d50ab75ac92eab5d1e19dd59fdae582b52477a02"
meta-toradex-nxp = "HEAD:b288744310a77181db0fde2bee5d86e7d890f28b"
1 Like
@Kampi
Thanks for the update! Was the build successful this time?
Kampi
August 23, 2024, 8:39am
7
Hi @rudhi.tx
no. I got a build error which I can not explain:
| checking for aarch64-tdx-linux-gcc... aarch64-tdx-linux-gcc -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=build/tmp/work/aarch64-tdx-linux/libgcc-initial/9.5.0-r0/recipe-sysroot
| checking for suffix of object files... configure: error: in `build/tmp/work/aarch64-tdx-linux/libgcc-initial/9.5.0-r0/build/libgcc':
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log' for more details
I added this
TUNE_FEATURES_append = " neon"
TARGET_FPU = "hard"
to my verdin-imx8mm.conf
in my custom layer so it looks like this
MACHINE_NAME = "Verdin-iMX8MM"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
IMX_DEFAULT_BSP = "nxp"
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa53.inc
TUNE_FEATURES_append = " neon"
TARGET_FPU = "hard"
...
The build error doesn´t occur when I remove TUNE_FEATURES_append
and TARGET_FPU
so it´s definitly related to this change.
Edit: It seems that this is related to the neon
feature.
Hello @Kampi ,
I think the error is related to “append” with TUNE_FEATURES
. Could you please try with the following in verdin-imx8mm.conf
file:
TUNE_FEATURES = "aarch64 armv8a crc cortexa53 neon"
TARGET_FPU = "hard"
Kampi
August 23, 2024, 12:25pm
9
Hi @rudhi.tx
it´s still the same issue.
Hello @Kampi ,
You are right, I also get these errors after a clean build. But I could solve it with this:
TUNE_FEATURES = "aarch64 cortexa53"
TARGET_FPU = "neon"
Could you please try a clean build with (I tested with a minimal image here):
bitbake -c cleansstate libgcc
bitbake -c cleansstate tdx-reference-minimal-image
bitbake tdx-reference-minimal-image