cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dahenk
Explorer
Explorer
12,836 Views
Registered: ‎09-02-2013

Generate device tree SDK 2014.2

Jump to solution

Is there still no way to generate device tree for SDK versions after 2013.4 ?

 

no device tree folder appears when running the generator from https://github.com/Xilinx/device-tree-xlnx

 

What is the intended procedure for it? i.e. how will this work in the future?

0 Kudos
1 Solution

Accepted Solutions
linnj
Xilinx Employee
Xilinx Employee
19,410 Views
Registered: ‎09-10-2008
I'm using 2014.2. Here's what I did (I tried it 2 different times and could not replicate what you see).

I put a copy of the device-tree-xlinx repo in my SDK project directory (took a zip file from github using 2014.2 tag).

Added the repository as a global repository for the device tree generator just pointing at the top level directory of it.

Created a device tree BSP. It said I did not have a hardware platform at this point as I didn't, but I pointed to my hdf file that was exported from Vivado and it was happy.

It then brought up the configuration page for the device tree BSP and I just accepted all the defaults. Then the device trees (dts and dtsi) are generated into the device_tree_bsp_0 dir of the SDK project.

My testing is showing the device tree is good for the PS but not the PL with my AXI DMA as it causes the kernel to crash and I have a snippet of device tree to fix that. This was booting with the 2014.2 Zynq release images at http://www.wiki.xilinx.com/Zynq+2014.2+Release and then replacing the device tree.

My testing with trying to get Petalinux to boot was not successful so far but I need to continue down that path a bit more.

Thanks
John

View solution in original post

15 Replies
trenz-al
Scholar
Scholar
12,832 Views
Registered: ‎11-09-2013

no longer supported or maintained that way:

 

install petalinux 2014.2

 

use HDF file from vivado export

 

petalinux-config --get-hw-description 

 

builds the tree

 

there is NO OTHER WAY (unless full manual!)

 

works for zynq, works for microblaze

 

 

 

 

 

 

 

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
12,821 Views
Registered: ‎09-10-2008

I'm not trying to be argumentative, but just wanting to ensure I understand correctly.  Are you confident of that and have seen that from Xilinx?  

 

I don't believe that's the intent (and I could be wrong) but want to test it myself as I have not for a while.

 

The device-tree-xlnx repo on github says for Xilinx SDK (Vivado > 2014.1).

 

Thanks

John

0 Kudos
trenz-al
Scholar
Scholar
12,817 Views
Registered: ‎11-09-2013

uboot github links, also from inside uboot code point to the maintainers website, that has not been updated for years.

 

2014.1 should not be used for anything anyway, and in 2014.2 the HDF import works nicely..

 

thats the story.

 

and belive me, we have tried the SDK device tree generation, ONLY frustration....

 

 

0 Kudos
dahenk
Explorer
Explorer
12,795 Views
Registered: ‎09-02-2013

Never used PetaLinux before. Can that even be run on Windows?

 

Is there any way for a Windows user to create a device tree?

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
12,788 Views
Registered: ‎09-10-2008

Hi,

 

I just downloaded the device-tree-xlnx repo contents from github, added it as a repository to my SDK project in Windowsn (not using Petalinux), and generated the device trees for my project (system.dts, pl.dtsi, and ps.dtsi).  They all look reasonable but I still need to test them. I'll let you know how it goes but looks promising so far.

 

Thanks

John

0 Kudos
dahenk
Explorer
Explorer
12,783 Views
Registered: ‎09-02-2013

I got as far as getting the repository in SDK, but then it whined about no system.mss file. When I manually provided that it just built seemingly the same things as the normal BSP did, and still no devicetree to be found anywhere.

 

How did you generate the actual device tree after providing the repository?

 

Which SDK version are you using?

0 Kudos
trenz-al
Scholar
Scholar
12,781 Views
Registered: ‎11-09-2013

and it generates SAME device tree as petalinux 2014.2 --get-hw-description does?

 

for Zynq?

and for Microblaze?

 

I doubt!

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
19,411 Views
Registered: ‎09-10-2008
I'm using 2014.2. Here's what I did (I tried it 2 different times and could not replicate what you see).

I put a copy of the device-tree-xlinx repo in my SDK project directory (took a zip file from github using 2014.2 tag).

Added the repository as a global repository for the device tree generator just pointing at the top level directory of it.

Created a device tree BSP. It said I did not have a hardware platform at this point as I didn't, but I pointed to my hdf file that was exported from Vivado and it was happy.

It then brought up the configuration page for the device tree BSP and I just accepted all the defaults. Then the device trees (dts and dtsi) are generated into the device_tree_bsp_0 dir of the SDK project.

