Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: update open-amp lib to release v2022.10.0 #13

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions open-amp/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,47 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Apache License :2.0
-------------------------

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

GPL 2.0
-------------------------

Copyright (C) yyyy name of author

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


Notes
=========================================
Use the following tag instead of the full license text in the individual files:

SPDX-License-Identifier: BSD-3-Clause
SPDX-License-Identifier: BSD-2-Clause
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: GPL-2.0

This enables machine processing of license information based on the SPDX
License Identifiers that are here available: http://spdx.org/licenses/
Expand Down
44 changes: 15 additions & 29 deletions open-amp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ enable development of software applications for Asymmetric Multiprocessing
environments
3. Compatibility with upstream Linux remoteproc and rpmsg components
4. Following AMP configurations supported
a. Linux master/Generic(Baremetal) remote
b. Generic(Baremetal) master/Linux remote
5. Proxy infrastructure and supplied demos showcase ability of proxy on master
a. Linux host/Generic(Baremetal) remote
b. Generic(Baremetal) host/Linux remote
5. Proxy infrastructure and supplied demos showcase ability of proxy on host
to handle printf, scanf, open, close, read, write calls from Bare metal
based remote contexts.

Expand Down Expand Up @@ -96,32 +96,18 @@ library for it project:
enabled on buffers.
* **RPMSG_BUFFER_SIZE** (default 512): adjust the size of the RPMsg buffers.
The default value of the RPMsg size is compatible with the Linux Kernel hard
coded value. If you AMP configuration is Linux kernel master/ OpenAMP remote,
coded value. If you AMP configuration is Linux kernel host/ OpenAMP remote,
this option must not be used.

