Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reference:programmable-logic:eclypse-z7:customizing-zmods-os [2020/01/15 17:18]
Arthur Brown
reference:programmable-logic:eclypse-z7:customizing-zmods-os [2020/04/28 16:42] (current)
Arthur Brown [Guide]
Line 1: Line 1:
-====== Adding Zmod Support in Petalinux ​(Under Construction) ​======+====== Adding Zmod Support in Petalinux ======
  
-<WRAP ROUND IMPORTANT 660PX> +===== Overview ​===== 
-=== Important!!! ​=== + 
-This page is under construction. The steps described ​may not be accurate+This guide goes through the process of adding support for a Zmod hierarchical block to a Petalinux environment,​ so that a user may use a custom hardware design with Petalinux
-</​WRAP>​+ 
 +---- 
 +===== Prerequisites =====
  
 Section Requirements:​ Section Requirements:​
-  * Linux Environment +  * Petalinux Installation in a supported environment 
-  Base Petalinux ​Project+    * Petalinux is a tool created by Xilinx, used for the creation and modification of Linux images for Xilinx chips, including the Zynq-7000. \\  
 +    Xilinx'​s [[https://​www.xilinx.com/​support/​documentation/​sw_manuals/​xilinx2019_1/​ug1144-petalinux-tools-reference-guide.pdf|Petalinux ​Tools Reference Guide (UG1144)]] covers installation and usage of Petalinux. Chapter 2 discusses the installation process. 
 +    * For Windows users, Digilent recommends the use of either a dual-boot Linux setup or virtual machine that fits the requirements specified in UG1144, linked above.
   * HDF File exported from the target Vivado Project   * HDF File exported from the target Vivado Project
-  ​Petalinux 2019.1 Install+    ​The [[vivado:​getting-started-with-ipi:​start]] and [[learn:​programmable-logic:​tutorials:​vivado-hierarchical-blocks:​start]] step through the process of creating a hardware design that can be used in this guide. 
 +  * MicroSD Card
  
-  ​- Download the latest release ​of the [[|Eclypse Z7 Base Petalinux Project]], and extract it. +---- 
-  - Open a console and cd into the extracted ​petalinux ​project. +===== Guide ===== 
-  - Call "petalinux-config --get-hw-description=<​path to .hdf folder>" to import the hardware exported from Vivado into the project. + 
-  - Navigate to and open the system-user device tree source include file (./​project-spec/​meta-user/​recipes-bsp/​device-tree/​files/​system-user.dtsi) in a text editor. Add the following code to the file: <​code>&​AXI_ZmodADC1410_0 ​{+  ​- Download the sources for the most recent tagged commit ​of the [[https://​github.com/​Digilent/​Eclypse-Z7-OS/​releases|Eclypse Z7 Base Petalinux Project]] ​(as a tar or zip), and extract it. 
 +  - Open a console and cd into the extracted ​Petalinux ​project. 
 +  - Call the following command to import the hardware exported from Vivado into the project: <​code>​petalinux-config --get-hw-description=<​path to .hdf folder></​code>​ 
 +  - Navigate to and open the system-user device tree source include file (./​project-spec/​meta-user/​recipes-bsp/​device-tree/​files/​system-user.dtsi) in a text editor. Add the following code to the file: <​code>&​AXI_ZmodADC1410_1 ​{
     compatible = "​generic-uio";​     compatible = "​generic-uio";​
 }; };
Line 25: Line 33:
         dma-names = "​rx_channel";​         dma-names = "​rx_channel";​
     };     };
-};</​code>​ //Confirm the name of each IP listed, in this case the axi_dma_0 and AXI_ZmodADC1410 ​against ​the Vivado project. ​Hierarchy names containing an IP should be prepended to the IP name (?).// +};</​code> ​**Important**: ​//​Confirm ​that the name of each IP listed, in this case the axi_dma_0 and AXI_ZmodADC1410, match names in the Vivado project. ​If the IP is contained in a hierarchy, the name of the hierarchy ​should be prepended to the IP name (example: ZmodADC_0_AXI_ZmodADC1410).// 
-  - Additional changes to the petalinux ​project can be made at this time. TODO add a brief rundown on one or more common cases+  - Additional changes to the Petalinux ​project can be made at this time. For example, the default filesystem is initially set to initramfs and may be changed to SD card by calling <​code>​petalinux-config</​code>​ navigating the menu into **Image Packaging configuration** -> **Root filesystem type** and selecting **SD card**
-  - Build the petalinux ​project by calling the following command: <​code>​petalinux-build</​code>​ Note that this process may take anywhere from 15 to 60 minutes, depending on the computer used. \\ This process produces a file called image.ub that contains ​(a bunch of stuff)+  - Build the Petalinux ​project by calling the following command: <​code>​petalinux-build</​code>​ Note that this process may take anywhere from 15 to 60 minutes, depending on the computer used. \\ This process produces a FIT image called image.ub that contains ​the kernel, device tree and the root filesystem
-  - Once the project has build, ​(files) ​must be packaged into a single binary which can be used to boot the board. This binary is named "​BOOT.bin"​ and can be generated with the following command, and can be found in the ./​images/​linux folder. ​<​code>​petalinux-package --boot --force --fsbl images/​linux/​zynqmp_fsbl.elf --fpga images/​linux/​system.bit --u-boot</​code>​ +  - Once the project has build, ​the FSBL, FPGA bitstream, PMU firmware, and U-Boot ​must be packaged into a single binary which can be used to boot the board. This binary is named "​BOOT.bin"​ and can be generated with <​code>​petalinux-package --boot --force --fsbl images/​linux/​zynqmp_fsbl.elf --fpga images/​linux/​system.bit --u-boot</​code> ​and can be found in the ./​images/​linux folder. ​ 
-  - Format the SD card with FAT32, then image it with the provided linux image (FIXME release link).+  - Format the SD card with FAT32.
   - Copy the image.ub and the BOOT.bin from the Petalinux project to the SD card's first partition.   - Copy the image.ub and the BOOT.bin from the Petalinux project to the SD card's first partition.
-  - See [[reference:​zmod:​zmodbaselibraryuserguide|Zmod Base Library User Guide]] for instructions on setting up software for the chosen Zmod/s. 
  
 +----
 +===== Next Steps =====
 +
 +See [[reference:​zmod:​zmodbaselibraryuserguide|Zmod Base Library User Guide]] for instructions on setting up software examples for the chosen Zmod/s.
 +
 +See the [[start|Eclypse Z7 Resource Center]] for more information on the Eclypse Platform.