Skip to content

Yocto layer to provide support for common Zynq based FPGA boards used in the community

License

Notifications You must be signed in to change notification settings

OpenMRI/meta-zynq-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This README file contains information on the contents of the meta-openmri layer.

Please see the corresponding sections below for details.

Dependencies
============

  URI: git://git.yoctoproject.org/poky
  branch: thud

  URI: https://github.com/Xilinx/meta-xilinx.git
  branch: thud

  Xilinx SDK - includes some Xilinx proprietary binaries.  Required to build the fsbl.  Available as part of Vivado or the URI listed below.
  URI: http://petalinux.xilinx.com/sswreleases/rel-v2019/xsct-trim/xsct-2019-1.tar.xz

  .
  .
  .

Patches
=======

Please submit any patches against the meta-openmri layer to the xxxx mailing list ([email protected])
and cc: the maintainer:

Maintainer: Danny Park <[email protected]>

Table of Contents
=================

  I. Adding the meta-openmri layer to your build
     A) Zynq First Stage Boot Loader
     B) Generating an SD card image file
 II. Misc


I. Adding the meta-openmri layer to your build
=================================================

This layer was originally developed on Ubuntu 18.04.  I followed the instructions on https://www.yoctoproject.org/docs/2.6.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html to build the "core-image-base" image from the "thud" branch.  Once that was done, I modified the build with the following changes:

Run 'bitbake-layers add-layer meta-openmri'
Run 'bitbake-layers add-layer meta-xilinx-bsp'
Run 'bitbake-layers add-layer meta-xilinx-standalone'
Run 'bitbake-layers add-layer meta-xilinx-contrib'

Add the following line to local.conf:

	MACHINE ?= "redpitaya"

Zynq First Stage Boot Loader
----------------------------

QUICK START

Set the following variables in local.conf:

	XILINX_SDK_PATH = "/absolute-path-to-xilinx/SDK" (optional for default path of /tools/Xilinx/SDK)
	LOCAL_HDF_FILE = "/absolute-path-to/ocra_mri.hdf"

MORE DETAILS

Building the first stage boot loader requires proprietary Xilinx tools.  The primary tool required is "xsct".  It processes a .tcl script to generate the appropriate source code for the FSBL (using the https://github.com/Xilinx/embeddedsw.git repository, release-2019.1 branch).  The FSBL is compiled with a gnu cross compiler included in the SDK (Linaro, I believe).  Once the FSBL is generated, the "bootgen" tool provided by the Xilinx SDK is used to combine the FSBL .elf, the u-boot .elf and the FPGA .bit file into a single boot.bin that runs on the Red Pitaya.

The required SDK can be downloaded from http://petalinux.xilinx.com/sswreleases/rel-v2019/xsct-trim/xsct-2019-1.tar.xz without a Xilinx login at the time of writing.  The SDK is also included in the Vivado suite of tools from Xilinx which can be downloaded with a Xilinx account.  Once you have the Xilinx SDK, set the variable XILINX_SDK_PATH in local.conf to point to the SDK folder (if it is different than the default /tools/Xilinx/SDK).  Recipe assumes version v2019.1 of the SDK.  Another version of the SDK may work if the XILINX_SDK_VERSION variable is set.  However, it is only tested with the previously mentioned version.  There may be additional modifications required, especially if paths are different within the SDK for other versions.

The ocra_mri.hdf file is generated from the official OCRA sources at https://github.com/OpenMRI/ocra.git (master branch commit c1bf1a2a18cb337d4e6b8a3b2e90fa056b51e73a created a bootable image at the time of writing).

Generating an SD card image file
--------------------------------
First, all the required components of the image must be built with the command:

	bitbake openmri-image

Once that command is complete, you can run the command

	wic create sdimage-bootpart -e openmri-image

to generate a .direct file.  This file can be written directly to an sd card with dd on Linux or Win32DiskImager on Windows.


II. Misc
========

u-boot version
--------------
U-boot has been updated.  However, the method was inelegant.  It needs to be cleaned up.  It may be possible to upgrade one version of u-boot at a time and using the kbuild system to upgrade the configuration files.

fsbl version
------------
The FSBL recipe currently depends on proprietary Xilinx tools being installed separately.
 - TODO: Modify the recipe in meta-xilinx-tools to install proprietary Xilinx tools automatically or create a new recipe to download and untar the tools.

The fsbl currently uses a gnu cross compiler provided with the Xilinx tools.
 - TODO: Modify the make file to use the tools natively built in yocto instead.

About

Yocto layer to provide support for common Zynq based FPGA boards used in the community

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published