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: 
Adventurer
Adventurer
365 Views
Registered: ‎04-19-2018

Device tree system-user.dtsi, not building

Jump to solution

Hi

I am trying to allocate some reserved memory in petalinux as in the wiki/confluence page;
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841683/Linux+Reserved+Memory

I have a project based on the ZCU111 (RFSoC eval), i have added a modified 'system-user.dtsi' as shown in the wiki/confluence page this appears to compile and i can boot the image,  however this image when booted does not show reservered memory using command;
'cat /proc/iomem.'

Injecting syntax errors in the system.dtsi does not cause errors when i run "petalinux-build -c device-tree" , however "petalinux-build -b device-tree" does causes errors (as expected due to the syntax errrors)., but i'm unsure how to build this 'system.dtb' into the 'image.ub'

The project doesn't appear to always be including system-user.dtsi?

Any pointers on what is going wrong or what to try.

Thanks
Tim

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
285 Views
Registered: ‎09-12-2007

Re: Device tree system-user.dtsi, not building

Jump to solution

Also, you can always quickly compile the DT if you are making changes here as running through the tools can be time consuming:

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

cd <plnx proj>/components/plnx_workspace/device-tree/device-tree
gcc -I ../../../../project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp -o my_dts/system-top.dts.tmp system-top.dts
dtc -I dts -O dtb -o system-top.dtb system-top.dts.tmp

 

Once you are happy, then as Sandeep says:

  • petalinux-build -c device-tree -x cleanstate
  • petalinux-build -c device-tree
 

View solution in original post

0 Kudos
4 Replies
Adventurer
Adventurer
304 Views
Registered: ‎04-19-2018

Re: Device tree system-user.dtsi, not building

Jump to solution

It appears the running "petalinux-build -c device-tree" build on first build and includes "system-user.dtsi" file.

 

Subsequent rebuild using "petalinux-build -c device-tree" does not rebuild even if changes to the "system-user.dtsi" file have been applied.

I am forced to do a "petalinux-build -x mrproper" to clean the project, then rebuild using "petalinux-build".

 

Is this expected behaviour of the petalinux tools?

Thanks
Tim

0 Kudos
Moderator
Moderator
293 Views
Registered: ‎04-24-2017

Re: Device tree system-user.dtsi, not building

Jump to solution

Hi @tmonaghan84 ,

Whenever you add nodes to system-user.dtsi you need to run cleansstate.

$ petalinux-build -c device-tree -x cleansstate
$ petalinux-build -c device-tree

With this it should generate the right nodes and you no need to run "petalinux-build -x mrproper"

Once you run any bitbake recipe for example in this case it's "device-tree" you can verify the list of task executed in log.task_order file

$ cat <TMPDIR>/<PROJECT_NAME>/work/<YOCTO_MACHINE_NAME>-xilinx-linux/device-tree/xilinx+gitAUTOINC+73e546e312-r0/temp/log.task_order
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Highlighted
Moderator
Moderator
286 Views
Registered: ‎09-12-2007

Re: Device tree system-user.dtsi, not building

Jump to solution

Also, you can always quickly compile the DT if you are making changes here as running through the tools can be time consuming:

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

cd <plnx proj>/components/plnx_workspace/device-tree/device-tree
gcc -I ../../../../project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp -o my_dts/system-top.dts.tmp system-top.dts
dtc -I dts -O dtb -o system-top.dtb system-top.dts.tmp

 

Once you are happy, then as Sandeep says:

  • petalinux-build -c device-tree -x cleanstate
  • petalinux-build -c device-tree
 

View solution in original post

0 Kudos
Adventurer
Adventurer
207 Views
Registered: ‎04-19-2018

Re: Device tree system-user.dtsi, not building

Jump to solution

should be

 

petalinux-build -c device-tree -x cleansstate