When I am trying to make u-boot for apalis-aimx6-quad board, and below list is shows the details of my configuration:
- CROSS_COMPILER = aarch64-unknown-linux-gnu 1.1 it already exported to path 1.2 menuconfig of the cross compiler remains as before.
- Host Linux version = 5.4.0-109-generic #123~18.04.1-Ubuntu
- version of the cross compiler : crosstool-ng-1.25-rc2
according to the mentioned software and hardware properties, I faced with the following error when i try to make the boot-loader for my board using u-boot:
cc1: error: bad value (‘generic-armv7-a’) for ‘-mtune=’ switch
cc1: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7
westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell
skylake skylake-avx512 bonnell atom silvermont slm knl intel x86-64 eden-x2
nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron
opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3
bdver4 znver1 btver1 btver2 generic
scripts/Makefile.build:147: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1965: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
what can be the error solution?
and the Second question is: in the ./ct-ng list-samples what type of samples are suitable for my board?
CPU-NAME = NXP® i.MX 6Quad CPU-TYPE : 4x Arm Cortex™-A9 CPU-CLOCK : 800MHz FLOATING-POINT-UNIT : VFPv3
You are using the wrong compiler, i.e. the gcc from your Linux PC, this is why the error message is suggesting to use values such as
corei7
for the-mtune
option.This being said, because your apalis-aimx6-quad SoC is a
Cortex-A9
,its architecture isArmv7-a
and you therefore cannot use a compiler targeting theArmv8-a
architecture, such as theaarch64-unknown-linux-gnu-gcc
you are using. You should rather use, say,arm-unknown-linux-gnu-gcc
orarm-none-eabi-gcc
.I would strongly suggest to use an official Arm toolchain, such as this one (available here), for building u-boot, and to avoid using the latest 11.2 version: I have been unable to build u-boot when using it because of an internal compiler error.You should use
CROSS_COMPILE=
, and notCROSS_COMPILER=
in your build command,and this is the reason why you were using your system gcc instead of aarch64-unknown-linux-gnu-gcc for building u-boot.Bottom line, your build command should be something like:
After completion of the build command, you should see the u-boot artefacts: