meta-enea-bsp-arm
===================================================================

This layer contains Enea  BSP customizations for ARM architecures.

Dependencies
============

This layer depends on:

  URI: git://git.enea.com/linux/meta-enea-bsp-common
  branch: pyro
  revision: HEAD

  URI: https://github.com/Freescale/meta-freescale
  branch: pyro
  revision: HEAD

  URI: https://github.com/Xilinx/meta-xilinx
  branch: thud
  revision: HEAD

Source code
===========

git://git.enea.com/linux/meta-enea-bsp-arm.git


Patches
=======

Please submit any patches against the enea-bsp-arm layer to the
following mailing list: linux@lists.enea.com

Maintainers:
Adrian Dudau <adrian.dudau@enea.com>
Martin Borg <martin.borg@enea.com>


Table
=================

  I. Adding the enea-bsp-arm layer to your build
 II. Misc


I. Adding the enea-bsp-arm layer to your build
=================================================

In order to use this layer, you need to make the build system aware of
it.

Assuming the enea-bsp-arm layer exists at the top-level of your
yocto build tree, you can add it to the build system by adding the
location of the enea-bsp-arm layer to bblayers.conf, along with any
other layers needed. This is dependent on the Yocto machine you
need to build for:

  -------------------------------------------
Raspberry Pi 3
  local.conf
  MACHINE = "raspberrypi3-64"

  bblayers.conf
  BBLAYERS ?= " \
      /path/to/yocto/meta \
      /path/to/yocto/meta-poky \
      /path/to/yocto/meta-enea-bsp-common \
      /path/to/yocto/meta-raspberrypi \
      "

Zynq UltraScale+ MPSoC
  local.conf
  MACHINE = "zcu102-zynqmp"

  bblayers.conf
  BBLAYERS ?= " \
      /path/to/yocto/meta \
      /path/to/yocto/meta-poky \
      /path/to/yocto/meta-enea-bsp-common \
      /path/to/yocto/meta-xilinx/meta-xilinx-bsp \
      "

 -------------------------------------------

II. Misc
========

R5 management for Zynq UltraScale+ MPSoC
----------------------------------------
The bsp provides the necessary kernel configuration and builtin modules
required for R5 cores management (for more information see
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/118358017/OpenAMP+2019.1).
The following file can be downloaded and used for demo purpose:
http://linux.enea.com/EneaLinux8.0/Xilinx-utils/r5-test.tar.bz2

Below is an example of managing an R5 core using the sysfs interface

root@zcu102-zynqmp:~# cd /sys/class/remoteproc/
root@zcu102-zynqmp:/sys/class/remoteproc# ls -al
drwxr-xr-x    2 root     root             0 Jul  5 14:40 .
drwxr-xr-x   59 root     root             0 Jul  5 14:40 ..
lrwxrwxrwx    1 root     root             0 Jul  5 14:40 remoteproc0 -> ../../devices/platform/amba/ff9a0100.zynqmp_r5_rproc/remoteproc/remoteproc0
lrwxrwxrwx    1 root     root             0 Jul  5 14:40 remoteproc1 -> ../../devices/platform/amba/ff9a0200.zynqmp_r5_rproc/remoteproc/remoteproc1
root@zcu102-zynqmp:/sys/class/remoteproc# cd remoteproc0
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# ls -al
drwxr-xr-x    3 root     root             0 Jul  5 14:40 .
drwxr-xr-x    3 root     root             0 Jul  5 14:40 ..
lrwxrwxrwx    1 root     root             0 Jul 24 19:54 device -> ../../../ff9a0100.zynqmp_r5_rproc
-rw-r--r--    1 root     root          4096 Jul 24 19:54 firmware
drwxr-xr-x    2 root     root             0 Jul 24 19:54 power
-rw-r--r--    1 root     root          4096 Jul 24 19:54 state
lrwxrwxrwx    1 root     root             0 Jul  5 14:40 subsystem -> ../../../../../../class/remoteproc
-rw-r--r--    1 root     root          4096 Jul  5 14:40 uevent
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# cat state
offline
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# echo zeda.elf > firmware
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# echo start > state
[  147.872230] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc
[  147.882575] remoteproc remoteproc0: Booting fw image zeda.elf, size 869820
[  147.890271] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU boot from
TCM.
Starting application...
                       Initialize remoteproc successfully.
creating remot[e 1o7.898t54
virtioirptiglbzi vg tios: spmsgdhout es pnoln
nitializing rpmsg vdev
initializing rpmsg vdev
Initializating I/Os redirection...
                                  Failed to intialize rpmsg rpc
                                                               Stopping
application...
                                                                                      [
147.922008] remoteproc remoteproc0: registered virtio0 (type 7)
[  147.927935] remoteproc remoteproc0: remote processor
ff9a0100.zynqmp_r5_rproc is now up
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# cat state
running
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# echo stop > state
[  166.982192] remoteproc remoteproc0: stopped remote processor
ff9a0100.zynqmp_r5_rproc
root@zcu102-zynqmp:/sys/class/remoteproc/remoteproc0# cat state
offline
