Skip to content

Commit

Permalink
Update OpenAmp Middleware to MP1 Cube version 1.5.0
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Bourdiol <[email protected]>
  • Loading branch information
ABOSTM committed Dec 2, 2021
1 parent 9e5abd3 commit 8ae7805
Show file tree
Hide file tree
Showing 363 changed files with 25,819 additions and 4,380 deletions.
23 changes: 23 additions & 0 deletions system/Middlewares/OpenAMP/libmetal/.checkpatch.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--emacs
--no-tree
--summary-file
--show-types
--max-line-length=80
--min-conf-desc-length=1

--ignore BRACES
--ignore PRINTK_WITHOUT_KERN_LEVEL
--ignore SPLIT_STRING
--ignore VOLATILE
--ignore CONFIG_EXPERIMENTAL
--ignore AVOID_EXTERNS
--ignore NETWORKING_BLOCK_COMMENT_STYLE
--ignore DATE_TIME
--ignore MINMAX
--ignore CONST_STRUCT
--ignore FILE_PATH_CHANGES
--ignore BIT_MACRO
--ignore PREFER_KERNEL_TYPES
--ignore NEW_TYPEDEFS
--ignore ARRAY_SIZE
--ignore MACRO_ARG_REUSE
99 changes: 99 additions & 0 deletions system/Middlewares/OpenAMP/libmetal/.gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# All these sections are optional, edit this file as you like.
[general]
# Ignore certain rules, you can reference them by their id or by their full name
ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B1, B3

# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
verbosity = 3

# By default gitlint will ignore merge commits. Set to 'false' to disable.
ignore-merge-commits=true

# By default gitlint will ignore fixup commits. Set to 'false' to disable.
# ignore-fixup-commits=false

# By default gitlint will ignore squash commits. Set to 'false' to disable.
# ignore-squash-commits=true

# Ignore any data send to gitlint via stdin
# ignore-stdin=true

# Enable debug mode (prints more output). Disabled by default.
debug=true

# Enable community contributed rules
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
# contrib=contrib-title-conventional-commits,CC1

# Set the extra-path where gitlint will search for user defined rules
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
extra-path=scripts/gitlint

[title-max-length]
line-length=75

[body-min-line-count]
min-line-count=1

[body-max-line-count]
max-line-count=200

[title-must-not-contain-word]
# Comma-separated list of words that should not occur in the title. Matching is case
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
# will not cause a violation, but "WIP: my title" will.
words=wip

# [title-match-regex]
# python like regex (https://docs.python.org/2/library/re.html) that the
# commit-msg title must be matched to.
# Note that the regex can contradict with other rules if not used correctly
# (e.g. title-must-not-contain-word).
# regex=^US[0-9]*

[body-max-line-length]
# B1 = body-max-line-length
line-length=80

[body-min-length]
min-length=3

[body-is-missing]
# Whether to ignore this rule on merge commits (which typically only have a title)
# default = True
ignore-merge-commits=false

# [body-changed-file-mention]
# List of files that need to be explicitly mentioned in the body when they are changed
# This is useful for when developers often erroneously edit certain files or git submodules.
# By specifying this rule, developers can only change the file when they explicitly reference
# it in the commit message.
# files=gitlint/rules.py,README.md

# [author-valid-email]
# python like regex (https://docs.python.org/2/library/re.html) that the
# commit author email address should be matched to
# For example, use the following regex if you only want to allow email addresses from foo.com
# regex=[^@][email protected]

# [ignore-by-title]
# Ignore certain rules for commits of which the title matches a regex
# E.g. Match commit titles that start with "Release"
# regex=^Release(.*)
#
# Ignore certain rules, you can reference them by their id or by their full name
# Use 'all' to ignore all rules
# ignore=T1,body-min-length

# [ignore-by-body]
# Ignore certain rules for commits of which the body has a line that matches a regex
# E.g. Match bodies that have a line that that contain "release"
# regex=(.*)release(.*)
#
# Ignore certain rules, you can reference them by their id or by their full name
# Use 'all' to ignore all rules
# ignore=T1,body-min-length

# [contrib-title-conventional-commits]
# Specify allowed commit types. For details see: https://www.conventionalcommits.org/
# types = bugfix,user-story,epic
101 changes: 0 additions & 101 deletions system/Middlewares/OpenAMP/libmetal/.travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion system/Middlewares/OpenAMP/libmetal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
cmake_minimum_required (VERSION 2.6)
cmake_minimum_required (VERSION 3.0.2)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()

if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()

