Jump to content
  • 0

bitstream and yocto


yohboy

Question

Hi everyone !

I'm working on the zybo board. There is a yocto linux on a SD card, and the system boot on the SD card.

This works very well.

Now I really enjoy if I could understand how to link vivado (to generate bitstream) and yocto !

I'm a little lost about this link. I read that some people say to use the layers meta-xilinx-tools ? Someone already use it ? I don't really understand how to use it, and how manage the boot.bin, u-boot, fsbl ... etc

Could you help me please ?

best regards,

Yohan

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Hi jpeyron, thank you for your answer ! And thank you for the docs, it helped me to understand a little more some part.

The part I don't really understand is what is necessary to use the layers meta-xilinx-tools ? the .hdf is enough ? or do I need also the DTS ? or DTSI ? I didn't catch the difference between them. Do I need to create myself the Boot.bin ? the DTC ? As you see it's not clear in my mind.

Also, what exactly the difference between the .hdf and the bitstream (.bit) ?

best regards,

Yohan

 

Link to comment
Share on other sites

The .hdf is a compressed folder that contains the bitstream and some other files that describe your vivado project. It is the "hand-off" file that describes everything you have done in Vivado to xSDK, petalinux, or yocto. Fun trick, rename your .hdf file to .zip, and you can open it like a normal zip folder to see what is inside :).

Using yocto with xilinx tools is pretty advanced. I think you might be better off using petalinux as your build environment, as it is much better documented. We have a project for the ZYBO here: https://github.com/Digilent/petalinux-bsps/wiki/Quick-start-guide . You can pair that project with the complete petalinux documentation from Xilinx here: https://www.xilinx.com/support/documentation/sw_manuals/petalinux2015_4/ug1144-petalinux-tools-reference-guide.pdf . That should hopefully get on the right track.

BTW, make sure you use petalinux 2015.4 with that project. We are trying to get these projects updated to the most recent version of petalinux, but it is taking time.

 

Link to comment
Share on other sites

Thank you for information about hdf, and fun trick about the zip :)

I begin to understand the link between yocto and vivado. I don't want to use Petalinux, sure it is easier to use with documentation etc, but in the future, I'll need yocto. Moreover I have time to understand step by step :)

Maybe I should create a new topic for this question, I don't know, so : think it's the same for petalinux and yocto, we have to generate a DTS. The DTSI file are DTS file that can be included in the DTS master, right ? The DTB is the result of the DTS/DTSI compiled (with DTC), right too ? This file (DTB) make the link between the linux kernel, and the hardware (on my zybo, PS and PL ?). 

To generate DTS/DTSI, I used a xilinx tools : device-tree-xlnx. Is it the only way to generate those file ? Also is is sufficient ? Or should I complete it myself ?

best regards,

Yohan

Link to comment
Share on other sites

K, last petalinux push, I promise... You might want to look at petalinux 2016.4. That release has nearly the entire backend replaced by yocto. It also allows you to tie in your own yocto recipes. Unfortunately we don't have a ZYBO project for it yet so you would just need to rely on the Xilinx docs. It seems like Xilinx is planning on merging there yocto and petalinux efforts. OK, got that out of my system :).

You are correct that you always need to have a device tree. This is what describes your hardware to Linux. The .dts is the device tree source that gets compiled into the .dtb (device tree blob). The .dtsi files are just includes that are copied into the .dts file whenever they are included. The yocto build should automatically take the device tree source files and compile it into a .dtb, and then wrap it up into image.ub.

Xilinx also has tools that will generate a .dts file and .dtsi files from a .hdf file, but I'm not sure how it works in yocto. In petalinux it automatically generates the .dtsi files and a .dts file. You are expected to modify the .dts file yourself to make any customizations you need. You often need to make customizations for things like video input or output in the PL, custom IP cores, or modifications to get the USB or ethernet controller working properly. You can see the device tree we use for our zybo project here:

https://github.com/Digilent/petalinux-bsps/tree/master/projects/Digilent-Zybo-Linux-BD-v2015.4/subsystems/linux/configs/device-tree

The vivado design is called linux_bd here:

https://github.com/Digilent/ZYBO

I'm really not familiar with the various xilinx yocto layers and recipes. You will need to reach out to them for better info on that.

Link to comment
Share on other sites

I think I'm close to the solution ! Thank you for help !

The DTS/DTSI begin to be clear in my mind. I still don't want to use petalinux :P

I'll try to finish my recipe in yocto in the next few day and add my own  project to test PL/PS  with the DTS.

 

Link to comment
Share on other sites

Hi !

Just a quick answer to thank for help !

I'm now able to use yocto with layers/recipes to manage my project and all files needed to boot on linux, and use vivado to create hdf and DTS. It is working very well :=)

Next step is to add a RF module with my zybo, with SPI communication and interrupt !

 

 

Link to comment
Share on other sites

On 24/3/2017 at 10:43 AM, yohboy said:

Hi !

Just a quick answer to thank for help !

I'm now able to use yocto with layers/recipes to manage my project and all files needed to boot on linux, and use vivado to create hdf and DTS. It is working very well :=)

Next step is to add a RF module with my zybo, with SPI communication and interrupt !

 

 

Hi Yohboy, I'm in the same situation. I want to use yocto. I generate DTS/DTSI with Vivado SDK and device tree tool but I miss how to integrate in yocto. Could you give me any suggestions? 

Link to comment
Share on other sites

Hi @yohboy,

Like you, i want to to link my Vivado project with my Yocto project without using Petalinux. I tired to add my HDF file to a Yocto Layer and using meta-xilinx-tools but it failed.

I'm in the exact situation as your first messages, i'm a little lost about the use of layers meta-xilinx-tools, how to use it, etc ...

I try on a Zybo board Z7-10.

Thank you for the reply :P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...