Prerequisites

  • Hardware is exported (Vivado: File->Export->Export hardware, including bitstream, to local project)
  • Petalinux software template is checked out
  • Petalinux environment is sourced, current working directory is the Petalinux project root

Process flow

  1. Clean up Petalinux build and images directories

    1
    2
    petalinux-build -x distclean
    rm -f images/linux/*
    
  2. Import exported vivado hardware to Petalinux

    1
    petalinux-config --get-hw-description=/path/to/your/hdrob-petalinux-hw/hdrob-petalinux-hw.sdk
    
  3. Build Petalinux

    1
    petalinux-build
    
  4. Assemble binary images

    1
    petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga /path/to/your/hdrob-petalinux-hw/hdrob-petalinux-hw.runs/impl_1/top.bit --uboot --force
    
  5. Copy binary images to TFTP root and change permissions. Add system.dtb to the list of files if the in-kernel device tree is not used

    1
    2
    3
    4
    for f in BOOT.BIN image.ub rootfs.jffs2; do
        cp -f images/linux/$f /srv/tftp/
    done
    chmod 0666 /srv/tftp/*
    

Partial rebuild

If the petalinux-build command has completed with success, it is possible to rebuild selected parts of the firmware. Append the -c switch to the build script, followed by the component identifier:

  • bootloader
  • u-boot
  • device-tree
  • kernel
  • rootfs

In addition, single components included in the rootfs can be rebuilt by appending their name to the rootfs identifier, e. g. -c rootfs/myapp.

Latest revision: 10.05.2016
Up