I took the following notes while figuring out how to build an image for the Zedboard using Yocto.

Prepare the Workstation

There are a couple of packages required to prepare your workstation.

On RHEL and CentOS:

yum install gawk make wget tar bzip2 gzip python unzip perl patch diffutils \
diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat SDL-devel xterm

Please consult the Yocto Project documentation on how to prepare other Linux distros. Note that not all Linux distros are officially supported by Yocto.

Prepare Yocto

Clone the krogoth branch of Poky repository:

git clone -b krogoth git://git.yoctoproject.org/poky.git
cd poky

Download the Xilinx meta layer:

git clone -b krogoth git://github.com/Xilinx/meta-xilinx

Download the OpenEmbedded meta layer:

git clone -b krogoth git://git.openembedded.org/meta-openembedded

Minimal Yocto Configuration

Init the build environment:

source oe-init-build-env build

Edit the conf/local.conf file and change the parameter MACHINE to zedboard-zynq7:

MACHINE ??= "zedboard-zynq7"

Edit the conf/bblayer.conf file and add at least the following layers:

meta-xilinx
meta-openembedded/meta-oe

Run the bitbake command to build the distribution:

bitbake core-image-minimal

Preparing the SD-card

Create the following partitions using cfdisk or an alternative tool:

  1. Boot partition
    • Name: “BOOT” (optional)
    • Filesystem: FAT16
    • Size: 64MB
    • bootable
  2. Rootfs partition
    • Name: rootfs (optional)
    • Filesystem: ext2
    • Size: rest of the space on the SD-card

Finally format both partition.

Copy the Files

From your Yocto build directory go to tmp/deploy/images/zedboard-zynq7 and copy the following files to the boot partition (mounted as /media/BOOT on my computer):

cd tmp/deploy/images/zedboard-zynq7
cp uEnv-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0.txt /media/BOOT/uEnv.txt
cp boot.bin-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0 /media/BOOT/boot.bin
cp u-boot-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0.img /media/BOOT/u-boot.img
cp uImage--4.4-xilinx+git0+89cc643aff-r0-zynq-zed-DATETIME.dtb /media/BOOT/uImage-zynq-zed.dtb
cp uImage--4.4-xilinx+git0+89cc643aff-r0-zedboard-zynq7-DATETIME.bin /media/BOOT/uImage

Setup filesystem on the rootfs partition:

tar xvf core-image-minimal-zynq-zed.tar.gz -C /media/rootfs

That’s all. Insert the SD-card to your Zedboard an boot.