Skip to content
Arnaud Pouliquen edited this page Feb 3, 2022 · 17 revisions

Table of Contents

What is OpenAMP System Reference / End-to-end example ?

This working group aims to put together end-to-end system reference material showcasing all the different aspects of OpenAMP, on multiple vendor platforms.

Communications

  • To sign up for the mailing list and to see the archives, visit this page
  • Meetings: Small group who is working on the project is meeting meeting weekly on Wednesday during Aug-Oct 2021 & then will decide on frequency.

Repository

GitHub repository openamp-system-reference

Documentation

WIP documentation folder on Google Drive (Note: Google doc access is currently restricted to working group members. Will publish documents once they are sufficiently ready)

Milestones

Echo test

ST Echo Test Example

Intruction to install the yocto environement, build and load an image, run the echo exemple is available here: https://github.com/arnopo/oe-manifest/blob/OpenAMP/README.md

For more information and help on the stm32mp15 platform and environment, please refer to stm32mpu wiki.

Xilinx Echo Test Example

WIP document (Note: Google doc access is currently restricted to working group members. To publish once it is sufficiently ready)

Multi RPMSG services demo

STM32MP157C/F-DK2 board

Based on:

Prerequisite

TBC

Installation

Create the structure of the project

mkdir stm32mp15-demo
cd stm32mp15-demo
mkdir zephy_distrib
mkdir stm32mp1_distrib_oss
At this step you should see following folder hierarchy:
stm32mp15-demo
    |___ stm32mp1_distrib_oss
    |___ zephy_distrib

Generate the stm32mp15 image

Install stm32mp1_distrib_oss dunfell

From the 'stm32mp15-demo' directory

cd stm32mp1_distrib_oss

mkdir -p layers/meta-st
git clone https://github.com/openembedded/openembedded-core.git layers/openembedded-core
cd layers/openembedded-core
git checkout -b WORKING origin/dunfell
cd -

git clone https://github.com/openembedded/bitbake.git layers/openembedded-core/bitbake
cd layers/openembedded-core/bitbake
git checkout -b WORKING  origin/1.46
cd -

git clone git://github.com/openembedded/meta-openembedded.git layers/meta-openembedded
cd layers/meta-openembedded
git checkout -b WORKING origin/dunfell
cd -

git clone https://github.com/arnopo/meta-st-stm32mp-oss.git layers/meta-st/meta-st-stm32mp-oss
cd layers/meta-st/meta-st-stm32mp-oss
git checkout -b WORKING origin/dunfell
cd -
Initialize the OpenEmbedded build environment

The OpenEmbedded environment setup script must be run once in each new working terminal in which you use the BitBake or devtool tools (see later) from 'stm32mp15-demo/stm32mp1_distrib_oss' directory:

 source ./layers/openembedded-core/oe-init-build-env build-stm32mp15-disco-oss

 bitbake-layers add-layer ../layers/meta-openembedded/meta-oe
 bitbake-layers add-layer ../layers/meta-openembedded/meta-perl
 bitbake-layers add-layer ../layers/meta-openembedded/meta-python
 bitbake-layers add-layer ../layers/meta-st/meta-st-stm32mp-oss

 echo "MACHINE = \"stm32mp15-disco-oss\"" >> conf/local.conf
 echo "DISTRO = \"nodistro\"" >> conf/local.conf
 echo "PACKAGE_CLASSES = \"package_deb\" " >> conf/local.conf
Build stm32mp1_distrib_oss image

From 'stm32mp15-demo/stm32mp1_distrib_oss/build-stm32mp15-disco-oss/' directory

 bitbake core-image-base
Note that:
  • to build around 30 GB is needed
  • building the distribution can take more than 2 hours depending on performance of the PC.
Flash stm32mp1_distrib_oss

From 'stm32mp15-demo/stm32mp1_distrib_oss/build-stm32mp15-disco-oss/' directory,populate your microSD card inserted on your HOST PC using command:

 cd tmp-glibc/deploy/images/stm32mp15-disco-oss/
 # flash wic image on your sdcar. replace <device> by mmcblk<X> (X = 0,1..) or sd<Y> ( Y = b,c,d,..) depending on the connection 
 dd if=core-image-base-stm32mp15-disco-oss.wic of=/dev/<device> bs=8M conv=fdatasync

Generate the Zephyr firmware image

Install meta-zephyr Honister version

From 'stm32mp15-demo' directory

cd zephy_distrib

git clone https://github.com/openembedded/openembedded-core.git layers/openembedded-core
cd layers/openembedded-core
git checkout -b WORKING origin/honister
cd -

git clone https://github.com/openembedded/bitbake.git layers/openembedded-core/bitbake
cd layers/openembedded-core/bitbake
git checkout -b WORKING  origin/1.46
cd -

git clone git://github.com/openembedded/meta-openembedded.git layers/meta-openembedded
cd layers/meta-openembedded
git checkout -b WORKING origin/honister
cd -

git clone https://github.com/arnopo/meta-zephyr.git layers/meta-zephyr
cd layers/meta-zephyr
git checkout -b WORKING origin/OpenAMP_demo
cd -
Initialize the OpenEmbedded build environment

The OpenEmbedded environment setup script must be run once in each new working terminal in which you use the BitBake or devtool tools (see later) from the 'stm32mp15-demo/zephy_distrib' directory:

MACHINE="stm32mp157c-dk2" DISTRO="zephyr" source layers/openembedded-core/oe-init-build-env build-zephyr
bitbake-layers add-layer ../layers/meta-openembedded/meta-oe/
bitbake-layers add-layer ../layers/meta-openembedded/meta-python/
bitbake-layers add-layer ../layers/meta-zephyr/
Build the Zephyr image

For instance to build the zephyr-openamp-rsc-table example which answers to the Linux rpmsg sample client example: From the 'stm32mp15-demo/zephy_distrib/build-zephyr' directory:

MACHINE="stm32mp157c-dk2" DISTRO="zephyr" bitbake zephyr-openamp-rsc-table
Note that:
  • to build around 30 GB is needed
  • building the distribution can take 1 or 2 hours depending on performance of the PC.
Install the Zephyr binary on the sdcard

The Zephyr sample binary is available in the sub-folder of build directory stm32mp15-demo/zephy_distrib/build-zephyr/tmp-newlib/deploy/images/stm32mp157c-dk2/'. It needs to be installed on the "rootfs" partition of the sdcard

sudo cp tmp-newlib/deploy/images/stm32mp157c-dk2/zephyr-openamp-rsc-table.elf <mount point>/rootfs/lib/firmware/
Don't forget to properly unoumt the sdcard partitions.

Future work

Efforts

  • Baremetal-baremetal
  • RTOS-RTOS

High level plan for Xilinx Software Stack

  • QEMU & initial doc – Mid Sept.
  • Userspace & kernel space demos – Sept end
  • Hardware demo – End - Oct.
  • System-dt flow (Without using Xilinx tools) – End-Nov
  • Advanced app – End-Jan
  • Completely upstream flow – (Based on When Xilinx driver is merged in upstream kernel)