### Example to compile OpenAMP for Zephyr
The [Zephyr open-amp repo](https://github.com/zephyrproject-rtos/open-amp)
implements the open-amp library for the Zephyr project. It is mainly a fork of
this repository, with some add-ons for integration in the Zephyr project.
The standard way to compile OpenAMP for a Zephyr project is to use Zephyr build
environment. Please refer to [Zephyr OpenAMP samples](https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/subsys/ipc) for examples.

Nevertheless you can compile the OpenAMP project for Zephyr.
As OpenAMP uses libmetal, please refer to libmetal README to build libmetal
for Zephyr before building OpenAMP library for Zephyr.
As Zephyr uses CMake, we build OpenAMP library as a target of Zephyr CMake
project. Here is how to build libmetal for Zephyr:
```
$ export ZEPHRY_GCC_VARIANT=zephyr
$ export ZEPHRY_SDK_INSTALL_DIR=<where Zephyr SDK is installed>
$ source <git_clone_zephyr_project_source_root>/zephyr-env.sh

$ cmake <OpenAMP_source_root> \
-DWITH_ZEPHYR=on -DBOARD=qemu_cortex_m3 \
-DCMAKE_INCLUDE_PATH="<libmetal_zephyr_build_dir>/lib/include" \
-DCMAKE_LIBRARY_PATH="<libmetal_zephyr_build_dir>/lib" \
$ make VERBOSE=1 all
```
environment. Please refer to
[Zephyr OpenAMP samples](https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc)
for examples and [Zephyr documentation](https://docs.zephyrproject.org/latest/) for the build
process.

### Example to compile OpenAMP for communication between Linux processes:
* Install libsysfs devel and libhugetlbfs devel packages on your Linux host.
Expand Down Expand Up @@ -252,23 +238,23 @@ https://github.com/OpenAMP/meta-openamp
`IMAGE_INSTALL_append` in the `local.conf` file.
* You can also add OpenAMP demos Linux applications packages to your yocto packages list. OpenAMP
demo examples recipes are also in `meta-openamp`:
https://github.com/OpenAMP/meta-openamp/tree/master/recipes-openamp/openamp-examples
https://github.com/OpenAMP/meta-openamp/tree/master/recipes-openamp/rpmsg-examples

In order to user OpenAMP(RPMsg) in Linux userspace, you will need to have put the IPI device,
vring memory and shared buffer memory to your Linux kernel device tree. The device tree example
can be found here:
https://github.com/OpenAMP/open-amp/blob/master/apps/machine/zynqmp/openamp-linux-userspace.dtsi
https://github.com/OpenAMP/open-amp/blob/main/apps/machine/zynqmp/openamp-linux-userspace.dtsi

## Version
The OpenAMP version follows the set of rule proposed in [Semantic Versioning specification](https://semver.org/).

## Supported System and Machines
For now, it supports:
* Zynq generic slave
* Zynq UltraScale+ MPSoC R5 generic slave
* Zynq generic remote
* Zynq UltraScale+ MPSoC R5 generic remote
* Linux host OpenAMP between Linux userspace processes
* Linux userspace OpenAMP RPMsg master
* Linux userspace OpenAMP RPMsg slave
* Linux userspace OpenAMP RPMsg host
* Linux userspace OpenAMP RPMsg remote
* Linux userspace OpenAMP RPMsg and MicroBlaze bare metal remote

## Known Limitations:
Expand All @@ -282,7 +268,7 @@ As an open-source project, we welcome and encourage the community to submit patc
Then following points should be rescpected to facilitate the review process.

### Licencing
Code is contributed to the Linux kernel under a number of licenses, but all code must be compatible with version the [BSD License](https://github.com/OpenAMP/open-amp/blob/master/LICENSE.md), which is the license covering the OpenAMP distribution as a whole. In practice, use the following tag instead of the full license text in the individual files:
Code is contributed to the Linux kernel under a number of licenses, but all code must be compatible with version the [BSD License](https://github.com/OpenAMP/open-amp/blob/main/LICENSE.md), which is the license covering the OpenAMP distribution as a whole. In practice, use the following tag instead of the full license text in the individual files:

```
SPDX-License-Identifier: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion open-amp/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR = 1
VERSION_MINOR = 2
VERSION_MINOR = 3
VERSION_PATCH = 0
9 changes: 5 additions & 4 deletions open-amp/cmake/platforms/cross_generic_gcc.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
set (CMAKE_SYSTEM_NAME "Generic" CACHE STRING "")

include (CMakeForceCompiler)

CMAKE_FORCE_C_COMPILER ("${CROSS_PREFIX}gcc" GNU)
CMAKE_FORCE_CXX_COMPILER ("${CROSS_PREFIX}g++" GNU)
set (CMAKE_C_COMPILER "${CROSS_PREFIX}gcc")
set (CMAKE_CXX_COMPILER "${CROSS_PREFIX}g++")
# _exit is in the BSP rather than in libgcc, leaving this out
# causes errors in try_compile on ARM generic.
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE STRING "")
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER CACHE STRING "")
Expand Down
4 changes: 2 additions & 2 deletions open-amp/docs/apps/echo_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ You will need to manually compile the following kernel modules with your Linux k

#### Linux Userspace Compliation
* Compile `obsolete/apps/echo_test/system/linux/userspace/echo_test` into your Linux OS.
* If you are running generic(baremetal) system as remoteproc slave, and Linux as remoteproc master, please also add the built generic `echo_test` executable to the firmware of your Linux OS.
* If you are running generic(baremetal) system as remoteproc remote, and Linux as remoteproc host, please also add the built generic `echo_test` executable to the firmware of your Linux OS.

## Run the Demo

### Load the Demo
After Linux boots,
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's echo_test binary as firmware argument to the remoteproc module.
* Load the machine remoteproc. If Linux runs as remoteproc host, you will need to pass the other processor's echo_test binary as firmware argument to the remoteproc module.
* If you run the Linux kernel application demo, load the `rpmsg_echo_test_kern_app` module. You will see the kernel application send the message to remote and the remote reply back and the kernel application will verify the result.
* If you run the userspace application demo, load the `rpmsg_user_dev_driver` module.
* If you run the userspace application demo, you will see the similar output on the console:
Expand Down
4 changes: 2 additions & 2 deletions open-amp/docs/apps/matrix_multiply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ You will need to manually compile the following kernel modules with your Linux k

#### Linux Userspace Compliation
* Compile `obsolete/apps/matrix_multiply/system/linux/userspace/mat_mul_demo` into your Linux OS.
* If you are running generic(baremetal) system as remoteproc slave, and Linux as remoteproc master, please also add the built generic `matrix_multiply` executable to the firmware of your Linux OS.
* If you are running generic(baremetal) system as remoteproc remote, and Linux as remoteproc host, please also add the built generic `matrix_multiply` executable to the firmware of your Linux OS.

## Run the Demo

### Load the Demo
After Linux boots,
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's matrix_multiply binary as firmware argument to the remoteproc module.
* Load the machine remoteproc. If Linux runs as remoteproc host, you will need to pass the other processor's matrix_multiply binary as firmware argument to the remoteproc module.
* If you run the Linux kernel application demo, load the `rpmsg_mat_mul_kern_app` module, you will see the kernel app will generate two matrices to the other processor, and output the result matrix returned by the other processor.
* If you run the userspace application demo, load the `rpmsg_user_dev_driver` module.
* If you run the userspace application demo `mat_mul_demo`, you will see the similar output on the console:
Expand Down
Loading