当我试图为apalis-aimx6-Quad板制作U-Boot时,列表下方显示了我的配置的详细信息:
- cross_compiler = aarch64-Ingnux-gnu
1.1它已经导出到路径
1.2交叉编译器的Menuconfig仍然像以前一样保留。
- 主机linux版本= 5.4.0-109生成#123〜123〜18.04.1-ubuntu
- 版本的交叉编译器:crosstool-ng-1.25-rc2,
根据上述软件和硬件属性,我在尝试时会出现以下错误要使用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
错误解决方案是什么?
第二个问题是:
在./ct-ng列表样本中,哪种样本适合我的董事会?
cpu-name =nxp®I.MX6 QUAD
CPU型:4X ARM Cortex™-A9
CPU-CLOCK:800MHz
浮点单位:VFPV3
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
发布评论
评论(2)
您使用的是错误的编译器,即来自Linux PC的GCC,这就是为什么错误消息建议使用
corei7
诸如-mtune
之类的值。选项。这样说,因为您的apalis-aimx6-Quad Soc是
Cortex-A9
,因此其体系结构是armv7-a
,因此您无法使用针对目标的编译器ARMV8-A
体系结构,例如您正在使用的aarch64-inch64-Innux-gnu-gcc
。您应该宁愿使用ARM-INKNOWN-LINUX-GNU-GCC
或ARM-NONE-NONE-AEBI-GCC
。我强烈建议使用官方的ARM工具链,例如,用于构建U-Boot,并避免使用最新的11.2版本:由于内部编译器错误,我在使用U-Boot时无法构建U-Boot。您应该使用
cross_compile =
,而不是cross_compiler =
在构建命令中,这就是为什么您使用系统GCC而不是Aarch64-Ingnown--用于构建U-Boot的Linux-GNU-GCC。最重要的是,您的构建命令应该是:
完成构建命令后,您应该看到U-Boot trafacts:
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:
我也为RPI 4做同样的事情,以下命令行所做的事情:
I also do the same thing for RPI 4 which the following command lines do: