Difference between revisions of "U-boot-xlnx"

From ElphelWiki
Jump to: navigation, search
(Step 2: initenv)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Desctiption=
 
=Desctiption=
A walkthrough for microzed.
+
A walkthrough for microzed, OS = Kubuntu 14.04, gcc 4.8.4
  
 
=Steps=
 
=Steps=
==Step 1: source==
+
==Step 0: toolchain==
 +
1. Build and install toolchain with poky, instructions [[Yocto_tests#Build_toolchain_.28not_necessary_-_needed_only_for_building_ezynq_targets_outside_poky.29|here]].
 +
 
 +
==Step 1: get source==
 
  git clone https://github.com/Xilinx/u-boot-xlnx.git
 
  git clone https://github.com/Xilinx/u-boot-xlnx.git
current hash:
+
latest commit:
 
  commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
 
  commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
 
  Author: Michal Simek <michal.simek@xilinx.com>
 
  Author: Michal Simek <michal.simek@xilinx.com>
 
  Date:  Mon Jan 11 11:50:53 2016 +0100
 
  Date:  Mon Jan 11 11:50:53 2016 +0100
 +
 +
==Step 2: initenv==
 +
1. Create <b>initenv</b> in u-boot-xlnx:
 +
 +
initenv:
 +
#!/bin/sh
 +
export CROSS_COMPILE=arm-poky-linux-gnueabi-
 +
export PATH=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/:$PATH
 +
 +
2. run:
 +
. ./initenv
 +
 +
Note: if forgotten the error would be something like this:
 +
lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch                                                                                                               
 +
  /*                                                                                                                                                                               
 +
  ^                                                                                                                                                                               
 +
make[1]: *** [lib/asm-offsets.s] Error 1                                                                                                                                         
 +
make: *** [prepare0] Error 2
 +
 +
==Step 3: config==
 +
make zynq_microzed_defconfig
 +
output:
 +
  HOSTCC  scripts/basic/fixdep
 +
  HOSTCC  scripts/kconfig/conf.o
 +
  SHIPPED scripts/kconfig/zconf.tab.c
 +
  SHIPPED scripts/kconfig/zconf.lex.c
 +
  SHIPPED scripts/kconfig/zconf.hash.c
 +
  HOSTCC  scripts/kconfig/zconf.tab.o
 +
  HOSTLD  scripts/kconfig/conf
 +
#
 +
# configuration written to .config
 +
#
 +
 +
==Step 4: make==
 +
 +
make
 +
output:
 +
arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
 +
make[2]: *** [examples/standalone/hello_world] Error 1
 +
make[1]: *** [examples/standalone] Error 2
 +
make: *** [examples] Error 2
 +
 +
...
 +
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=678e8798ebe0f4fd1bd347db136f1499b8fe00c9

Latest revision as of 14:09, 14 January 2016

Desctiption

A walkthrough for microzed, OS = Kubuntu 14.04, gcc 4.8.4

Steps

Step 0: toolchain

1. Build and install toolchain with poky, instructions here.

Step 1: get source

git clone https://github.com/Xilinx/u-boot-xlnx.git

latest commit:

commit 40e8c28b90725f1e23e22c3b3514cf0b531f1bee
Author: Michal Simek <michal.simek@xilinx.com>
Date:   Mon Jan 11 11:50:53 2016 +0100

Step 2: initenv

1. Create initenv in u-boot-xlnx:

initenv:

#!/bin/sh
export CROSS_COMPILE=arm-poky-linux-gnueabi-
export PATH=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/:$PATH

2. run:

. ./initenv

Note: if forgotten the error would be something like this:

lib/asm-offsets.c:1:0: error: bad value (armv5) for -march= switch                                                                                                                 
 /*                                                                                                                                                                                
 ^                                                                                                                                                                                 
make[1]: *** [lib/asm-offsets.s] Error 1                                                                                                                                           
make: *** [prepare0] Error 2

Step 3: config

make zynq_microzed_defconfig

output:

  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

Step 4: make

make

output:

arm-poky-linux-gnueabi-ld.bfd: cannot find -lgcc
make[2]: *** [examples/standalone/hello_world] Error 1
make[1]: *** [examples/standalone] Error 2
make: *** [examples] Error 2

... http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=678e8798ebe0f4fd1bd347db136f1499b8fe00c9