Unknown value ‘generic-armv7-a’ for ‘-mtune’

Hi,

Hi,

i am using colibri-imx6ull SOM and trying to create the costume linux by using “Build U-Boot From Source Code | Toradex Developer Center
right now i am in the phase of host image creation in host device,
while i am trying to follow the same i am facing the following issue


lcl@lcl-Latitude-5430:~/workdir/u-boot$ make colibri-imx6ull_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf

configuration written to .config

lcl@lcl-Latitude-5430:~/workdir/u-boot$ make u-boot-dtb.imx
scripts/kconfig/conf --syncconfig Kconfig
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
UPD include/config/uboot.release
UPD include/generated/version_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
UPD include/generated/dt.h
ENVC include/generated/env.txt
ENVP include/generated/env.in
ENVT include/generated/environment.h
CC lib/asm-offsets.s
cc1: error: unknown value ‘generic-armv7-a’ for ‘-mtune’
cc1: note: valid arguments are: cortex-a34 cortex-a35 cortex-a53 cortex-a57 cortex-a72 cortex-a73 thunderx thunderxt88p1 thunderxt88 octeontx octeontx81 octeontx83 thunderxt81 thunderxt83 ampere1 ampere1a emag xgene1 falkor qdf24xx exynos-m1 phecda thunderx2t99p1 vulcan thunderx2t99 cortex-a55 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a78 cortex-a78ae cortex-a78c cortex-a65 cortex-a65ae cortex-x1 ares neoverse-n1 neoverse-e1 octeontx2 octeontx2t98 octeontx2t96 octeontx2t93 octeontx2f95 octeontx2f95n octeontx2f95mm a64fx tsv110 thunderx3t110 zeus neoverse-v1 neoverse-512tvb saphira cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-r82 cortex-a510 cortex-a710 cortex-x2 neoverse-n2 demeter neoverse-v2 generic
make[1]: *** [scripts/Makefile.build:147: lib/asm-offsets.s] Error 1
make: *** [Makefile:1965: prepare0] Error 2

i followed all the steps as per website mentioned above.

thanks in advance.

host configurations:

lcl@lcl-Latitude-5430:~/workdir/u-boot$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

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?

:+1: :-1:


Hello,

The error you’re encountering, cc1: error: unknown value ‘generic-armv7-a’ for ‘-mtune’, suggests that the compiler does not recognize the specified tuning for the ARMv7 architecture. This issue typically arises from a mismatch between the compiler’s capabilities and the specified architecture or tuning parameters in the build process.

For the Colibri iMX6ULL, which is based on an ARM Cortex-A7 core, the correct -mtune and -march parameters should indeed target the ARMv7 architecture. However, the error message indicates that the compiler expects a specific core name rather than a generic tuning parameter.

Here are a few steps to troubleshoot and potentially resolve this issue:

  1. Ensure Compatibility of the Toolchain: Verify that the cross-compilation toolchain you’re using supports the ARMv7 architecture. The Colibri iMX6ULL requires a toolchain that supports ARM Cortex-A7 cores. If you’re using a toolchain provided by or recommended for Toradex, it should be compatible.

  2. Check the Toolchain Version: Sometimes, newer or older versions of the toolchain might have different defaults or support different parameters. Ensure that your toolchain version is compatible with the instructions provided for building U-Boot for the Colibri iMX6ULL.

  3. Specify the Correct Architecture and Tuning Manually: If the toolchain is correct and supports the necessary architecture, you might need to manually specify the architecture and tuning parameters in the make command or the U-Boot configuration. For the Cortex-A7, you could use -march=armv7-a -mtune=cortex-a7.

  4. Update or Reconfigure the Build Environment: Ensure your build environment is clean and correctly set up. Sometimes, residual configuration from previous builds can cause conflicts. A clean build environment ensures that old configurations do not interfere with the current build process.

  5. Review the U-Boot Configuration: Double-check the U-Boot configuration for the Colibri iMX6ULL (colibri-imx6ull_defconfig) to ensure it does not contain any incorrect settings for the CPU architecture or tuning parameters.

If after these steps the issue persists, it might be helpful to verify the exact command and environment variables used during the compilation process. Ensuring that the CROSS_COMPILE environment variable is set to the correct toolchain prefix and that the toolchain bin directory is in your PATH can also be crucial for a successful build.

Best regards

Please, also check if these links can help you solve your problem:

Build Linux Kernel from Source Code | Toradex Developer Center.

i followed below steps for tool chain
$ wget -O arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz “https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz?rev=cf8baa0ef2e54e9286f0409cdda4f66c&hash=4E1BA6BFC2C09EA04DBD36C393C9DD3A
$ tar xvf arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
$ ln -s arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu gcc-linaro-aarch64
$ export ARCH=arm64
$ export DTC_FLAGS=“-@”
$ export PATH=~/gcc-linaro-aarch64/bin/:$PATH
$ export CROSS_COMPILE=aarch64-none-linux-gnu-

Hi,
but issue not resolved please help

Hi @sai_sankar,

The article that you referred talks about building only u-boot which is just a part of the image.
Please let us know what customization you want to achieve.