OpenAMP Quick Try - 2025.1 English - UG1186

Libmetal and OpenAMP User Guide (UG1186)

Document ID
UG1186
Release Date
2025-05-29
Version
2025.1 English

Use the following basic steps to boot Linux and run an OpenAMP application using pre-built images.

The supported boards are KRIA SOM and VEK280.

References:

Table 1. OpenAMP EDF Board Reference Table
SoC YAML_NAME MACHINE_NAME Artifactory Link
KRIA SOM ../sources/meta-openamp/vendor/xilinx/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/overlays/openamp-overlay-zynqmp.yaml K26

Index of /sswreleases

for 2025.1

VEK280 ../sources/meta-openamp/vendor/xilinx/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/overlays/openamp-overlay-versal.yaml versal-vek280-sdt-seg-ospi Index of /sswreleases for 2025.1
  1. Generate the Yocto project:
    mkdir yocto
    curl https://storage.googleapis.com/git-repo-downloads/repo > repo
    chmod a+x repo  
     ./repo init -u https://github.com/Xilinx/yocto-manifests.git -b 2025.1 -m default-edf.xml
    ./repo sync 
    source edf-init-build-env
  2. Gen-Machineconf run:
    <yocto project>/build$ # Current directory after previous step
     
    export ARTIFACTORY_LINK=...
    export MACHINE_NAME=...
    export YAML_NAME=...
     
    gen-machineconf parse-sdt $ARTIFACTORY_LINK \
      -c conf -l conf/sdt-autogen.conf -g full --machine-name $MACHINE_NAME \
      --add-config CONFIG_YOCTO_BBMC_CORTEXR5_0_FREERTOS=y \
      --add-config CONFIG_YOCTO_BBMC_CORTEXR5_1_BAREMETAL=y \
      --domain-file $YAML_NAME
  3. Add the required packages. Enable OpenAMP related packages by appending the following to the conf/local.conf:
    IMAGE_INSTALL:append = " packagegroup-openamp-fw-examples packagegroup-openamp "
  4. Build the Yocto project:
    MACHINE=$MACHINE_NAME bitbake core-image-minimal
  5. Go to the U-Boot prompt and boot Linux from the SD card:
    ZynqMP> mmcinfo && fatload mmc 0 0x10000000 image.ub && fatload mmc 0 0x14000000 openamp.dtb
    
    Device: mmc@ff170000
    
    Manufacturer ID: 3
    
    OEM: 5344
    
    Name: SL16G
    
    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
    Note: 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. Next, type petalinux-boot --jtag --prebuilt 3.

  6. Run the echo-test demo.
    
    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.
    
    Starting application...
    
    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 (UG1144).