Skip to content

Commit 8ae7805

Browse files
committed
Update OpenAmp Middleware to MP1 Cube version 1.5.0
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent 9e5abd3 commit 8ae7805

File tree

363 files changed

+25819
-4380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+25819
-4380
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--emacs
2+
--no-tree
3+
--summary-file
4+
--show-types
5+
--max-line-length=80
6+
--min-conf-desc-length=1
7+
8+
--ignore BRACES
9+
--ignore PRINTK_WITHOUT_KERN_LEVEL
10+
--ignore SPLIT_STRING
11+
--ignore VOLATILE
12+
--ignore CONFIG_EXPERIMENTAL
13+
--ignore AVOID_EXTERNS
14+
--ignore NETWORKING_BLOCK_COMMENT_STYLE
15+
--ignore DATE_TIME
16+
--ignore MINMAX
17+
--ignore CONST_STRUCT
18+
--ignore FILE_PATH_CHANGES
19+
--ignore BIT_MACRO
20+
--ignore PREFER_KERNEL_TYPES
21+
--ignore NEW_TYPEDEFS
22+
--ignore ARRAY_SIZE
23+
--ignore MACRO_ARG_REUSE
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# All these sections are optional, edit this file as you like.
2+
[general]
3+
# Ignore certain rules, you can reference them by their id or by their full name
4+
ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B1, B3
5+
6+
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
7+
verbosity = 3
8+
9+
# By default gitlint will ignore merge commits. Set to 'false' to disable.
10+
ignore-merge-commits=true
11+
12+
# By default gitlint will ignore fixup commits. Set to 'false' to disable.
13+
# ignore-fixup-commits=false
14+
15+
# By default gitlint will ignore squash commits. Set to 'false' to disable.
16+
# ignore-squash-commits=true
17+
18+
# Ignore any data send to gitlint via stdin
19+
# ignore-stdin=true
20+
21+
# Enable debug mode (prints more output). Disabled by default.
22+
debug=true
23+
24+
# Enable community contributed rules
25+
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
26+
# contrib=contrib-title-conventional-commits,CC1
27+
28+
# Set the extra-path where gitlint will search for user defined rules
29+
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
30+
extra-path=scripts/gitlint
31+
32+
[title-max-length]
33+
line-length=75
34+
35+
[body-min-line-count]
36+
min-line-count=1
37+
38+
[body-max-line-count]
39+
max-line-count=200
40+
41+
[title-must-not-contain-word]
42+
# Comma-separated list of words that should not occur in the title. Matching is case
43+
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
44+
# will not cause a violation, but "WIP: my title" will.
45+
words=wip
46+
47+
# [title-match-regex]
48+
# python like regex (https://docs.python.org/2/library/re.html) that the
49+
# commit-msg title must be matched to.
50+
# Note that the regex can contradict with other rules if not used correctly
51+
# (e.g. title-must-not-contain-word).
52+
# regex=^US[0-9]*
53+
54+
[body-max-line-length]
55+
# B1 = body-max-line-length
56+
line-length=80
57+
58+
[body-min-length]
59+
min-length=3
60+
61+
[body-is-missing]
62+
# Whether to ignore this rule on merge commits (which typically only have a title)
63+
# default = True
64+
ignore-merge-commits=false
65+
66+
# [body-changed-file-mention]
67+
# List of files that need to be explicitly mentioned in the body when they are changed
68+
# This is useful for when developers often erroneously edit certain files or git submodules.
69+
# By specifying this rule, developers can only change the file when they explicitly reference
70+
# it in the commit message.
71+
# files=gitlint/rules.py,README.md
72+
73+
# [author-valid-email]
74+
# python like regex (https://docs.python.org/2/library/re.html) that the
75+
# commit author email address should be matched to
76+
# For example, use the following regex if you only want to allow email addresses from foo.com
77+
# regex=[^@]+@foo.com
78+
79+
# [ignore-by-title]
80+
# Ignore certain rules for commits of which the title matches a regex
81+
# E.g. Match commit titles that start with "Release"
82+
# regex=^Release(.*)
83+
#
84+
# Ignore certain rules, you can reference them by their id or by their full name
85+
# Use 'all' to ignore all rules
86+
# ignore=T1,body-min-length
87+
88+
# [ignore-by-body]
89+
# Ignore certain rules for commits of which the body has a line that matches a regex
90+
# E.g. Match bodies that have a line that that contain "release"
91+
# regex=(.*)release(.*)
92+
#
93+
# Ignore certain rules, you can reference them by their id or by their full name
94+
# Use 'all' to ignore all rules
95+
# ignore=T1,body-min-length
96+
97+
# [contrib-title-conventional-commits]
98+
# Specify allowed commit types. For details see: https://www.conventionalcommits.org/
99+
# types = bugfix,user-story,epic

system/Middlewares/OpenAMP/libmetal/.travis.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

system/Middlewares/OpenAMP/libmetal/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
cmake_minimum_required (VERSION 2.6)
1+
cmake_minimum_required (VERSION 3.0.2)
22
if (POLICY CMP0048)
33
cmake_policy(SET CMP0048 NEW)
44
endif()
55

6+
if (POLICY CMP0077)
7+
cmake_policy(SET CMP0077 NEW)
8+
endif()
9+
610
list (APPEND CMAKE_MODULE_PATH
711
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
812
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"

system/Middlewares/OpenAMP/libmetal/MAINTAINERS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ consult when they have a question about OpenAMP and to provide a a set of
88
names to be CC'd when submitting a patch.
99

1010
## Project Administration
11-
Wendy Liang <wendy.liang@xilinx.com>
11+
Ed Mooring <ed.mooring@linaro.org>
12+
Arnaud Pouliquen <arnaud.pouliquen@st.com>
1213

1314
### All patches CC here
14-
open-amp@googlegroups.com
15+
openamp-rp@lists.openampproject.org
1516

1617
## Machines
1718
### Xilinx Platform - Zynq-7000
18-
Wendy Liang <wendy.liang@xilinx.com>
19+
Ed Mooring <ed.mooring@linaro.org>
1920

2021
### Xilinx Platform - Zynq UltraScale+ MPSoC
21-
Wendy Liang <wendy.liang@xilinx.com>
22+
Ed Mooring <ed.mooring@linaro.org>

system/Middlewares/OpenAMP/libmetal/README.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ and request memory across the following operating environments:
88
* RTOS (with and without virtual memory)
99
* Bare-metal environments
1010

11+
## Project configuration
12+
The configuration phase begins when the user invokes CMake. CMake begins by processing the CMakeLists.txt file and the cmake directory.
13+
Some cmake options are available to help user to customize the libmetal to their
14+
own project.
15+
16+
* **WITH_DOC** (default ON): Build with documentation. Add -DWITH_DOC=OFF in
17+
cmake command line to disable.
18+
* **WITH_EXAMPLES** (default ON): Build with application exemples. Add
19+
-DWITH_DOC=OFF in cmake command line to disable the option.
20+
* **WITH_TESTS** (default ON): Build with application tests. Add -DWITH_DOC=OFF
21+
in cmake command line to disable the option.
22+
* **WITH_DEFAULT_LOGGER** (default ON): Build with default trace logger. Add
23+
-DWITH_DEFAULT_LOGGER=OFF in cmake command line to disable the option.
24+
* **WITH_SHARED_LIB** (default ON): Generate a shared library. Add
25+
-DWITH_SHARED_LIB=OFF in cmake command line to disable the option.
26+
* **WITH_STATIC_LIB** (default ON): Generate a static library. Add
27+
-DWITH_STATIC_LIB=OFF in cmake command line to disable the option.
28+
* **WITH_ZEPHYR** (default OFF): Build for Zephyr environment. Add
29+
-DWITH_ZEPHYR=ON in cmake command line to enable the the option.
30+
1131
## Build Steps
1232

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

5579
### Building for Zephyr
80+
The [zephyr-libmetal](https://github.com/zephyrproject-rtos/libmetal)
81+
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.
82+
83+
Following instruction is only to be able to run test application on a QEMU running
84+
a Zephyr environment.
85+
5686
As Zephyr uses CMake, we build libmetal library and test application as
5787
targets of Zephyr CMake project. Here is how to build libmetal for Zephyr:
5888
```
@@ -105,7 +135,8 @@ The following utilities are provided in lib/utilities.h:
105135

106136
#### Version
107137

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

110141
### Top Level Interfaces
111142

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

128164
For bare-metal, metal_sys_init and metal_sys_finish just returns.
129165

@@ -218,3 +254,48 @@ libmetal sleep APIs provide getting delay execution implementation.
218254
This API is for compiler dependent functions. For this release, there is only
219255
a GCC implementation, and compiler specific code is limited to atomic
220256
operations.
257+
258+
## How to contribute:
259+
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.
260+
Then following points should be rescpected to facilitate the review process.
261+
262+
### Licencing
263+
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:
264+
265+
```
266+
SPDX-License-Identifier: BSD-3-Clause
267+
```
268+
### Signed-off-by
269+
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:
270+
271+
```
272+
git config --global user.name "first-name Last-Namer"
273+
git config --global user.email "yourmail@company.com"
274+
```
275+
### gitlint
276+
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.
277+
278+
Run gitlint locally in your tree and branch where your patches have been committed:
279+
280+
```gitlint```
281+
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.
282+
283+
### Code style
284+
In general, follow the Linux kernel coding style, with the following exceptions:
285+
286+
* Use /** */ for doxygen comments that need to appear in the documentation.
287+
288+
The Linux kernel GPL-licensed tool checkpatch is used to check coding style conformity.Checkpatch is available in the scripts directory.
289+
290+
To check your \<n\> commits in your git branch:
291+
```
292+
./scripts/checkpatch.pl --strict -g HEAD-<n>
293+
294+
```
295+
### Send a pull request
296+
We use standard github mechanism for pull request. Please refer to github documentation for help.
297+
298+
## Communication and Collaboration
299+
[Subscribe](https://lists.openampproject.org/mailman/listinfo/openamp-rp) to the OpenAMP mailing list(openamp-rp@lists.openampproject.org).
300+
301+
For more details on the framework please refer to the the [OpenAMP wiki](https://github.com/OpenAMP/open-amp/wiki).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
VERSION_MAJOR = 1
2+
VERSION_MINOR = 0
3+
VERSION_PATCH = 0

system/Middlewares/OpenAMP/libmetal/cmake/modules/FindHugeTLBFS.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ find_library (HUGETLBFS_LIBRARY NAMES ${HUGETLBFS_NAMES})
2525
# handle the QUIETLY and REQUIRED arguments and set HUGETLBFS_FOUND to TRUE if
2626
# all listed variables are TRUE
2727
include (FindPackageHandleStandardArgs)
28-
FIND_PACKAGE_HANDLE_STANDARD_ARGS (HUGETLBFS DEFAULT_MSG HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
28+
FIND_PACKAGE_HANDLE_STANDARD_ARGS (HugeTLBFS DEFAULT_MSG HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
2929

3030
if (HUGETLBFS_FOUND)
3131
set (HUGETLBFS_LIBRARIES ${HUGETLBFS_LIBRARY})

0 commit comments

Comments
 (0)