Development with Zynq – Part 3 – Build boot files

This blog series describe the selection, set-up and usage of a development environment for Zynq.

The following instructions use the development environment described in Part 2.

I am not interested in Desktop Linux like Ubuntu support. For  Desktop Linux at least VGA support is needed. Therefore components in Programmable Logic, an adjusted Device Tree and Kernel patches are needed. Link to a good  guide under  yet-another-guide-to-running-linaro-ubuntu-desktop-on-xilinx-zynq-on-the-zedboard

Overview of needed files

For booting from SD Card following files are needed.

  • Boot.bin
    The boot file includes:

    • FSBL
      A file with the first stage boot loader
    • Bitfile
      File with code for the Program Logic
    • U-boot
      Boatloader file to load the Kernel with the device Tree
  • udev.txt
    u-boot Parameter file
  • Kernel
    uImage with the Linux kernel
  • Device Tree
    dtb file with information about hardware system. The file is needed by the kernel
  • Linux distribution
    A second partition with the Linux distribution file system

First Stage Boot Loader

Xilinx SDK use the command gmake not make. A symbolic link is needed to solve this problem.

sudo ln -s /usr/bin/make /usr/bin/gmake

Now we can start the SDK by double-clicking the icon „Xilinx SDK 2013.2“. Open the „New project“ wizard with „File“=>“New“=>“Application Project“ and use the following settings.



Finish the wizard and select „Project“=>“Build All“ to generate the file  FSBL.elf.

I use the zedboard. For a other platform select the correct „Hardware Platform“. If your platform is missing use the Vivado export function to generate it.


For bitfile generaton Vivado is used. Step-by-step instructions to generate a bitfile without extra logic  can be found under


Open a terminal in home folder. Clone the U-boot source with

git clone git://

The U-boot version from Xilinx extract the Linux distribution from a file in RAM and boot it. We want to define the boot options in device tree. Therfore we need a „udev.txt“ file.

bootcmd=fatload mmc 0 0x3000000 uImage; fatload mmc 0 0x2A00000 devicetree.dtb; bootm 0x3000000 - 0x2A00000
uenvcmd=echo "Booting SD...";boot

I want to work with DMA without usage of a device driver. Therefore I need a free memory block at the end of adress range. The device tree is loaded to memory, too. I reduce the fdt_high value so the device tree is not loaded to the end of memory address range.

The Xilinx U-Boot version is not configured for hard float. I have to change compiler flags for a successful build.

In file u-boot-xlnx/ replace



PLATFORM_RELFLAGS =-mfloat-abi=hard -mfpu=vfpv3

It is necessary to disable the soft float flags. A search with grep -rnw ‚.‘ -e „msoft“ shows the file to change. In file u-boot-xlnx/arch/arm/cpu/armv7/ replace

PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float


PLATFORM_RELFLAGS += -fno-common -ffixed-r8

I am not a makefile guru. I am sure that better solutions exists.

All is prepared for build U-boot. We need to expand the PATH variable temporary so that make find the toolchain.

export PATH

It is possible define path changes permanently by appending /etc/profile with this commands. The available configurations are listed in board.cfg. Open the file or grep lines from interest with

grep -H -r "zynq_" ./boards.cfg

I use the zedboard therefore I define the hardware with

make ARCH=arm zynq_zed_config CROSS_COMPILE=arm-linux-gnueabihf-

After hardware is configured, we build U-boot with

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

Rename the result u-boot in e-boot.elf.


All files needed for boot.bin are generated. We can use the Xilinx SDK to build the file. Select „Xilinx Tools“=>“Create Zynq Boot Image“ and select your files. Press „Create Image“ to buid it.


Another way is to use the bootgen without the gui. You can find a desktop script and the for bootgen needed bif file in buildBoot_bin.


Open a terminal in home folder. Clone the U-boot source with

git clone git://

Change directory to the new folder linux-xlnx.

Print the PATH variable with command

echo $PATH

For building a uImage mkimage is needed. mkimage is part of U-Boot. We need to define the path so make can find it. If the toolchain is not part of the PATH variable anymore insert it again.

export PATH

The available configs are listed in arch/arm/configs. Vor Zynq I use xilinx_zynq_defconfig.

make ARCH=arm xilinx_zynq_defconfig CROSS_COMPILE=arm-linux-gnueabihf-

Now we can build the uImage

make ARCH=arm  UIMAGE_LOADADDR=0x8000 uImage CROSS_COMPILE=arm-linux-gnueabihf-

The uImage is located in /arch/arm/boot

Device Tree

Examples for device tree files are located under arch/arm/boot/dts in Kernel sources. I use zynq-zed.dts for Zedboard. I want to boot the Linux distribution from a partition. Therefore I change the bootargs to

bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0 --no-log";

This change only work with the modified U-boot.

I want to use a part of memory for a DMA without driver support. Therefore I reduce the memory managed by Linux

ps7_ddr_0: memory@0 {
device_type = "memory";
reg = < 0x0 0x18000000 >;
} ;

For booting the dts file have to be converted in a dtb file. The kernel tool dtc is used for that. I write shellscripts for dts to dtb and  back. All files in the defined folder are converted. Download dts_dtb


Diskutiere über "Development with Zynq – Part 3 – Build boot files"

  1. eactor sagt:

    Did you notice a difference when using the vfpu for u-boot instead of the soft-float implemtation? And why didn’t you do any changes to the Kernel so it uses the vfpu?

  2. Prof. Dr. Rüdiger Heintz sagt:

    I seem to recall that I get a kernel panic with mixed soft-float uboot and hard-float kernel.

    I had big problems with soft-float libs on a hard-float linux distribution. Therefore I decide to build a consistent hard-float environment.

    I did not notice a difference. I dare say there is no change in boot time. Benchmarks to compare hard-float and soft-float would be nice, but I have currently no time to generate them.

  3. mackalli sagt:

    hello, I’m using the zedboard, I want to start from SD card,I also modefied the zynq-common.h fdt_high and initrd_high value, but failed. can you give some suggestion for making uboot? thank you!

  4. psimon sagt:

    Hello, I am currently learning embedded linux on zed-boards and find your tutorial very interesting.
    I have a question regarding the „udev.txt“ file you mention here. I do not know where to put it and do not find any mentioning of this file apart from this page. Could it be that you meant the „uEnv.txt“ which is also included in the ./include/configs/zynq-common.h header?

    • Prof. Dr. Rüdiger Heintz sagt:

      Put the udev.txt direct on your sd card. U-boot reads it on startup at execute the commands, so no console input is needed.
      It is very useful. I have different kernels and device tree files on my sd card and in udev.txt I can define which kernel and device tree files are used by u-boot.

  5. Ramachandra sagt:

    Hello,i am currently using zed board, Actually in buildroot tool where i can select the Boot Device options because through JTAG only i am sending images not usind SD card.

  6. Marco sagt:

    Your tutorials have been a great help so far. But which DTS file should I use for the Zedboard? I tried zynq-zed.dts and zynq-zed-adv7511-fmcmotcon1.dts, but neither gave me an ethernet adapter. Thanks for your help.

Schreibe einen Kommentar zu eactor Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.