UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
214 Views
Registered: ‎08-07-2014

Petalinux-related wiki pages: attention to details

Hello,

I'd like to express my disapointment with some Petalinux-related wik pages. With a little bit of attention, it would save us precious time when facing problems with petalinux build. Mostly of problems I see is the lack of understand that users will run those commands in a sequence, so showing the command that takes us to the right directory *after* a sequence being executed is important.

I will exemplifly using two pages:

1)  https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/136904764/Creating+Devicetree+from+Devicetree+Generator+for+Zynq+Ultrascale+and+Zynq+7000

the sequence tell us to create "repo/my_dtg" then clone and change directory to "device-tree-xlnx". After that, the hsi commands shows that we need to be in the "repo "directory. So, the last command that must be shown in the shell sequence is "cd ../../..". This is lacking.

2) https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

There's no info whatsoever if all repositories must be cloned in the same directory or if they need to be in a certain directory structure. Maybe it looks obvious, but it isn't, since a code potentionally depends on other and Xilinx doesn't use (AFAIK) git submodules. So, some "cd .." or cd "cd ../../.." are need there to place us in the right directory so we can proceed and clone the next repository.

I'm posting this message as a feedback to make these wiki pages better. This is my only will.

 

regards

Brasilino

3 Replies
Xilinx Employee
Xilinx Employee
158 Views
Registered: ‎05-15-2018

Re: Petalinux-related wiki pages: attention to details

Hi @brasilino 

I agree that adding cd ../../../ before running the tcl script from HSI clarifies the flow and allows the user to proceed without errors. We are aware of this required change, and it will be taken care of in the currently ongoing revamp of our Wiki content. Just to clarify, here is the correct sequence which has been tested and found to work as expected:

mkdir repo
mkdir repo/my_dt
cd repo/my_dt
git clone https://github.com/Xilinx/device-tree-xlnx
cd device-tree-xlnx
git checkout xilinx-v2018.3
cd ../../../

create a .tcl file with the following contents:

proc gen_dtb {hdf} {
open_hw_design $hdf
set_repo_path ./repo
create_sw_design device-tree -os device_tree -proc psu_cortexa53_0
generate_target -dir my_dts
}

Launch HSI, and execute the following commands:

source <your_filename>.tcl

gen_dtb <HDF_FILE>.hdf

Exit from HSI

Download the DTSI file for your board and appropriate build version (https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.3/BOARD/zcu102-rev1.0.dtsi)
Place this DTSI file in my_dts, and also add /include/ "zcu102-rev1.0.dtsi" to system-top.dts file.

Compile the devicetree (DTB)

dtc -I dts -O dtb -o my_dts/system.dtb my_dts/system-top.dts

Note: if using Petalinux version above 2018.x, there will be errors when the above command is run since the include statements in system-top.dts have #include in them. Change #include to /include/ and re-run the dtc to fix this.

Thanks

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
135 Views
Registered: ‎08-07-2014

Re: Petalinux-related wiki pages: attention to details

@shirilt 

 

As a sugestion,  wiki instructions could use more extensively what git and bash provides, such as local repo clone directory and bash's pushd / popd / "cd -". Although last one might be difficult to non-Linux users see/recognize the dash character.

So, that sequence of commands could be:

$ mkdir -p repo/my_dt
$ git clone https://github.com/Xilinx/device-tree-xlnx repo/my_dt/device-tree-xlnx
$ pushd repo/my_dt/device-tree-xlnx
$ git checkout xilinx-v2018.3
$ popd

That would keep directory structure consistent for what hsi's TCL script expects.
Another point is: the DTS target output dir is my_dts, not my_dt. Not sure if that's a typo. If not, the above commands could eliminate my_dt creation/reference:

$ mkdir repo
$ git clone https://github.com/Xilinx/device-tree-xlnx repo/device-tree-xlnx
$ cd repo/device-tree-xlnx
$ git checkout xilinx-v2018.3
$ cd -

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
97 Views
Registered: ‎05-15-2018

Re: Petalinux-related wiki pages: attention to details

Hi @brasilino 

"Another point is: the DTS target output dir is my_dts, not my_dt. Not sure if that's a typo. If not, the above commands could eliminate my_dt creation/reference:"

In the sequence of steps listed on the wiki (and also the one that I poted above), the directory my_dt is only used to hold the device-tree-xlnx repo. This is not a typo, and the my_dt directory should not be confused with 'my_dts' which is the target directory for generated dts files (as specified in the last command of the tcl script).

Your sequence of steps listed also seems fine to me, and you are free to use whatever version suits you, as long as you test that it works. Since the wiki is quite extensive, the contents might not necessarily be created with the aim of being most efficient or aesthetically pleasing, and I'm sure some of the steps listed there will have better and more efficient counterparts. 

Thanks for the feedback, and we'll keep that in mind.

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos