FreeBSD on Zynq-7000 / Zybo / Zedboard

This page describes running FreeBSD on the Zedboard and other Xilinx Zynq-7000 platforms. The Zynq-7000 is an interesting platform combing a Xilinx 7-series FPGA fabric with a dual-core ARM Cortex-A9 based Application Processor Unit (System-on-a-Chip).

The Zedboard is an evaluation board for the Zynq-7000. It is manufactured by Digilent. More information on the Zedboard can be found at

The information on this page is migrating to the FreeBSD wiki at

Pre-built SD card image

An SD card image for the Zedboard based upon FreeBSD 11.1-RELEASE is available here: FreeBSD-armv6-11.1-ZEDBOARD-321309.img.bz2.

SHA256 (FreeBSD-armv6-11.1-ZEDBOARD-321309.img.bz2) = 5f3d92d7864c7ba2fdfa379f1dd095712588c31dba1e685edc81cd4d1dfc0c26
SHA256 (FreeBSD-armv6-11.1-ZEDBOARD-321309.img) = d7434787682a519d41131cf3865c2ae063057f72ffa002b2c3550874547d10db

If you'd like to test-drive FreeBSD on a Zedboard, download the bzip2 compressed SD card image. Uncompress and copy the image to the SD card.

On my machine, the SD card shows up as /dev/da0. Be sure that is the same on your machine before cut and pasting this.

bunzip2 FreeBSD-armv6-11.1-ZEDBOARD-321309.img.bz2
dd if=FreeBSD-armv6-11.1-ZEDBOARD-321309.img of=/dev/da0 bs=1M

Boot It

Power down the Zedboard. Insert the SD card in the SD slot and be sure the Zedboard's configuration mode jumpers are set for booting from the SD card before powering up. (If you've already been booting the Linux image from the SD card shipped with the Zedboard, you shouldn't need to change anything.)

The USB-UART connected to connector J14 acts as the FreeBSD console (device uart1). This is the same console as the stock Linux image. The Zedboard should automatically boot U-boot and then the FreeBSD kernel.

The FreeBSD kernel has drivers for the UARTs, SDHCI, Gig Ethernet, and a USB host driver for the USB OTG connected at J13. There is also a GPIO driver which allows reading of switches and buttons and controlling the LEDs.

Note: Booting this pre-built image will not display "FreeBSD" on the OLED display as shown in the picture. It was a separate C program I wrote a while ago and now I can't find it!

Please send any feedback to me via E-mail


FreeBSD now runs on the Zybo! The Zybo from Digilent Inc. is a lower cost board than the Zedboard.

Here is a pre-built SD card image for Zybo based upon FreeBSD 11.1-RELEASE: FreeBSD-armv6-11.1-ZYBO-321309.img.bz2.

SHA256 (FreeBSD-armv6-11.1-ZYBO-321309.img.bz2) = 33b9665d5501cbe4d96dc0080dd769259b9e5862e79272e67b40b50c1926a644
SHA256 (FreeBSD-armv6-11.1-ZYBO-321309.img) = 298f2deb096bc1db98beb46121483f4bc2d3597ccc6738c8236e88a78399337c
Follow the instructions above in the Zedboard section to uncompress and copy the image to an SD card. To boot the image on Zybo, don't forget to set the mode jumper (JP5) to boot from SD.

The following describes how I modified the Zedboard SD image for Zybo.

To run FreeBSD on a Zybo, start with the Zedboard SD image but a few files need to be changed. Download zybo_extrafiles.tgz and extract the files. Then mount the SD card partitions on your machine and copy the files over:

mkdir /mnt/boot /mnt/armroot
mount -t msdosfs /dev/da0s1 /mnt/boot
mount /dev/da0s2a /mnt/armroot

tar xzvf zybo_extrafiles.tgz
cd zybo_extrafiles
cp boot.bin u-boot.img /mnt/boot
cp rc.conf /mnt/armroot/etc/rc.conf
cp board.dtb /mnt/armroot/boot/kernel

umount /mnt/boot
umount /mnt/armroot


FreeBSD is now running on the Snickerdoodle! Snickerdoodle is a low-cost Zynq-based board from krtkl.

Unfortunately, the WiFi (on SDIO) is not yet supported by FreeBSD.

To create an image bootable on a 1GB Snickerdoodle, start with the Zedboard image. Download the Snickerdoodle extra files tarball here. Mount the SD card partitions on your machine and copy the files over:

mkdir /mnt/boot /mnt/armroot
mount -t msdosfs /dev/da0s1 /mnt/boot
mount /dev/da0s2a /mnt/armroot

tar xzvf snick_extrafiles.tgz
cd snick_extrafiles
cp boot.bin u-boot.img /mnt/boot
cp rc.conf /mnt/armroot/etc/rc.conf
cp board.dtb /mnt/armroot/boot/kernel

umount /mnt/boot
umount /mnt/armroot


The Zynq FreeBSD port runs on Parallella! Follow these instructions to modify the Zedboard SD card image to boot on Parallela:

To run the Zedboard SD image on a Parallella, you need to replace all the files in the boot partition. Download parallella_freebsd.tgz. It contains the new boot files for FreeBSD on Parallella.

