Compile the boot loader

Hello all, I want to build U-Boot and I followed step by step from https://developer.toradex.com/knowledge-base/build-u-boot-and-linux-kernel-from-source-code#7-64-bit-arm and I got those errors from Compilation
The following is the procedure to compile the boot loader: make -j3 2>&1 | tee build.log

make -j3 2>&1 | tee build.log
scripts/kconfig/conf  --syncconfig Kconfig
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
  UPD     include/generated/dt.h
  UPD     include/generated/timestamp_autogenerated.h
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.c
  YACC    scripts/dtc/dtc-parser.tab.h
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTLD  scripts/dtc/dtc
  UPD     include/config/uboot.release
  UPD     include/generated/version_autogenerated.h
  CC      arch/arm/lib/asm-offsets.s
  CC      lib/asm-offsets.s
lib/asm-offsets.c:1:0: error: bad value (generic-armv7-a) for -mtune= switch
 // SPDX-License-Identifier: GPL-2.0+
 
scripts/Makefile.build:155: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
make[1]: *** Waiting for unfinished jobs....
arch/arm/lib/asm-offsets.c:1:0: error: bad value (generic-armv7-a) for -mtune= switch
 // SPDX-License-Identifier: GPL-2.0+
 
scripts/Makefile.build:155: recipe for target 'arch/arm/lib/asm-offsets.s' failed
make[1]: *** [arch/arm/lib/asm-offsets.s] Error 1
Makefile:1839: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

Thanks a lot for your help.

Do have exectuted:

make <defconfig file>

before?

Output looks like you were trying to build u-boot without a configuration.

Kind regards,
Sebastian

Yes, I executed: make colibri-imx6ull_defconfig

Do you have made any changes to the u-boot source code?

Somehow the mtune parameter is set to a wrong value.

Maybe a missing quote or sth. like that in the board configuration file.

Hello @Dumitru, Hello @seho85 ,

What BSP version are you using?

following the same guide as you did, the same error pops up, if the toolchain for cross-compiling is not installed.

Did you follow the link in the guide to download the corresponding Cross Compiler? Be aware that if you’re using linux, the file you download needs to have the word “linux” in its filename.

Furthermore, did you check if all your environment variables are set accordingly? Be sure that the toolchain path is correct.

After completing these steps, the next command “make -j3 2>&1 | tee build.log” should run without errors.

Best Regards
Kevin

Hello @kevin.tx,

I have BSP 5.0, I downloaded exactly file from your link and still the same error.

Hello @Dumitru,

to help you further with your issue, we would need some additional information about your setup and environment.

Can you post the response from the env command?

The link I sent you leads to a list of files, which one did you download?

Do you get any other error messages that contain information, which could help us solve the issue?

Best Regards
Kevin

Thank you for support, I solved!

Thanks for update. Glad your problem was solved.