UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie jasongutel
Newbie
15,525 Views
Registered: ‎10-13-2015

making u-boot.elf for ZedBoard

Jump to solution

I am attempting to make the u-boot.elf file for the ZedBoard following this guide. I am running into an error though that I am not sure how to resolve. Has anyone seen this before?

 

$ git clone https://github.com/Xilinx/u-boot-xlnx.git
Cloning into 'u-boot-xlnx'...
remote: Counting objects: 339952, done.
remote: Total 339952 (delta 0), reused 0 (delta 0), pack-reused 339952
Receiving objects: 100% (339952/339952), 88.98 MiB | 22.22 MiB/s, done.
Resolving deltas: 100% (268194/268194), done.
Checking connectivity... done.

$ cd ./u-boot-xlnx/
$ make zynq_zed_config

#
# configuration written to .config
#

$ make
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch
 /*
 ^
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1228: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
0 Kudos
1 Solution

Accepted Solutions
Newbie jasongutel
Newbie
28,233 Views
Registered: ‎10-13-2015

Re: making u-boot.elf for ZedBoard

Jump to solution

Resolved. Wish I could delete this post :)

 

sudo apt-get install arm-linux-gnueabi
sudo apt-get install device-tree-overlay
export CROSS_COMPILE=arm-linux-gnueabi-
export ARCH=arm
cd ~/gits/u-boot-xlnx
make zynq_zed_config
make
10 Replies
Newbie jasongutel
Newbie
15,520 Views
Registered: ‎10-13-2015

Re: making u-boot.elf for ZedBoard

Jump to solution

Looks like I need to set the cross-compiler...

 

I installed gcc-arm-linux-gnueabi

then tried this:

 

$ export CROSS_COMPILE=gcc-arm-linux-gnueabi
$ make

make: gcc-arm-linux-gnueabigcc: Command not found
/bin/sh: 1: gcc-arm-linux-gnueabigcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
/bin/sh: 1: gcc-arm-linux-gnueabigcc: not found
/bin/sh: 1: gcc-arm-linux-gnueabild: not found
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
/bin/sh: 1: gcc-arm-linux-gnueabigcc: not found
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 127
Makefile:1228: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

I'm obviously configuring this wrong. Which package do I need and how do I set the CC? Thanks!!

0 Kudos
Newbie jasongutel
Newbie
28,234 Views
Registered: ‎10-13-2015

Re: making u-boot.elf for ZedBoard

Jump to solution

Resolved. Wish I could delete this post :)

 

sudo apt-get install arm-linux-gnueabi
sudo apt-get install device-tree-overlay
export CROSS_COMPILE=arm-linux-gnueabi-
export ARCH=arm
cd ~/gits/u-boot-xlnx
make zynq_zed_config
make
Explorer
Explorer
13,091 Views
Registered: ‎11-17-2015

Re: making u-boot.elf for ZedBoard

Jump to solution

Please don't delete as the question & answer is useful.

I only delete posts I self-answered and when I felt like a fool for posting silly question.

 

0 Kudos
Observer eneserdin
Observer
9,775 Views
Registered: ‎12-25-2007

Re: making u-boot.elf for ZedBoard

Jump to solution

FYI  on Ubuntu 16.04 i installed "gcc-arm-linux-gnueabi"

0 Kudos
Observer shustik
Observer
6,822 Views
Registered: ‎07-14-2017

Re: making u-boot.elf for ZedBoard

Jump to solution

I have the same problem, the same error.

Please, could you explain me how to install cross_compiler?

Unfortunately

export CROSS_COMPILE...

export ARCH=arm

doesn't help...

0 Kudos
Newbie 2p718
Newbie
6,371 Views
Registered: ‎01-08-2017

Re: making u-boot.elf for ZedBoard

Jump to solution

shustik wrote:

Please, could you explain me how to install cross_compiler?


It is part of the Xilinx SDK -- so install that.

 

The cross compiler has changed.  It is now:

 

export CROSS_COMPILE=arm-linux-gnueabihf-
source /opt/Xilinx/SDK/2017.2/settings64.sh

 

 

0 Kudos
Visitor nattaponj
Visitor
5,529 Views
Registered: ‎04-09-2017

Re: making u-boot.elf for ZedBoard

Jump to solution

nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ git checkout xilinx-v2015.4 
Previous HEAD position was 0b94ce5ed4... ARM64: zynqmp: usb1 on zcu100 is not peripheral
HEAD is now at 4942ae4d03... zynqmp: dt: DC1: making compatible string generic for qspi node
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ source /opt/Xilinx/Vivado/2015.4/settings64.sh
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ export ARCH=arm
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ make zynq_zybo_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ sudo make
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
In file included from include/linux/compiler.h:54:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from ./arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:125,
                 from include/image.h:19,
                 from ./include/common.h:82:
include/linux/compiler-gcc.h:114:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
                              ^
compilation terminated.
scripts/Makefile.autoconf:72: recipe for target 'include/autoconf.mk' failed
make[1]: *** [include/autoconf.mk] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
nattaponj@debian:~/zybo_debian/sw/u-boot-xlnx$ 
0 Kudos
1,720 Views
Registered: ‎10-31-2018

Re: making u-boot.elf for ZedBoard

Jump to solution

Hi,

I have followed the same steps as you mentioned. Still i am facing the same error (cc1: error: bad value (‘armv5’) for ‘-march=’ switch)

Here is the log from whatever your suggested commands.

praveen@praveen-VirtualBox:~$ sudo apt-get install arm-linux-gnueabi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package arm-linux-gnueabi

praveen@praveen-VirtualBox:~$ sudo apt-get install device-tree-overlay
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package device-tree-overlay

praveen@praveen-VirtualBox:~$ export CROSS_COMPILER=arm-linux-gnueabi-
praveen@praveen-VirtualBox:~$ export ARCH=arm

praveen@praveen-VirtualBox:~$ cd u-boot-xlnx/

praveen@praveen-VirtualBox:~/u-boot-xlnx$ make zynq_zed_config
#
# configuration written to .config
#


praveen@praveen-VirtualBox:~/u-boot-xlnx$ make
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
cc1: error: bad value (‘armv5’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ 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 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
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1337: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

 

Please let me know if i done anything wrong and also please suggest if i need to do any other configuration changes.

Currently i bought Zynq7Z020 board and we are planning to boot using linux ubuntu.

 

Regards,

Praveen.

0 Kudos
Visitor meysam.gdz
Visitor
1,387 Views
Registered: ‎08-17-2018

Re: making u-boot.elf for ZedBoard

Jump to solution

Hi, Sorry for bothering, Could you actually solve your problem ? I am facing the same problem, whetever solution that find in forums are not working for me. I would be thankful if you could let me know what you did to solve the problem. Thank you.

Capture.JPG
0 Kudos
1,083 Views
Registered: ‎10-31-2018

Re: making u-boot.elf for ZedBoard

Jump to solution
Use the below command to build.

sudo make ARCH=arm CROSS_COMPILE=arm-Linux-gnueabi-

Regards,
Praveen Kumar.
0 Kudos