list (APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
Expand Down
9 changes: 5 additions & 4 deletions system/Middlewares/OpenAMP/libmetal/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ consult when they have a question about OpenAMP and to provide a a set of
names to be CC'd when submitting a patch.

## Project Administration
Wendy Liang <[email protected]>
Ed Mooring <[email protected]>
Arnaud Pouliquen <[email protected]>

### All patches CC here
[email protected]
[email protected]

## Machines
### Xilinx Platform - Zynq-7000
Wendy Liang <[email protected]>
Ed Mooring <[email protected]>

### Xilinx Platform - Zynq UltraScale+ MPSoC
Wendy Liang <[email protected]>
Ed Mooring <[email protected]>
83 changes: 82 additions & 1 deletion system/Middlewares/OpenAMP/libmetal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ and request memory across the following operating environments:
* RTOS (with and without virtual memory)
* Bare-metal environments

## Project configuration
The configuration phase begins when the user invokes CMake. CMake begins by processing the CMakeLists.txt file and the cmake directory.
Some cmake options are available to help user to customize the libmetal to their
own project.

* **WITH_DOC** (default ON): Build with documentation. Add -DWITH_DOC=OFF in
cmake command line to disable.
* **WITH_EXAMPLES** (default ON): Build with application exemples. Add
-DWITH_DOC=OFF in cmake command line to disable the option.
* **WITH_TESTS** (default ON): Build with application tests. Add -DWITH_DOC=OFF
in cmake command line to disable the option.
* **WITH_DEFAULT_LOGGER** (default ON): Build with default trace logger. Add
-DWITH_DEFAULT_LOGGER=OFF in cmake command line to disable the option.
* **WITH_SHARED_LIB** (default ON): Generate a shared library. Add
-DWITH_SHARED_LIB=OFF in cmake command line to disable the option.
* **WITH_STATIC_LIB** (default ON): Generate a static library. Add
-DWITH_STATIC_LIB=OFF in cmake command line to disable the option.
* **WITH_ZEPHYR** (default OFF): Build for Zephyr environment. Add
-DWITH_ZEPHYR=ON in cmake command line to enable the the option.

## Build Steps

### Building for Linux Host
Expand Down Expand Up @@ -51,8 +71,18 @@ example toolchain file:
$ cmake <libmetal_source> -DCMAKE_TOOLCHAIN_FILE=<toolchain_file>
$ make VERBOSE=1 DESTDIR=<libmetal_install> install
```
* Note: When building baremetal for Xilinx 2018.3 or earlier environments,
add -DXILINX_PRE_V2019 to your CMake invocation. This will include the
xilmem and xilstandalone libraries in your build. These libraries were
removed in 2019.1.

### Building for Zephyr
The [zephyr-libmetal](https://github.com/zephyrproject-rtos/libmetal)
implements the libmetal for the Zephyr project. It is mainly a fork of this repository, with some add-ons for integration in the Zephyr project.

Following instruction is only to be able to run test application on a QEMU running
a Zephyr environment.

As Zephyr uses CMake, we build libmetal library and test application as
targets of Zephyr CMake project. Here is how to build libmetal for Zephyr:
```
Expand Down Expand Up @@ -105,7 +135,8 @@ The following utilities are provided in lib/utilities.h:

#### Version

The libmetal version interface allows user to get the version of the library.
The libmetal version interface allows user to get the version of the library. The version increment
follows the set of rule proposed in [Semantic Versioning specification](https://semver.org/).

### Top Level Interfaces

Expand All @@ -124,6 +155,11 @@ implementation for metal_sys_init and metal_sys_finish.
For Linux userspace, metal_sys_init sets up a table for available shared pages,
checks whether UIO/VFIO drivers are avail, and starts interrupt handling
thread.
Please note that on Linux, to access device's memory that is not page
aligned, an offset has to be added to the pointer returned by
mmap(). This `offset`, although it can be read from the device tree
property exposed by the uio driver, is not handled yet by the
library.

For bare-metal, metal_sys_init and metal_sys_finish just returns.

Expand Down Expand Up @@ -218,3 +254,48 @@ libmetal sleep APIs provide getting delay execution implementation.
This API is for compiler dependent functions. For this release, there is only
a GCC implementation, and compiler specific code is limited to atomic
operations.

## How to contribute:
As an open-source project, we welcome and encourage the community to submit patches directly to the project. As a contributor you should be familiar with common developer tools such as Git and CMake, and platforms such as GitHub.
Then following points should be rescpected to facilitate the review process.

### Licencing
Code is contributed to OpenAMP under a number of licenses, but all code must be compatible with version the [BSD License](https://github.com/OpenAMP/libmetal/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:

```
SPDX-License-Identifier: BSD-3-Clause
```
### Signed-off-by
Commit message must contain Signed-off-by: line and your email must match the change authorship information. Make sure your .gitconfig is set up correctly:

```
git config --global user.name "first-name Last-Namer"
git config --global user.email "[email protected]"
```
### gitlint
Before you submit a pull request to the project, verify your commit messages meet the requirements. The check can be performed locally using the the gitlint command.

Run gitlint locally in your tree and branch where your patches have been committed:

```gitlint```
Note, gitlint only checks HEAD (the most recent commit), so you should run it after each commit, or use the --commits option to specify a commit range covering all the development patches to be submitted.

### Code style
In general, follow the Linux kernel coding style, with the following exceptions:

* Use /** */ for doxygen comments that need to appear in the documentation.

The Linux kernel GPL-licensed tool checkpatch is used to check coding style conformity.Checkpatch is available in the scripts directory.

To check your \<n\> commits in your git branch:
```
./scripts/checkpatch.pl --strict -g HEAD-<n>
```
### Send a pull request
We use standard github mechanism for pull request. Please refer to github documentation for help.

## Communication and Collaboration
[Subscribe](https://lists.openampproject.org/mailman/listinfo/openamp-rp) to the OpenAMP mailing list([email protected]).

For more details on the framework please refer to the the [OpenAMP wiki](https://github.com/OpenAMP/open-amp/wiki).
3 changes: 3 additions & 0 deletions system/Middlewares/OpenAMP/libmetal/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_PATCH = 0
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ find_library (HUGETLBFS_LIBRARY NAMES ${HUGETLBFS_NAMES})
# handle the QUIETLY and REQUIRED arguments and set HUGETLBFS_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS (HUGETLBFS DEFAULT_MSG HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS (HugeTLBFS DEFAULT_MSG HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)

if (HUGETLBFS_FOUND)
set (HUGETLBFS_LIBRARIES ${HUGETLBFS_LIBRARY})
Expand Down
Loading

0 comments on commit 8ae7805

Please sign in to comment.