My testing is showing the device tree is good for the PS but not the PL with my AXI DMA as it causes the kernel to crash and I have a snippet of device tree to fix that. This was booting with the 2014.2 Zynq release images at http://www.wiki.xilinx.com/Zynq+2014.2+Release and then replacing the device tree.

My testing with trying to get Petalinux to boot was not successful so far but I need to continue down that path a bit more.

Thanks
John

View solution in original post

dahenk
Explorer
Explorer
12,772 Views
Registered: ‎09-02-2013

What the.. ?

now it worked suddenly. I don't know what the difference was. Maybe I didn't select the whole folder as repository, only the "device-tree" folder inside of it?

Or maybe the device tree repository has to be in the workspace folder?

 

Thanks for the help anyway. I don't know if the tree will actually work though, but at least it generates now.

0 Kudos
manuelstahl
Visitor
Visitor
6,901 Views
Registered: ‎09-22-2014

@trenz-al wrote:

no longer supported or maintained that way:

 

install petalinux 2014.2

 

use HDF file from vivado export


Then how do I have to integrate further devices into the device-tree? Like SPI or I2C slaves that are not in PL but outside of the Zynq? Do I need to use Vivado or can it be done in Petalinux directly?

0 Kudos
manuelstahl
Visitor
Visitor
6,888 Views
Registered: ‎09-22-2014

Found out myself:

 

We can modify subsystems/linux/configs/device-tree/system-top.dts and override parts of the included and autogenerated files. See http://elinux.org/images/a/a3/Elce2013-petazzoni-devicetree-for-dummies.pdf

0 Kudos
gouthamp
Adventurer
Adventurer
4,492 Views
Registered: ‎02-04-2016

WHen I try the steps mentioned as the right answer, I do get some error. I could be doing something stupid too. Please find the attached figures. 

It says Genreation failed and showed the error as shown in attached -jpg

then when i checked the SDK log , i can see that it says drivers and processor is not instantiated. Please do find the sdk.log attached.

Basically, it says processor instance not availble, driver instance not available , OS instance not available. I also see an error shown to TCL script in the sdk.log. 

Also, as seen in the jpg, it says "No rule to make target "all".

 

I am beginer and pretty confused. any help would be grateful. 

1.jpg
0 Kudos
gouthamp
Adventurer
Adventurer
4,489 Views
Registered: ‎02-04-2016
ERROR : [Hsm 55-1545] Problem running tcl command ::sw_device_tree::device_tree_drc : invalid command name "hsi::utils::add_new_child_node"
while executing
"hsi::utils::add_new_child_node $os_handle "global_params""
(procedure "::sw_device_tree::device_tree_drc" line 3)
invoked from within
"::sw_device_tree::device_tree_drc device_tree"
[Hsm 55-1440] Error(s) while running DRCs.
15:21:37 ERROR : Error generating bsp sources: Failed to generate BSP.
15:21:37 ERROR : Failed to generate sources for BSP project device_tree_bsp_0
org.eclipse.core.runtime.CoreException: Internal error occurred while generating bsp sources. Please check the SDK Log view for further details.
at com.xilinx.sdk.sw.ui.handlers.RegenBspSourcesHandler.internalGenerateBsp(RegenBspSourcesHandler.java:178)
at com.xilinx.sdk.sw.ui.handlers.RegenBspSourcesHandler.access$2(RegenBspSourcesHandler.java:163)
at com.xilinx.sdk.sw.ui.handlers.RegenBspSourcesHandler$1$1.run(RegenBspSourcesHandler.java:131)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at com.xilinx.sdk.sw.ui.handlers.RegenBspSourcesHandler$1.run(RegenBspSourcesHandler.java:135)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

I do get this error. I dont understand what causes this. dts and dtsi are not getting created and regeneration fails.
0 Kudos
jenny_august13
Explorer
Explorer
2,351 Views
Registered: ‎03-09-2017

Hi I am using petalinux sdk 2017.1 and when i did petalinux-config --get-hw-description .... as it is in the user guide it is not generating any device tree in the plnx-workspace and i have my BSP for zynq in the same project directory on my virtual machine.

I couldnot see system-top.dts anywhere in my petalinux prj directory... 

0 Kudos
greande
Explorer
Explorer
961 Views
Registered: ‎02-19-2018

So does Xilinx no longer support the SDK flow at all? Are they shoe-horning people into using PetaLinux?

I was able to generate a device tree using SDK (despite the near utter lack of documentation on the process) and I get a system-top.dts, system.dts, pl.dtsi, pcw.dtsi, and zynqmp.dtsi. 

Why is there both a system.dts and a system-top.dts? Which am I supposed to use, and what do I do with the other?

Like another poster said, there are large differences between the SDK generated zynqmp.dtsi and the one in the Linux kernel tree. Is the SDK generated device tree in-sync with the kernel version, and if so, why are they so different?

0 Kudos