Zynq

Recently, I got my hands on a MicroZed board. The first step was obiously to understand the boot process, which I will explain a bit in the following.

When powering up the device the Boot ROM is executed. The Zynq chip features some On Chip Memory (OCM) that is used at these early boot stages, where the RAM is not initialized yet. The CPU reads some input pins to determine the boot mode. Typically, these pins can be set via jumpers or dip switches on the board.

The supported modes are boot via

  • QSPI / NAND / NOR flash
  • JTAG
  • SD card

A nice feature is that the Boot ROM support FAT16 and FAT32, so the SD card can be created easily and no fiddling with dd is required. The boot loader searches for a BOOT.BIN file. This file is created by the user and contains

  • First Stage Boot Loader (FSBL)
  • FPGA bitstream (optional)
  • initial register values (optional)
  • Second Stage Boot Loader / bare-metal application

Since the BOOT.BIN is supplied by the user and since its directly executed by the BootROM, it’s basically impossible to brick the device. The BOOT.BIN also supports encrypted and signed binaries. The sole task of the BootROM is to locate the BOOT.BIN file and load and execute the FSBL. Later the FSBL loads the remaining parts like the second stage boot loader.

Both the BOOT.BIN file and the FSBL are created with proprietary Xilinx utilities, which causes problems when distributing the binaries. Since the Xilinx tools are not Open Source they can not be distributed together with the GPL software like the U-Boot boot loader. Thus, one is not allowed to provide a BOOT.BIN for download, leaving the users with the hassle to create one on their own.