Use the following steps to execute OpenAMP:
To boot prebuilt Linux for AMD Versal™ adaptive SoC, follow these steps:
- Generate BOOT.BIN for Versal
adaptive
SoC.
petalinux-package --boot --plm pre-built/linux/images/plm.elf --psmfw pre-built/linux/images/psmfw.elf --dtb pre-built/linux/images/openamp.dtb --u-boot -o pre-built/linux/images/BOOT.BIN --force.
- Boot
Linux
petalinux-boot --jtag --prebuilt 3 --hw_server-url <hostname:3121>
To boot prebuilt Linux for AMD Zynq™ UltraScale+™ MPSoC, follow these steps:
cd <plnx-proj-root>
cp pre-built/linux/images/openamp.dtb pre-built/linux/images/system.dtb
petalinux-boot --jtag --prebuilt 3 --hw_server-url <hostname:3121>
Once Linux is booted, run the following commands for Versal devices only:
-
modprobe virtio_rpmsg_bus
-
modprobe zynqmp_r5_remoteproc
To load OpenAMP firmware and run OpenAMP test application, run the following command:
echo <echo_test_firmware> > /sys/class/remoteproc/remoteproc0/firmware
For example, to load image_echo_test, run:
echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/state
echo_test
echo stop > /sys/class/remoteproc/remoteproc0/state
To stop running, run
the following
command:echo stop > /sys/class/remoteproc/remoteproc0/state
For more examples, see Libmetal and OpenAMP for Zynq Devices User Guide (UG1186).