08-13-2020 02:25 PM - edited 08-13-2020 02:31 PM
There is a bit of a gap in my knowledge I'm hoping to cross. I'm going through the process of generating a boot image and rootFS for a zynq 7020 that lives on a custom board. Following the instructions (UG1144), I run:
petalinux-config --get-hw-description <PATH-TO-XSA Directory>/--get-hw-description=<PATH-TO_XSA Directory>
then the system menu config pops up and I then make sure target is replaced by zc702:
DTG Settings → → (target) MACHINE_NAME
08-14-2020 03:55 AM
Hi @bfung_2 ,
There are a lot of questions. I'll try my best
I think, this link is very usefull for you. You can find answers there.
The DTG is built into PetaLinux.
Petalinux uses the Hardware Description File (HDF) as an input into the DTG.
The HDF describes the HW to the DTG.
If no HDF is provided, then PetaLinux will use a default based on the template (ZynqMP in this case).
The devicetree is used to describe the HW to the kernel.
For example you are using a zynq 7020 as I.
If you use ZC702 design as base, petalinux knows most of the features automatically and can create related device-tree for Petalinux(not Peta-linux).
You can find your generated device tree as pl.dtsi.
Off course, you have a custom board and it contains different interfaces on it.
Then you need to define your extras in system-user.dtsi file. It completes your build(device-tree) according to your custom board. So that you can use your board specific interfaces(ethernet, SFP...)
For example, your custom board has some extrainterfaces from your base eval board(ZC702), but you dont want to use your board specific interfaces, then you dont need to add them in system-user.dtsi.
system-user.dtsi file is also used for different purposes:
All of your setting overwrites setting in pl.dtsi file, if pl.dtsi has same tags in it.
For example you define in Vivado design a Custom Ip Core. It automatically placed on pl.dtsi file after Petalinux-build.
If you want to overwrite it and want to change some registers or some interrupt related settings then you can do it this changings in system-user.dtsi file.
Saban
08-14-2020 03:55 AM
Hi @bfung_2 ,
There are a lot of questions. I'll try my best
I think, this link is very usefull for you. You can find answers there.
The DTG is built into PetaLinux.
Petalinux uses the Hardware Description File (HDF) as an input into the DTG.
The HDF describes the HW to the DTG.
If no HDF is provided, then PetaLinux will use a default based on the template (ZynqMP in this case).
The devicetree is used to describe the HW to the kernel.
For example you are using a zynq 7020 as I.
If you use ZC702 design as base, petalinux knows most of the features automatically and can create related device-tree for Petalinux(not Peta-linux).
You can find your generated device tree as pl.dtsi.
Off course, you have a custom board and it contains different interfaces on it.
Then you need to define your extras in system-user.dtsi file. It completes your build(device-tree) according to your custom board. So that you can use your board specific interfaces(ethernet, SFP...)
For example, your custom board has some extrainterfaces from your base eval board(ZC702), but you dont want to use your board specific interfaces, then you dont need to add them in system-user.dtsi.
system-user.dtsi file is also used for different purposes:
All of your setting overwrites setting in pl.dtsi file, if pl.dtsi has same tags in it.
For example you define in Vivado design a Custom Ip Core. It automatically placed on pl.dtsi file after Petalinux-build.
If you want to overwrite it and want to change some registers or some interrupt related settings then you can do it this changings in system-user.dtsi file.
Saban
08-25-2020 07:56 PM
@sabankocal Thanks for your response.
I found some information which I'd like your comment on: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug1144-petalinux-tools-reference-guide.pdf pg. 118.
Here, the guide suggests that for custom boards, the machine name should be left as template.
Seems like there is conflicting information?
08-25-2020 09:49 PM - edited 08-26-2020 12:04 AM
Hi @bfung_2 ,
you can think like that:
You have a device-tree, contains two parts:
As a result, I could not see a conflict.
Saban