Building Ubuntu For Ultra-96 FPGA
Building Ubuntu For Ultra-96 FPGA
Introduction
The standard PetaLinux setup comes with a limited set of tools and often in order to debug or
modify applications, complete system build is required. Making the development process
painstakingly slow and error-prone. So in this tutorial, we will learn how to build Ubuntu rootfs
for Ultra-96 board such that all the standard Linux development tools are available. Allowing us
to build applications on board as well as sophisticated driver and application set from Ubuntu for
our FPGA.
1. Set up your shell environment with PetaLinux tools in your PATH environment variable.
2. Create and cd into a working directory.
3. Create a new PetaLinux project targeting a BSP that corresponds to the type of board you
are targeting:
4. Obtain a copy of the hardware handoff file (.hdf) from the Vivado project for your hardware
platform.
5. Install Qemu for cross compiling
wget http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-
16.04.3-base-arm64.tar.gz
4. Then we need to copy resolv.conf from our host machine for internet connection to
/media/<USER>/rootfs/etc/:
6. Now that you’re in the chroot environment, we can now add an admin user with sudo
permission.
passwd root
apt-get update
apt-get upgrade
apt-get -y install sudo
apt-get -y install kmod
exit
11. Configure PetaLinux with the HDF derived earlier for the associated platform:
● Set uboot to load from SD Card: Image Packaging Configuration > Root
filesystem type > SD Card
● Exit and Save configuration
petalinux-build
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --fpga system.bit --u-boot --force
cp BOOT.BIN /media/<USER>/boot
cp image.ub /media/<USER>/boot
sync
15. Put SD Card on board and make sure the boot mode is set to sd_card (Ultra96: OFF
ON) look at output on UART
Additional packages
Graphics with X11:
Links
PetaLinux:
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1144-petalinux-
tools-reference-guide.pdf
Ubuntu:
http://cdimage.ubuntu.com/ubuntu-base/releases/