cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
2,478 Views
Registered: ‎05-22-2008

ZCU102 Petalinux Tutorial no BSP

Jump to solution

I'm trying to get some of Xilinx 10G' reference design (XAPP1305) running on a ZCU102 board, and I'd like to create and deploy linux using petalinux, but without using the Xilinx provided BSP for the board. I'm using Vivado2017.3 and petalinux 2017.3

 

Between the PDF in the XAPP, the wiki on wiki.xilinx.com, as well as Xilinx Embedded Design tutorial (UG1209), every tutorial I've seen for using petalinux starts with a BSP. In the research I've done, it seems 1) if one wanted to create the included BSP, one would actually use petalinux-package, and 2) that one doesn't need to start w/ a BSP. But what I haven't found is the document that explains how to start w/ the Outputs from Vivado and get to 1) a packaged BSP, or 2) more importantly the binaries needed to boot. I've done bare metal stuff and know how to get to a BSP for a bare metal application, so those parts of the tutorials don't help.

 

I haven't waded through the petalinux command line reference yet, and that is likely my next move, but I have trouble believing that there isn't a tutorial/document that explains either of what petalinux BSPs are composed and how to create them, or how to get to boot without starting from one. Can anyone provide a reference?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
2,610 Views
Registered: ‎05-14-2018

I've manged to get the 10G Ethernet example built using the HDF flow with the following commands. Lines that start with a # are comments that describe things you need to do manually. Things in curly brackets {} are paths to files out side of the project.

 

petalinux-create -t project -s {path to the bsp file for the dev board that can be found on the petalinux dewnload page}\xilinx-zcu102-v2017.3-final.bsp -n pl_eth_10g
cd pl_eth_10g
petalinux-config --get-hw-description={path to the 10G example vivado project that has built successfully and the hdf file exported}/pl_eth_10g.sdk/

# Quit the GUI that appears as there is nothing to modify
petalinux-config -c kernel

# Manually navigate the GUI that appears and change the following
# Device Drivers> Network device support > PHY Device support and infrastructure > <*> Drivers for xilinx PHYs
# Device Drivers> DMA Engine Support> <> Xilinx AXI DMAS Engine
cp {path to the xapp1305-ps-pl-based-ethernet-solution directory}/software/patches/0001-Remove-the-axistream-related-properties.patch project-spec/meta-user/recipes-bsp/device-tree/files

# Edit the bbappend file as described on the wiki page
gedit --new-window project-spec/meta-user/recipes-bsp/device-tree/device-tree-generation_%.bbappend &

# Add the following line

# file://0001-Remove-the-axistream-related-properties.patch \
cp {path to the xapp1305-ps-pl-based-ethernet-solution directory}/software/device_tree/pl_eth_10G/system-user.dtsi ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

# Projects created from the bsp change one of the clocks from it's default frequency of 156.25MHz to 148.5MHz. This change needs to be disabled for the 10G MAC to work.
echo "&i2c1 {" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
echo " status = \"disabled\";" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
echo "};" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
petalinux-build
cd images/linux/
petalinux-package --boot --fsbl=zynqmp_fsbl.elf --fpga=pl_eth_10g_wrapper.bit --u-boot --force

 

I hope this helps.

View solution in original post

0 Kudos
5 Replies
Highlighted
Moderator
Moderator
2,452 Views
Registered: ‎09-12-2007

There are steps to build manually in the wiki:

http://www.wiki.xilinx.com/PS+and+PL+based+Ethernet+in+Zynq+MPSoC

 

You can build the HW here, and there are steps to configure the petalinux here too.

0 Kudos
Highlighted
Explorer
Explorer
2,403 Views
Registered: ‎05-22-2008

The steps in the wiki start with a precompiled BSP.    It looks like the section that I needed was added to the wiki overnight. It wasn't there yesterday. 

0 Kudos
Highlighted
Explorer
Explorer
2,350 Views
Registered: ‎05-22-2008

Another question; The tutorial indicates to make manual changes to:

 

project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dts

 

Before making any of the directed changes, if I look, When I don't use the BSP, this file in empty. When I do use the BSP, this file contains sections for gem3 and i2c0.

 

Why is this manual change necessary? From some light research, it appears this file is strictly for user directed manual overrides what would otherwise be contained in another dtsi file.

 

In the same vein, if I wanted to start with the .HDF file and get to a BSP, how does this file get populated to what the BSP initialize it to.

0 Kudos
Highlighted
Contributor
Contributor
2,611 Views
Registered: ‎05-14-2018

I've manged to get the 10G Ethernet example built using the HDF flow with the following commands. Lines that start with a # are comments that describe things you need to do manually. Things in curly brackets {} are paths to files out side of the project.

 

petalinux-create -t project -s {path to the bsp file for the dev board that can be found on the petalinux dewnload page}\xilinx-zcu102-v2017.3-final.bsp -n pl_eth_10g
cd pl_eth_10g
petalinux-config --get-hw-description={path to the 10G example vivado project that has built successfully and the hdf file exported}/pl_eth_10g.sdk/

# Quit the GUI that appears as there is nothing to modify
petalinux-config -c kernel

# Manually navigate the GUI that appears and change the following
# Device Drivers> Network device support > PHY Device support and infrastructure > <*> Drivers for xilinx PHYs
# Device Drivers> DMA Engine Support> <> Xilinx AXI DMAS Engine
cp {path to the xapp1305-ps-pl-based-ethernet-solution directory}/software/patches/0001-Remove-the-axistream-related-properties.patch project-spec/meta-user/recipes-bsp/device-tree/files

# Edit the bbappend file as described on the wiki page
gedit --new-window project-spec/meta-user/recipes-bsp/device-tree/device-tree-generation_%.bbappend &

# Add the following line

# file://0001-Remove-the-axistream-related-properties.patch \
cp {path to the xapp1305-ps-pl-based-ethernet-solution directory}/software/device_tree/pl_eth_10G/system-user.dtsi ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

# Projects created from the bsp change one of the clocks from it's default frequency of 156.25MHz to 148.5MHz. This change needs to be disabled for the 10G MAC to work.
echo "&i2c1 {" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
echo " status = \"disabled\";" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
echo "};" >> ./project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
petalinux-build
cd images/linux/
petalinux-package --boot --fsbl=zynqmp_fsbl.elf --fpga=pl_eth_10g_wrapper.bit --u-boot --force

 

I hope this helps.

View solution in original post

0 Kudos
Highlighted
Explorer
Explorer
2,257 Views
Registered: ‎05-22-2008

@smellor These steps do appear to work. Which is awesome. Following on...your steps appear to create the project from the bsp, and then to import/get-hw-description from my compiled hdf file. In as much as I have read, these steps generally seem to be an either-or proposition. I'm going to repeat your steps while only doing one or the other to try to test this understanding. 

0 Kudos