Code Monkey home page Code Monkey logo

zynqmp-boot-apps's Introduction

Zynq MPSoC Boot Apps

Generate and install boot apps for the Zynq MPSoC device.

The scripts in this directory generate the following products:

  • First Stage Bootloader (fsbl)
  • Platform Management Unit Firmware (pmufw)
  • Device tree blob (system.dtb)
  • BOOT.bin file

You can think of this tool as a much lighter and less bloated feature-rich version of PetaLinux. This tool is not meant to hold your hand and do everything for you the way PetaLinux does, but rather enables you to use the command line to do many of the steps typically done in the Xilinx SDK GUI.

Prerequisites

Before using this tool you must first have created your hardware description file in Vivado. This is done by creating a block design in Vivado with the Zynq IP and selecting File > Export Hardware after compiling the bitstream. Make sure you check the "Include bitstream" box. Once you have generated your hardware description file, you can copy it into this directory.

In order to generate the BOOT.bin file you must also have built U-Boot and the ARM Trusted Firmware (ATF) separately. These are not included in this repository because of their size and because they are often tailored for individual needs. Once you have built U-Boot and ATF, copy the u-boot.elf and bl31.elf files into this directory's build directory (you can create it if it does not already exist).

Usage

Simply drop your hardware description file (.hdf) into this directory and run

$ make

You can set the version of the device tree generator to be used with the VER variable:

$ make VER=2018.3

It is recommended to use the same version as the version of Vivado you used to create your design.

Install to SD card

To install the output products to your SD card's boot partition, mount the partition to a location on your host computer (e.g. /media/sd/boot) and run

$ sudo make INSTALL_DIR=/media/sd/boot install

replacing /media/sd/boot with your actual mount point.

Example

Below is an example of using this tool from start to finish with a design created in Vivado 2018.3. This is an example and file names and invocations may change for your own needs.

Start in your home directory.

$ cd ~

Clone all required repositories.

$ git clone https://github.com/Xilinx/u-boot-xlnx
$ git clone https://github.com/Xilinx/arm-trusted-firmware
$ git clone https://github.com/gpanders/zynqmp-boot-apps

Source the setup script provided with your SDK installation.

$ source /opt/Xilinx/SDK/2018.3/settings64.sh
$ export CROSS_COMPILE="aarch64-linux-gnu-"

Build U-Boot. Be sure to checkout the tag corresponding to your version of Vivado.

$ cd ~/u-boot-xlnx
$ git checkout tags/xilinx-v2018.3
$ make xilinx_zynqmp_zcu102_rev1_0_defconfig
$ make -j8

Build the ARM Trusted Firmware. Again, checkout the correct tag.

$ cd ~/arm-trusted-firmware
$ git checkout tags/xilinx-v2018.3
$ make PLAT=zynqmp -j8 all

Navigate to this repository and copy all required files.

$ cd ~/zynqmp-boot-apps
$ cp /path/to/hdf_file.hdf .
$ mkdir build
$ cp ~/u-boot-xlnx/u-boot.elf ~/arm-trusted-firmware/build/zynqmp/release/bl31/bl31.elf build/

Mount your SD card's boot partition.

$ sudo mkdir -p /media/sd/boot
$ sudo mount /dev/sdc1 /media/sd/boot

Make and install the boot files.

$ make VER=2018.3
$ sudo make INSTALL_DIR=/media/sd/boot install

zynqmp-boot-apps's People

Contributors

gpanders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

atoftegaardk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.