01-10-2020 09:46 AM
What is the recommended way to support multiple target boards in petalinux? We have a multiple versions of a design we want to support. It appears in vanilla Yocto you can simply specify the board with the MACHINE variable; however, in petalinux this seems to be set by petalinux itself (that is, it's set in the build/conf/plnxtool.conf directory). Our boards have differing device trees, but we want to use the same image recipe for both, if possible.
08-14-2020 06:21 PM
You can set the machine name with petalinux-config; however, I think the bigger issue may be multiple device trees. I haven't done this but I think you could also use the fpga-manger and device-tree overlays. This provides support for loading new bitstreams AND device-trees from linux.
08-17-2020 05:15 AM
As @jrhtech said, the main issue is the DT. You kernel can be unified with all the drivers needed. With DT overlays, you are disabling the PL dtsi, and then depending on your design you would overlay a specific dto. However, this assumes that your only differences are in the PL?
You can also just provide a DTSI for each iteration of your design, and specify this in petalinux-config -> DTG Settings -> (your design) MACHINE_NAME
This can be passed to petalinux as a patch.
Add your DTSI files here:
To create the patch
Copy the patch to project-spec/meta-user/recipes-bsp/device-tree/files and update the device-tree.bbappend as follows:
For testing your DTSI files:
08-20-2020 09:36 AM
Thank you stephenm for your suggestions.
I think a solution like this provides a good starting point for our design. I had a few questions.
Q: Is there any way to have the MACHINE_NAME chosen ('machine_name_1', 'machine_name_2', ...) in 'petalinux-config' control if the patch is applied, or have it select between different system-user.dtsi files? Could we use a generic/shared system-user.dtsi file which includes a .dtsi file (machine_name_1.dtsi, machine_name_2.dtsi, ...) selected based on the configured MACHINE_NAME?
Q: Is it possible to have the 'CONFIG_xxx' settings of project-spec/configs/config be overridden by environmental variables or some other means to modify them during build time?
Q: Is it possible to have a non-GUI driven 'petalinux-config --get-hw-description'? We are trying to automate the PL build sequence when we have new designs (hdf files).
02-16-2021 07:18 AM
Hi Steve - I was curious if you can share whether this worked out for you? Do you have any advice from experience on this topic. My company is in the same situation where we support many different boards with many using the same Xilinx Zynq SOC and we also have other boards now designed with Xilinx UltraScale+. We are trying to architect the build system to share as much as the "common" stuff as possible. When Xilinx moved to YOCTO, it sounded like all of this would now be possible...but we have been struggling to find the right way to organize things to integrate the differences between boards at build time (recipe overlays and such). I really think Xilinx needs to offer a tech write up for this situation. They apparently feel that all customers only build 1 board configuration. YOCTO is a pretty sophisticated build system and it would be nice if Xilinx would offer some guidance as to what the expected approach should be for this situation. Until such time Xilinx can offer this information, I have to resort to trolling the forums to see if anyone else has had the same trials and tribulations we have had. Looks like you were in the same boat. Were you ever able to achieve the goal of multiple boards under 1 build system? Were there any epiphanies that you would be willing to share to make this all work? Was the guidance suggested above the way you achieved your goal or did you need to find your own path? Thank you for any information you would be willing to share! -Dan
02-16-2021 08:27 AM
Steve, I think I can answer your third question:
Add `--silentconfig` to your petalinux-config invocation. When I update HDFs I use this command line:
`rm -r <project-dir>/components/ && petalinux-config --get-hw-description <new-hdf-dir> --silentconfig && petalinux-build -c device-tree -x cleansstate && petalinux-build -c all`
I find that the components directory needs to be removed if there are dtsi changes, and for some reason the device-tree recipe doesn't always detect changes. The `all` recipe is a convenience one that brings in the top level targets we need
02-17-2021 02:40 PM - edited 02-17-2021 03:19 PM
You can use yocto flow to build petalinux image using https://github.com/Xilinx/yocto-manifests
And bitbake can build multiple machines at the same time.