Use the following basic steps to boot Linux and run an OpenAMP application using pre-built images. The following steps apply to the ZCU102 board.
If the target hardware platform is Versal, please refer to http://wiki.xilinx.com/openamp for information on supported hardware configurations and Versal-specific information for running the RPMsg demo in Kernel space on the Versal platform.
The echo-test application sends packets from Linux running on quad-core Cortex-A53 to a single Cortex-R5 running FreeRTOS, which sends them back.
1. Extract files BOOT.BIN , image.ub , and openamp.dtb files from a pre-built PetaLinux BSP tarball to an SD card. Note that the OpenAMP related device nodes are not in the default system.dtb, but are included in the prebuilt openamp.dtb.
host shell$ tar xvf xilinx-zcu102-v2019.2-final.bsp --strip-components=4 --wildcards */BOOT.BIN */image.ub */openamp.dtb
host shell$ cp BOOT.BIN image.ub openamp.dtb <your sd card>
Note: Alternatively, if you already created a PetaLinux project with a provided BSP for your board, you can find pre-built images in the <your project>/pre-built/linux/images/ directory.
2. Go to u-boot prompt and boot Linux from the SD card:
ZynqMP> mmcinfo && fatload mmc 0 0x10000000 image.ub && fatload mmc 0 0x14000000 openamp.dtb
Manufacturer ID: 3
Bus Speed: 100000000
Mode: UHS SDR50 (100MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
57212600 bytes read in 3718 ms (14.7 MiB/s)
40961 bytes read in 26 ms (1.5 MiB/s)
ZynqMP> bootm 0x10000000 0x10000000 0x14000000
As an alternative to all steps above to SD boot, you can JTAG boot the board. For this you need to have connected a JTAG cable, installed JTAG drivers, and created a PetaLinux project using a provided BSP.
To do this, you must go in the <your project>/pre-built/linux/images directory and replace the system.dtb file by openamp.dtb , then type petalinux-boot --jtag --prebuilt 3 .
3. At the Linux login prompt, type root for user and root for password, and then run the echo-test demo.
plnx_aarch64 login: root
root@plnx_aarch64:~# echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
root@plnx_aarch64:~# echo start > /sys/class/remoteproc/remoteproc0/state
[ 265.772355] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc
[ 265.779900] remoteproc remoteproc0: Booting fw image echotest_standalone_r5_0.elf, size 719860
[ 265.790005] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU boot from TCM.
Initialize remoteproc successfully.
creating remoteproc virtio
initializing rpmsg shared buffer pool
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
Successfully created rpmsg endpoint.
[ 265.797738] remoteproc remoteproc0: registered virtio0 (type 7)
[ 265.800388] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 265.830254] remoteproc remoteproc0: remote processor ff9a0100.zynqmp_r5_rproc is now up
[ 265.838381] virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x0
root@xilinx-zcu102-2019_1:/lib/firmware# echo_test -d virtio0.rpmsg-openamp-demo-channel.-1.0
Echo test start
Open rpmsg dev /dev/rpmsg0!
Echo Test Round 0
Note: This rpmsg device driver is an out-of-tree Linux kernel module. It can be loaded at boot time if you write a start-up init script (See examples in PetaLinux Tools Documentation: Reference Guide [Ref 5] .