Petalinux 2021.1 GitHub readme corrections and issues

Hi,

 I am hoping someone could correct and update the Analog Devices readme documentation in place for using the Petalinux 2021.1 master meta-adi branch at meta-adi/README.md at master · analogdevicesinc/meta-adi · GitHub.  Perhaps move some of this information back on to the wiki.analog.com/.../petalinux page.

 First the wiki page at

 wiki.analog.com/.../petalinux says the meta-adi branch for master is 2020.1 Petalinux; but is now 2021.1 per the readme for Petalinux on the GitHub. My understanding is 2020.1 is broken and does not work.

 Next in the meta-adi-xilinx master readme document for the build instructions appear to be incorrect in places.

  In Vivado and Petalinux it is no longer a hdf file but xsa file that is exported from new version of Vivado and needed by Petalinux 2021.

 In refering to the KERNEL_DTB entry to use is not the right format based on another forum question. It should be in the form echo "KERNEL_DTB=\"zynq-zc706-adv7511-fmcdaq2\"" >> project-spec/meta-user/conf/petalinuxbsp.conf.

 In the ZynqMP section in the readme the noted workaround can be found here which goes to support.xilinx.com/.../76842 is not very helpful and misleading in what it says. It should say open petalinux-config select Image Packaging Configuration menu then set Root filesystem type to EXT4 also make sure the Device node of SD device is set to second partition, /dev/mmcblk0p2.

 You might also wish to note that a SD card with second rootfs partition setup with IIO scope and apps can me made based on the wiki.analog.com/.../linux_hosts instructions where the files are at wiki.analog.com/.../embedded_arm_images. Simply remove the files and directories in the BOOT partition of the SD card and replace them with the Petalinux created boot.bin, boot.scr, and image.ub files.

 In looking over the rest of the readme document I found the FPGA manager and adding Devicetree section confusing in regards to the custom DTS files and how they overlay in Petalinux. Noting most of the way Petalinux does things I find confusing and difficult to understand in the Xilinx support documents for it. I have no idea what pl-delete-nodes is doing and how this applies to a devicetree or what is a device-tree.bbappend recipe sent to PR to meda-adi. A better actual example for each entry needed say for a zcu102 fmcomms2 or daq2 set of dts,dtsi, and user custom files needed would be nice.

 I know this is asking lot to detail how to do this all in the GitHub readme file or wiki page but it would be quite helpful to users of your FMC cards to detail the whole process of building a Petalinux based design. I do find the Analog Devices wiki documents for building a traditional version of Linux and base HDL design are easy to understand and use.  

    Analog Devices has always had great support. I am hopefully you will spend time updating the Petalinux build process such that it is correct and easier to understand.

Just to note,

  Not that I like dealing with the way in which Xilinx Petalinux does things. But I have this new development board I am trying to port my current custom working ZCU106 with AD9136 design to. They use Petalinux with special code in the boot.elf and fsbl.elf files to enable FMC card and IO bank voltages over I2C.  

 Currently I have built a base xc706 FMC daq2 design running under Petalinux 20201.1 with EXT4 rootfs partition and IIO scope application on it that is working.

Thanks,

Jay         

  • Hi,

     wiki.analog.com/.../petalinux says the meta-adi branch for master is 2020.1 Petalinux; but is now 2021.1 per the readme for Petalinux on the GitHub. My understanding is 2020.1 is broken and does not work.

    Yeah, that needs to be updated in the wiki. 2020.1 was working but we then decided to go to 2021.1 for the next release.

     In refering to the KERNEL_DTB entry to use is not the right format based on another forum question. It should be in the form echo "KERNEL_DTB=\"zynq-zc706-adv7511-fmcdaq2\"" >> project-spec/meta-user/conf/petalinuxbsp.conf.

    Correct...

     In the ZynqMP section in the readme the noted workaround can be found here which goes to support.xilinx.com/.../76842 is not very helpful and misleading in what it says. It should say open petalinux-config select Image Packaging Configuration menu then set Root filesystem type to EXT4 also make sure the Device node of SD device is set to second partition, /dev/mmcblk0p2.

    Not sure what can be better here...

     You might also wish to note that a SD card with second rootfs partition setup with IIO scope and apps can me made based on the wiki.analog.com/.../linux_hosts instructions where the files are at wiki.analog.com/.../embedded_arm_images. Simply remove the files and directories in the BOOT partition of the SD card and replace them with the Petalinux created boot.bin, boot.scr, and image.ub files.

    Nope, that's not the goal of the readme file. Petalinux is one way of doing things and ADI sdcard images is another one. I do not want to mix them... An advanced user will realize that anyways (as you did)...

     In looking over the rest of the readme document I found the FPGA manager and adding Devicetree section confusing in regards to the custom DTS files and how they overlay in Petalinux. Noting most of the way Petalinux does things I find confusing and difficult to understand in the Xilinx support documents for it. I have no idea what pl-delete-nodes is doing and how this applies to a devicetree or what is a device-tree.bbappend recipe sent to PR to meda-adi. A better actual example for each entry needed say for a zcu102 fmcomms2 or daq2 set of dts,dtsi, and user custom files needed would be nice.

    Well, I cannot really spell everything in the README file and go through all the implementation details. Again, that's not the goal of a README file. A more dedicated file would probably be needed. For instance, when you say "I have no idea what pl-delete-nodes is doing", that's an implementation detail that should not be in the README file... That said, the README actually has an example on how to create your own pl-delete-nodes for your custom reference design.

    I'm also not sure meta-adi is such a big project that needs more dedicated documentation for details like this (and for sure I do not want to do the work Xilinx already does regarding petalinux documentation). If someone is interested in the internals, well, for now he has to go through the code. I try, at least, to comment things (even if they are not too helpful).

     I know this is asking lot to detail how to do this all in the GitHub readme file or wiki page but it would be quite helpful to users of your FMC cards to detail the whole process of building a Petalinux based design. I do find the Analog Devices wiki documents for building a traditional version of Linux and base HDL design are easy to understand and use.  

    Ok, this kind of states my previous comments...

    Well, honestly, I'm not too sure for now on how the README can be improved and there's not much complain about it... Unless I see a lot more people complaining about it, I'm not planning to add much detail rather than fixing some of the stuff you pointed out. That said, I'm happy to review Pull Requests on it if you have something better on your mind.

    - Nuno Sá

  • Hi Nuno Sa,

    • Thanks for your response to my questions regarding the readme in meta-adi. I hope you will update it so it is correct. As far as the doing custom DTS in the readme document I understand what you are saying. It is more of an issue of being able to understand Petalinux and the Xilinx provided documentations for it. Not sure if there is a given Xilinx document that could be point to in the readme that provided better detail on building custom DTS.
    • jay