Boot Linux from Sources Ubuntu 16.04
Steps for Booting Linux on a ZCU104 revC evaluation board without using Xilinx PetaLinux tools.
Zynq Ultrascale+ TRM
Create Vivado Project
Every step should be done using the same Vivado version. From Project, SDK and sources.
Export Hardware from Vivado
The hardware definition file (.hdf) can be created from your Vivado project. This file is necessary to create a Xilinx SDK software project relevant to your hardware configuration.
Create First-Stage Boot Loader (FSBL)
In Xilinx SDK create FSBL Application and Board Support Package (BSP). You application should be based on you HDF file previously generated.
|https://github.com/Xilinx/linux-xlnx.git||The Linux kernel with Xilinx patches and drivers|
|https://github.com/Xilinx/u-boot-xlnx.git||The u-boot bootloader with Xilinx patches and drivers|
|https://github.com/Xilinx/device-tree-xlnx.git||Device Tree generator plugin for xsdk|
|https://git.kernel.org/pub/scm/utils/dtc/dtc.git||Device Tree compiler (required to build U-Boot)|
|https://github.com/Xilinx/arm-trusted-firmware.git||ARM Trusted Firmware (required for Zynq UltraScale+ MPSoC|
Device Tree plugin for Xilinx SDK
Download the device tree plugin for SDK from github repository . Make sure Vivado version is the same as the project created.
Once file is downloaded extract it and include the folder as a repository in Xilinx SDK project.
Create a device tree from the Board Support Package creation.
The Platform Management Unit (PMU)
The PMU controls the power up and reset sequence of the hardware enabled.
Create an application project in Xilinx SDK targeting the PMU processor.
Initial Build Preparation
Source your vivado/settings64.sh from your Vivado instalation folder.
Set environment variables:
export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=aarch64
U-boot bootloader should be downloaded from github repository. Make sure Vivado version is the same as the project created.
Basic files used by u-boot building process:
From u-boot folder:
make xilinx_zynqmp_zcu104_revC_defconfig make
Built u-boot can be found in ./u-boot.elf
The Linux Kernel should be downloaded from github repository. Make sure Vivado version is the same as project created.
Basic files used by Kernel building process:
Build rom the folder where the kernel was extracted.
make ARCH=arm64 xilinx_zynqmp_defconfig make
Kernel Image can be found in: arch/arm64/boot/Image
Download File system
Download tarball file system from Ubuntu image repository.
Create a BOOT.bin
A BOOT.bin can be created in Xilinx SDK using bootgen. BOOT.bin contains the initial boot files your PS will look for when powered-on.
Create SD Card Image
SD Card image should contain 2 partions. They are BOOT and rootfs.
BOOT partition should be at lease 100 MB and formatted with FAT32 disk format. While rootfs should be at lease 2GB and formatted with EXT3 or EXT4 format.
From Linux gparted can be used to create the table of partitions.
BOOT partition contents:
BOOT.bin – Boot medium
system.dtb – Binary Device Tree
Image – Kernel Image
rootfs partition contents:
Extract filesystem tarball to rootfs.
mount /dev/sdX2 /mnt/rootfs tar -xf ubuntu-*.tar.gz -C /mnt/rootfs