10-19-2020 12:35 PM
I am trying to build a PetaLinux BOOT.bin file with a Bare Metal Hello World application residing on the R5. I have successfully built the PetaLinux and run it on its own. I have also built the Hello World Bare Metal on the R5 and run on its own (using the A53 FSBL).
Now I would like to package the two together and run them simultaneously.
I am not correctly understanding the BIF files and how to package everything correctly. I have tried the petalinux-package commands to include the BIF file of the Hello World application and it does not work either.
To get the relevant PetaLinux files generated:
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force
This gives me the following:
I am now trying to use the "Create Boot Image" in Vitis to try to package the BOOT.bin file the same way as how petalinux does it. I have gotten a few steps correct but I am having issues loading the "BL31: Non Secure Code at 0x0" the 0x0 address should be 0x10080000 and I don't know how to change this.
The attached PMUFW v1.1 Line 8 shows the output of PetaLinux with a working BOOT.BIN file. I am trying to recreate this and on line 5 it shows BL31: Non Secure Code at 0x0.
Any suggestions for getting both PetaLinux running on the A53's and Bare Metal on the R5's.
10-23-2020 10:14 AM
Building PetaLinux to run on A53s and package R5 ELF application to run Bare Metal Hello World simultaneously on the Xilinx ZCU106.
The above task I have been able to make some progress on, however, the latest issue is a kernel panic that is issued after u-boot finishes. I believe it is because the device tree entries are wrong.
I followed the following:
I skipped the following first three sections because they are not applicable in our use case:
Quick try for ZCU102 with Xilinx Pre-Built Binaries
OpenAMP on Versal
LibMetal on Versal
LibMetal IPC on Versal
I picked up at the following title of the document above (half way down the page content):
Linux Master running on APU with RPMsg in kernel space and 2 RPU slaves
This setup is as close to our ideal use case. I copy and paste the device tree entries to the file:
In other Xilinx documents, they specify that the bootargs need both “maxcpus=1 and clk_ignore_unused”
I have set both of these in the system-user.dtsi bootargs line and I don’t see any change.
The binary file for the R5 that I am building is set to have the FSBL run on the R5 and then launch the PetaLinux and R5 application. The Hello World program runs and once the A53s get past the U-boot section the Kernel has a Kernel panic and fails.
I have to create a BIF file and merge the PetaLinux default with the R5 Hello World application default and pass the file to petalinux using the --bif switch. Without this, the petalinux-configure command does not package the ELF or the FSBL to run on the R5. Even when specifying the --cpu argument to use r5-0, it does not work properly. When I package things with the manual bif file then I can see both codes running on two different UARTs and see both the R5 running Hello World and the A53 attempt to boot PetaLinux.
Now, the end result is to be able to use libmetal and/or openamp and/or shared memory to have multiple applications running on the linux petalinux system on the a53s and an app or apps either bare metal, FreeRTOS, or openamp running on the r5-0 and r5-1 chips.
For the R5 I used a similar build configuration as what is in here:
Instead of running the performance monitor I am running the bare metal hello world sample app.
Now, I get past the last error and make it past U-boot. However, now the ZCU106 seems to be failing in the device tree configuration.
Please advise on anything new that I can try to get past these issues.
The system_with_r5.bif.txt is really a .bif file. I had to rename it to a .txt file to post to the forums.