FreeBSD on Zedboard

The Zedboard is an evaluation board for Xilinx Zynq-7000 series System-on-a-Chip. The Zynq-7000 is an FPGA combined with an ARM Cortex-A9 core and a set of standard peripherals.

SDCARD images

SD card images for FreeBSD on the Zedboard can be found in the snapshot releases directory.

Building FreeBSD for Zedboard

Zynq/Zedboard support is in -CURRENT. To build world and kernel for the Zedboard:

Also, Tim Kientzle's system build tool, Crochet, can build Zedboard SD card images.

Building u-boot.img and boot.bin

The Zedboard needs several files in a boot partition. The file boot.bin is the first executable the Zynq chip boots. It initializes the Zynq and then hands over execution to u-boot.img. Both files are built from sources from Xilinx on github.

To build these files, you will need the arm-none-eabi-gcc and python2 ports. Both of these can be installed either using pkg or from ports.

But before building,the Secondary Program Loader embedded in boot.bin needs code to initialize the Zynq's PS section. The files are ps7_init.c and ps7_init.h and need to be placed in the directory u-boot-xlnx/board/xilinx/zynq. This code is very board-specific and is generated by Xilinx tools for every system design. But, ps7_init.c and ps7_init.h for some common Zynq boards are available at Fetch the proper files for your board and be sure they are in board/xilinx/zynq. Without the files, u-boot will still build but will produce a boot.bin that doesn't work.

To build, execute the following:

Note: Other Zynq configurations in the u-boot-xlnx source do not set the proper option to boot FreeBSD. You will need to patch the configuration's include file to add the CONFIG_ZYNQ_BOOT_FREEBSD option. For example, to create u-boot for microzed, you will need to make the following patch:

Building ubldr

To build ubldr:

The ubldr binary is found in /usr/obj/arm.armv6/usr/src/sys/boot/arm/uboot directory.


The following small file overrides u-boot's default boot commands and boots FreeBSD:

Building an SDCARD image

Create SD card image

Mount filessystems

Populate root and boot partitions

From within the source directory:

Copy necessary files to the boot partition

You can get these files pre-compiled in the zedboard_extrafiles.tgz tarball.

Final tweaks

Customize configuration files /mnt/armroot/etc/{rc.conf,hosts,fstab} to taste.

Unmount file systems

Copy to an SD card

FreeBSD/arm/Zedboard (last edited 2015-01-21 00:29:59 by ThomasSkibo)