Problem building u-boot

Jerry Van Baren gvb.uboot at
Wed Feb 5 17:19:38 CET 2020

Hi Olivier,

On Wed, Feb 5, 2020 at 11:01 AM Olivier BERTON <
olivier.berton at> wrote:

> Hi,
> I'm a student working on ZedBoard FPGA, and I have to install a custom
> Linux on the ZedBoard.
> I have to build u-boot, so I'm following this Wiki :
> In the third command I have to enter "Make", and I get this error :
> 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
> Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
> make[1]: *** [lib/asm-offsets.s] Error 1
> Makefile:1579: recipe for target 'prepare0' failed
> make: *** [prepare0] Error 2

You are using your default x86 compiler toolchain for the compiler. This
doesn't work because the ZedBoard is an ARM processor.

You need to install the ARM cross compiler toolchain and set CROSS_COMPILE
appropriately. For Ubuntu/apt based systems...
$ apt-get install crossbuild-essential-armhf
$ export CROSS_COMPILE=gcc-7-arm-linux-gnueabihf-

(The above may be inaccurate in its details because I did not actually
execute the commands on my computer.)


More information about the U-Boot mailing list