Mount the SD card boot partition on your machine:

# mkdir /mnt/boot
# mount -t msdosfs /dev/da0s1 /mnt/boot
Remove all the files in the boot partition:
# rm /mnt/boot/*
Copy your Parallella board's bitstream to the partition. There are several different bitstreams for the various board configurations. See section 3 of this guide to creating an SD card.
# cp parallella_????.bit.bin /mnt/boot/parallella.bit.bin
Extract the files from parallella_freebsd.tgz into the boot partition:
# tar xzvf parallella_freebsd.tgz -C /mnt/boot
Unmount the boot partition
# umount /mnt/boot


To run this image on a MicroZed, start with the Zedboard SD image but a few files need to change. Download microzed_extrafiles.tgz and extract the files. Then mount the SD card partitions on your machine and copy the files over:
mkdir /mnt/boot /mnt/armroot
mount -t msdosfs /dev/da0s1 /mnt/boot
mount /dev/da0s2a /mnt/armroot

tar xzvf microzed_extrafiles.tgz
cd microzed_extrafiles
cp boot.bin u-boot.img /mnt/boot
cp rc.conf /mnt/armroot/etc/rc.conf
cp board.dtb /mnt/armroot/boot/kernel

umount /mnt/boot
umount /mnt/armroot

Note: At boot-up, the USB-Host interface on MicroZed is held in reset by a Zynq GPIO signal (PS_MIO7). The quick-and-dirty way to release it from reset is as follows:

gpioctl -c 7 OUT
gpioctl 7 1
I haven't yet come up with a start-up script for /etc/rc.d to automate this.

Building an SD Image

I use Tim Kientzle's crochet-freebsd tool to build ZedBoard images. But, here I describe how you can manually create an SD image from FreeBSD and u-boot source:

Building boot files for Zedboard

The Zynq chip needs several files in an msdos boot partition to boot FreeBSD:

The boot.bin and u-boot.img files are built from Xilinx sources located at For Snickerdoodle, I have u-boot source on github at

To cross-compile these on FreeBSD requires ports devel/arm-none-eabi-gcc. You should be able to install this with pkg:

pkg install arm-none-eabi-gcc

You will also need Python:

pkg install python2

Fetch the Xilinx sources with git:

git clone u-boot-xlnx
cd u-boot-xlnx
git checkout xilinx-v2016.3

Patch the source with this patch to enable the u-boot API: (The Snickerdoodle source is already patched.)

patch -p1 < patch.u-boot.txt

Build u-boot.img and boot.bin:

gmake CROSS_COMPILE=arm-none-eabi- distclean
gmake CROSS_COMPILE=arm-none-eabi- zynq_zed_config
gmake CROSS_COMPILE=arm-none-eabi- HOSTCC=cc
The u-boot.img file will be located in the top directory and boot.bin will be in spl/boot.bin.

Next, we need ubldr:

cd /usr/src
make buildenv TARGET_ARCH=armv6
make -C sys/boot clean
make -C sys/boot obj
make -C sys/boot all
ubldr will be in /usr/obj/arm.armv6/usr/src/sys/boot/arm/uboot/ubldr.

Finally, we need uEnv.txt in the boot partition. It looks like this:

uenvcmd=echo Booting FreeBSD from SD Card: ; mmcinfo && fatload mmc 0 ${loadaddr} ${bootfile} && bootelf

Build world and kernel

Next, we need to build world for armv6 and a kernel for Zedboard:

From the directory /usr/src:

make TARGET_ARCH=armv6 KERNCONF=ZEDBOARD buildworld buildkernel

Create an SD card image

The following creates SD card image with an msdos boot partition.
dd if=/dev/zero of=SDCARD.img count=1048576
mdconfig -f SDCARD.img -u 0

gpart create -s MBR md0
gpart add -s64m -t \!14 md0
gpart set -a active -i 1 md0
newfs_msdos -F 16 /dev/md0s1

gpart add -t freebsd md0
gpart create -s BSD md0s2
gpart add -t freebsd-ufs md0s2
newfs /dev/md0s2a
tunefs -n enable /dev/md0s2a

Mount SD card partitions

mkdir /mnt/boot /mnt/armroot
mount -t msdosfs /dev/md0s1 /mnt/boot
mount /dev/md0s2a /mnt/armroot

Populate root and boot partitions

From within the source directory:
make TARGET_ARCH=armv6 KERNCONF=ZEDBOARD DESTDIR=/mnt/armroot installworld distribution installkernel
Copy these files generated above to the boot partition:
cp boot.bin u-boot.img ubldr /mnt/boot

Final tweaks

Copy a couple more files:
cp board.dtb /mnt/armroot/boot/kernel
cp fstab rc.conf /mnt/armroot/etc

Create a mount point for the boot partition:

mkdir /mnt/armroot/boot/msdos

Unmount file systems

umount /mnt/boot
umount /mnt/armroot
mdconfig -d -u 0

Copy to an SD card

dd if=SDCARD.img of=/dev/da0 bs=1m

Thomas Skibo

E-mail Me