Skip to content

Commit 724076e

Browse files
carlescufia-v-s
authored andcommitted
Import Example Project
app: initial application skeleton initial application skeleton demonstrating: - custom boards - custom DT bindings - Out-of-tree drivers Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: initial CI example CI example using Github Actions Signed-off-by: Gerard Marull-Paretas <[email protected]> app: provide in-tree board overlay Provide an overlay to shows how to run the example-application on boards that are part of the Zephyr tree. Sometimes initial development is performed on dev-kits, so it can be useful. A different vendor than the one used for the custom board (Nordic) has been chosen to show application portability. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: add more details on board usage Inform about the possibility of using Zephyr sample boards. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: remove doc from list of features Documentation is not (yet) provided. Signed-off-by: Gerard Marull-Paretas <[email protected]> drivers: sensor: examplesensor: use GPIO_DT_SPEC_INST_GET Instance version of the GPIO_DT_SPEC_GET was recently introduced. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: run on pull_request Run CI on push and pull_request. Signed-off-by: Gerard Marull-Paretas <[email protected]> manifest: use Zephyr main branch Zephyr now uses main instead of master. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: Remove cache CI is failing and it seems related to cache. Remove for now to get CI passing again. Signed-off-by: Kumar Gala <[email protected]> readme: add versioning scheme information Mention that example-application follow Zephyr version scheme. Signed-off-by: Gerard Marull-Paretas <[email protected]> manifest: pin to Zephyr v2.6.0 Pin to Zephyr v2.6.0 for the v2.6.0 release of the example-application. Signed-off-by: Gerard Marull-Paretas <[email protected]> manifest: Switch back to main after release Switch back to pointing to main after the v2.6.0 release. Signed-off-by: Carles Cufi <[email protected]> drivers: sensor: examplesensor: use gpio_pin_get_dt Use the recently introduced GPIO API that allows obtaining pin state using the gpio_dt_spec struct. Signed-off-by: Gerard Marull-Paretas <[email protected]> app: delete foo sample code The initial idea behind this code was to showcase documentation. It does not add any special value to the sample, so remove it. A proper library can be added in the future. Signed-off-by: Gerard Marull-Paretas <[email protected]> workflow: add /opt/toolchains to CMAKE_PREFIX_PATH in environment. Fixes: #39270 The latest zephyrprojectrtos/ci no longer sets ZEPHYR_SDK_INSTALL_DIR in the environment and doesn't register the Zephyr-SDK as a CMake package in the CMake package registry. To ensure the the Zephyr SDK can be correctly discovered by find_package(Zephyr-sdk) we add `/opt/toolchains` to the CMAKE_PREFIX_PATH environment variable which is a list containing additional search prefixes for the `find_package()` function. Signed-off-by: Torsten Rasmussen <[email protected]> manifest: pin to Zephyr v2.7.0 Pin to Zephyr v2.7.0 for the v2.7.0 release of the example-application. Signed-off-by: Christopher Friedt <[email protected]> manifest: Switch back to main after release Switch back to pointing to main after the v2.7.0 release. Signed-off-by: Christopher Friedt <[email protected]> app: use <kernel.h> include <zephyr.h> is a proxy to <kernel.h> in practice, so let's use <kernel.h> instead. Signed-off-by: Gerard Marull-Paretas <[email protected]> app, drivers: migrate includes to <zephyr/...> Zephyr includes are now prefixed with <zephyr/...>. While the old path can still be used when CONFIG_LEGACY_INCLUDE_PATH=y, it's better to be prepared for the future. Signed-off-by: Gerard Marull-Paretas <[email protected]> west: Pin the Zephyr release to v3.1.0 Align with Zephyr relase v3.1.0. Signed-off-by: Carles Cufi <[email protected]> west: Point back to main after release After releasing v3.1.0, move back to main. Signed-off-by: Carles Cufi <[email protected]> ci/readme: remove usage of -s legacy option -s/--source is a legacy option. There's a proposal to actually use it for something else in Zephyr now: zephyrproject-rtos/zephyr#40669 Let's update README. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: Add links to app dev and west Link to the relevant sections in the Zephyr documentation, including application development and west topologies. Signed-off-by: Carles Cufi <[email protected]> drivers: sensor: examplesensor: use DT_HAS_* helper Make zephyr,examplesensor driver option dependent on it being defined in Kconfig and set its default based on DT status as well. Signed-off-by: Gerard Marull-Paretas <[email protected]> app: remove redundant CONFIG_EXAMPLESENSOR in prj.conf The option is no longer needed, zephyr,examplesensor driver will automatically be selected based on DT (and because we enable all of its dependencies, including CONFIG_SENSOR). Signed-off-by: Gerard Marull-Paretas <[email protected]> devicetree: remove usage of deprecated label property Devicetree label property has been deprecated, so remove its usage. Signed-off-by: Gerard Marull-Paretas <[email protected]> drivers: sensor: examplesensor: use select in Kconfig With the recent changes in how Kconfig options are enabled using DT helpers, using select leads to a better/more scalable pattern. Each driver Kconfig option is expected to select its dependencies now. Signed-off-by: Gerard Marull-Paretas <[email protected]> west: add example west command Add a working example for how to implement a west command within the user's manifest repository. There is documentation for this, but we should have some working code in here just to make life easier for people. Signed-off-by: Martí Bolívar <[email protected]> west: Pin the Zephyr release to v3.2.0 Align with Zephyr relase v3.2.0. Signed-off-by: Fabio Baltieri <[email protected]> west: Point back to main after release After releasing v3.2.0, move back to main. Signed-off-by: Fabio Baltieri <[email protected]> lib: create empty lib subsystem Create lib subsystem with empty Kconfig menu, subsystem build file. Updated top-level build and documentation to include subsystem. This was created to provide an example of how the `lib/` directory can be connected to the Zephyr build system through `module.yml`, and so that CI can verify that the extension settings used here work with these sub-trees. . The approach follows the pattern of paralleling the Zephyr tree. An empty subsystem was implemented rather than a non-empty one in order to isolate the core changes from any specific library. This provides a clean reference for users. . It was assumed that some users will want to strip out the `lib/` subsystem separate from existing subsystems, and vice versa. . This was verified by: - visually verifying a clean build of: `west build -b custom_plank -p always example-application/app/` - visually verifying the subsystem appeared in the correct location in a clean build of: `west build -b custom_plank -p always example-application/app/` Signed-off-by: Gregory Shue <[email protected]> lib: add custom_lib Enhance the example-application repository with a configurable, trivial library example and associated test cases. . This implementation appears to make no assumptions. . This implementation was verified by running the following commands in an example-application workspace and verifying all tests passed. 1. `west build -b native_posix -p always example-application/tests/lib/custom_lib/` 2. `./build/zephyr/zephyr.exe` 3. `west build -b native_posix -p always example-application/tests/lib/custom_lib/ -- -DCONFIG_CUSTOM_LIB_GET_VALUE_DEFAULT=6` 4. `./build/zephyr/zephyr.exe` 5. `zephyr/scripts/twister -T example-application/tests/ \ -p qemu_cortex_m0` 6. `cd zephyr/doc && make clean && make` built cleanly. . Note that `twister` does not follow the `zephyr/module.yml:tests` setting to discover tests in modules, so the testcase-root must be explicitly provided. Fixes #35177 Signed-off-by: Gregory Shue <[email protected]> boards: custom_plank: migrate to pinctrl The board still used deprecated nRF *-pin properties, migrate it to pinctrl. Signed-off-by: Gerard Marull-Paretas <[email protected]> workflows: build: Do not install west and requirements This is not necessary since it's running in the zephyr docker image, that already contains them. Signed-off-by: Carles Cufi <[email protected]> lib: Remove trailing whitespace We need a compliance check. Signed-off-by: Carles Cufi <[email protected]> tests: custom_lib: Fix include paths Align to the new standard that prefixes zephyr/. Signed-off-by: Carles Cufi <[email protected]> tests: custom_lib: port to the new ztest API Align with the latest upstream API. Signed-off-by: Carles Cufi <[email protected]> lib: Fix running twister Use integration_platforms and invoke twister properly. Signed-off-by: Carles Cufi <[email protected]> tests: lib: custom_lib: require CMake 3.20 Zephyr now requires CMake >= 3.20. Signed-off-by: Gerard Marull-Paretas <[email protected]> tests: lib: custom_lib: use YAML empty dictionary syntax There is no need to use dummy properties when an empty dictionary can be used. Signed-off-by: Gerard Marull-Paretas <[email protected]> tests: lib: custom_lib: fix includes Test was including Kernel for nothing, and missed limits.h (likely included by Kernel) Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: cleaning up the readme.md Cleaning up the language and formatting in the README.md document file. Signed-off-by: Pekka Niskanen <[email protected]> west.yml: remove 'self: path:' This makes it easier to rename this repository and use it under its new name. For example, with this patch, if you push the repository to GitHub user 'foo' as repository 'bar', you can do: west init -m https://github.com/foo/bar my-workspace And you will get: - my-workspace/.west/config says manifest.path is 'bar' - my-workspace/bar exists as a git repository By contrast, with the current 'self: path:' setting, you will instead get: - my-workspace/.west/config says manifest.path is 'example-application' - my-workspace/example-application exists as a git repository Let's let people name this repository whatever they want, and get the expected results, instead of forcing the name example-application Signed-off-by: Marti Bolivar <[email protected]> west: Pin the Zephyr release to v3.3.0 This commit pins the example-application to the Zephyr release v3.3.0. Signed-off-by: Stephanos Ioannidis <[email protected]> west: Point back to main after 3.3.0 release This commit updates the example-application to point back to the Zephyr main branch after the Zephyr v3.3.0 release. Signed-off-by: Stephanos Ioannidis <[email protected]> app: adjust main definition Zephyr now requires `int main(void)`. Main must return 0, all other values are reserved. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: schedule a daily build Schedule a daily build, so that we can quickly spot regressions in the application due to changes in Zephyr. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: Mention Zephyr modules This repo also demonstrates Zephyr modules, since it's a module itself. Add a link to the list of features. Signed-off-by: Carles Cufi <[email protected]> ci: build: update checkout/upload-artifact actions These actions are triggering warnings about usage of deprecated features (e.g. NodeJS 12). Use latest version of the actions. Signed-off-by: Gerard Marull-Paretas <[email protected]> gitignore: add twister folders Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: remove redundant --board-root Twister automatically adds module board root folders now. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: use west twister Invoke Twister using west. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: simplify twister args s/G/--integration (more clear) s/--testsuite-root/-T (shorter, still clear) Signed-off-by: Gerard Marull-Paretas <[email protected]> manifest: only clone required modules Optimize setup/CI time by cloning only what is necessary. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: pin runner and container versions Make sure we can safely go back in time by pinning runner and container versions. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: do not archive firmware It's not useful, just wastes time/space for nothing. Signed-off-by: Gerard Marull-Paretas <[email protected]> boards: custom_plank: add missing CONFIG_PINCTRL=y Signed-off-by: Gerard Marull-Paretas <[email protected]> app: remove rtt config RTT is something proprietary, not all boards/programmers have. Let's make the application simpler. Signed-off-by: Gerard Marull-Paretas <[email protected]> app: add sample.yaml Add a sample.yaml so that we can use twister to compile the application in CI. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: build application using twister Twister is more useful in a CI context because we can easily test multiple combinations of the firmware using a single command. Signed-off-by: Gerard Marull-Paretas <[email protected]> app: use extra_overlay_confs Using OVERLAY_CONFIG in extra_args is deprecated in favor of extra_overlay_confs. Signed-off-by: Gerard Marull-Paretas <[email protected]> version: Replace bespoke application version with new version system Uses Zephyr's new version infrastruction system for configuring the version of the application and displaying it. Signed-off-by: Jamie McCrae <[email protected]> ci: use shallow fetch and no tags Add a couple flags to west update to do shallow fetch for both the main repo and modules, and don't fetch any tags. Should speed things up a bit by only fetching the target version code for all modules. Signed-off-by: Fabio Baltieri <[email protected]> Documentation: Add Twister Integration tests instructions Added Twister Integration tests instructions to the README.md file. Signed-off-by: Ivan Vnucec <[email protected]> west: Pin the Zephyr release to v3.5.0 Align with Zephyr relase v3.5.0. Signed-off-by: Fabio Baltieri <[email protected]> west: Point back to main after release After releasing v3.5.0, move back to main. Signed-off-by: Fabio Baltieri <[email protected]> tests: drop CONFIG_ZTEST_NEW_API This is now gone from upstream and not needed anymore. Signed-off-by: Fabio Baltieri <[email protected]> boards: custom_plank: use gpio-as-nreset instead of CONFIG_GPIO_AS_PINRESET CONFIG_GPIO_AS_PINRESET is deprecated, replace it with the new device tree property. Signed-off-by: Fabio Baltieri <[email protected]> boards: custom_plank: enable gpiote The gpiote node has to be enabled for the board to build since the latest upstream nrfx hal update. Signed-off-by: Fabio Baltieri <[email protected]> ci: use the zephyr-setup action Use the standard generic GitHub images for the run and the zephyr-setup action, run the build on both Linux, macOS and Windows. Signed-off-by: Fabio Baltieri <[email protected]> ci: align the runner list with the main repository Use the same runner list as the main repository ones. Originally I meant to just add macos-14 so we cover macOS ARM, which is nice because it runs on qemu-m0 from the brew package, but at this point let's also use explicit version for the other runners too. Signed-off-by: Fabio Baltieri <[email protected]> west: Pin the Zephyr revision to v3.6.0 Pins the Zephyr revision to the latest release, v3.6.0. Signed-off-by: Maureen Helm <[email protected]> west: Point Zephyr back to main after v3.6.0 release Points the Zephyr revision back to the main branch after the latest release, v3.6.0. Signed-off-by: Maureen Helm <[email protected]> boards: custom_plank: port to HWMv2 Port the custom_plank example out-of-tree board to HWMv2. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: Added missing directory change in build instructions The current build instructions omit a necessary directory change after creating the workspace. Signed-off-by: Andy Sinclair <[email protected]> include: namespace includes with app/ prefix All example-application level includes will have the 'app' prefix, making ownership obvious and reducing the chances of namespacing clashes. This aligns with how Zephyr works with the 'zephyr' prefix. Signed-off-by: Gerard Marull-Paretas <[email protected]> lib: custom: simplify naming scheme Improve the naming scheme of the custom library. Signed-off-by: Gerard Marull-Paretas <[email protected]> boards: custom_plank: tweak defconfig with UART console To improve the default user experience. However, explain this may not be the best choice on production boards. Signed-off-by: Gerard Marull-Paretas <[email protected]> drivers: sensor: s/examplesensor/example-|_sensor/ Just a rename so things look a bit nicer. Signed-off-by: Gerard Marull-Paretas <[email protected]> drivers: blink: add custom out-of-tree driver class Add a new out-of-tree custom driver class to demonstrate all aspects of custom driver class creation. Signed-off-by: Gerard Marull-Paretas <[email protected]> drivers: blink: blink-gpio-led: add initial implementation Add a blink driver implementation for a GPIO-controlled LED. Signed-off-by: Gerard Marull-Paretas <[email protected]> boards: custom_plank: instantiate blink-gpio-led Define an instance of a blink-gpio-led. Since custom_plank is in reality a nRF52840DK, this uses LED0 as the blink-gpio-led. Signed-off-by: Gerard Marull-Paretas <[email protected]> app: boards: nucleo_f302r8: instantiate blink-gpio-led Instantiate blink-gpio-led (uses board Green LED). Signed-off-by: Gerard Marull-Paretas <[email protected]> app: update application to use the custom blink API Update the application to use the new custom blink API. It changes the blink period if the sensor reports a proximity value that is 1. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: add Doxygen configuration Add a simple Doxygen configuration that allows to build documentation for the application APIs found under include/. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: add minimal Sphinx setup Add a minimal Sphinx-based setup, also configuring intersphinx for Zephyr. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: add workflow to build and publish docs Add a workflow that, for now, builds Doxygen docs and published them on Github pages. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: add documentation details Inform the users on how to quickly build the documentation. Signed-off-by: Gerard Marull-Paretas <[email protected]> cmake: use zephyr_syscall_include_directories Instead of appending to SYSCALL_INCLUDE_DIRS. Signed-off-by: Gerard Marull-Paretas <[email protected]> readme: swap doxygen/sphinx badges Prefer Sphinx as the first entry. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: add breathe and import existing Doxygen groups In Zephyr, most APIs in Doxygen are also imported in Sphinx using the breathe exstension. While breathe is de-facto unmaintained, this comes handy to have an integrated documentation experience. User is warned to check the maintainership status of breathe, because Doxygen in standalone mode (also offered) may be enough. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: move Zephyr references to standalone page So that home page is de-cluttered. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: remove sphinx-quickstart redundant comments These are not useful. Signed-off-by: Gerard Marull-Paretas <[email protected]> ci: deploy Sphinx content to the root folder Prefer Sphinx content as the landing page, specially now that it contains API docs as well. Signed-off-by: Gerard Marull-Paretas <[email protected]> doc: Typo fix Typo fix in ReadMe file Signed-off-by: UMA PRASEEDA <[email protected]> boards: custom_plank: remove redundant PINCTRL defconfig Drivers using pinctrl already select this option. Signed-off-by: Gerard Marull-Paretas <[email protected]>
0 parents  commit 724076e

Some content is hidden

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

65 files changed

+4393
-0
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
path: example-application
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.11
26+
27+
- name: Setup Zephyr project
28+
uses: zephyrproject-rtos/action-zephyr-setup@v1
29+
with:
30+
app-path: example-application
31+
toolchains: arm-zephyr-eabi
32+
33+
- name: Build firmware
34+
working-directory: example-application
35+
shell: bash
36+
run: |
37+
if [ "${{ runner.os }}" = "Windows" ]; then
38+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
39+
fi
40+
west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
41+
42+
- name: Twister Tests
43+
working-directory: example-application
44+
shell: bash
45+
run: |
46+
if [ "${{ runner.os }}" = "Windows" ]; then
47+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
48+
fi
49+
west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) 2024, Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Documentation
5+
6+
on: [push, pull_request]
7+
8+
env:
9+
DOXYGEN_VERSION: 1.9.6
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
21+
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
22+
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
23+
pip install -r doc/requirements.txt
24+
25+
- name: Build
26+
run: |
27+
cd doc
28+
doxygen
29+
30+
SPHINXOPTS="-W" make html
31+
32+
mkdir deploy
33+
mv _build_doxygen/html deploy/doxygen
34+
mv _build_sphinx/html/* deploy
35+
36+
- name: Setup pages
37+
if: github.event_name != 'pull_request'
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload pages artifact
41+
if: github.event_name != 'pull_request'
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: doc/deploy
45+
46+
- name: Upload artifacts
47+
if: github.event_name == 'pull_request'
48+
uses: actions/upload-artifact@v4
49+
with:
50+
path: doc/deploy
51+
52+
deploy:
53+
runs-on: ubuntu-22.04
54+
needs: build
55+
if: github.event_name != 'pull_request'
56+
permissions:
57+
pages: write
58+
id-token: write
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# editors
2+
.vscode
3+
*.swp
4+
*~
5+
6+
# python
7+
.venv
8+
9+
# build
10+
/build*
11+
/twister-out*
12+
13+
__pycache__/
14+
15+
# docs
16+
/doc/_build*

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# This CMake file is picked by the Zephyr build system because it is defined
5+
# as the module CMake entry point (see zephyr/module.yml).
6+
7+
8+
# This is needed so that custom driver classes using system calls are taken into
9+
# account
10+
zephyr_syscall_include_directories(include)
11+
12+
zephyr_include_directories(include)
13+
14+
add_subdirectory(drivers)
15+
add_subdirectory(lib)

Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# This Kconfig file is picked by the Zephyr build system because it is defined
5+
# as the module Kconfig entry point (see zephyr/module.yml). You can browse
6+
# module options by going to Zephyr -> Modules in Kconfig.
7+
8+
rsource "drivers/Kconfig"
9+
rsource "lib/Kconfig"

LICENSE

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by
13+
the copyright owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all
16+
other entities that control, are controlled by, or are under common
17+
control with that entity. For the purposes of this definition,
18+
"control" means (i) the power, direct or indirect, to cause the
19+
direction or management of such entity, whether by contract or
20+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+
outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+
"You" (or "Your") shall mean an individual or Legal Entity
24+
exercising permissions granted by this License.
25+
26+
"Source" form shall mean the preferred form for making modifications,
27+
including but not limited to software source code, documentation
28+
source, and configuration files.
29+
30+
"Object" form shall mean any form resulting from mechanical
31+
transformation or translation of a Source form, including but
32+
not limited to compiled object code, generated documentation,
33+
and conversions to other media types.
34+
35+
"Work" shall mean the work of authorship, whether in Source or
36+
Object form, made available under the License, as indicated by a
37+
copyright notice that is included in or attached to the work
38+
(an example is provided in the Appendix below).
39+
40+
"Derivative Works" shall mean any work, whether in Source or Object
41+
form, that is based on (or derived from) the Work and for which the
42+
editorial revisions, annotations, elaborations, or other modifications
43+
represent, as a whole, an original work of authorship. For the purposes
44+
of this License, Derivative Works shall not include works that remain
45+
separable from, or merely link (or bind by name) to the interfaces of,
46+
the Work and Derivative Works thereof.
47+
48+
"Contribution" shall mean any work of authorship, including
49+
the original version of the Work and any modifications or additions
50+
to that Work or Derivative Works thereof, that is intentionally
51+
submitted to Licensor for inclusion in the Work by the copyright owner
52+
or by an individual or Legal Entity authorized to submit on behalf of
53+
the copyright owner. For the purposes of this definition, "submitted"
54+
means any form of electronic, verbal, or written communication sent
55+
to the Licensor or its representatives, including but not limited to
56+
communication on electronic mailing lists, source code control systems,
57+
and issue tracking systems that are managed by, or on behalf of, the
58+
Licensor for the purpose of discussing and improving the Work, but
59+
excluding communication that is conspicuously marked or otherwise
60+
designated in writing by the copyright owner as "Not a Contribution."
61+
62+
"Contributor" shall mean Licensor and any individual or Legal Entity
63+
on behalf of whom a Contribution has been received by Licensor and
64+
subsequently incorporated within the Work.
65+
66+
2. Grant of Copyright License. Subject to the terms and conditions of
67+
this License, each Contributor hereby grants to You a perpetual,
68+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+
copyright license to reproduce, prepare Derivative Works of,
70+
publicly display, publicly perform, sublicense, and distribute the
71+
Work and such Derivative Works in Source or Object form.
72+
73+
3. Grant of Patent License. Subject to the terms and conditions of
74+
this License, each Contributor hereby grants to You a perpetual,
75+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+
(except as stated in this section) patent license to make, have made,
77+
use, offer to sell, sell, import, and otherwise transfer the Work,
78+
where such license applies only to those patent claims licensable
79+
by such Contributor that are necessarily infringed by their
80+
Contribution(s) alone or by combination of their Contribution(s)
81+
with the Work to which such Contribution(s) was submitted. If You
82+
institute patent litigation against any entity (including a
83+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84+
or a Contribution incorporated within the Work constitutes direct
85+
or contributory patent infringement, then any patent licenses
86+
granted to You under this License for that Work shall terminate
87+
as of the date such litigation is filed.
88+
89+
4. Redistribution. You may reproduce and distribute copies of the
90+
Work or Derivative Works thereof in any medium, with or without
91+
modifications, and in Source or Object form, provided that You
92+
meet the following conditions:
93+
94+
(a) You must give any other recipients of the Work or
95+
Derivative Works a copy of this License; and
96+
97+
(b) You must cause any modified files to carry prominent notices
98+
stating that You changed the files; and
99+
100+
(c) You must retain, in the Source form of any Derivative Works
101+
that You distribute, all copyright, patent, trademark, and
102+
attribution notices from the Source form of the Work,
103+
excluding those notices that do not pertain to any part of
104+
the Derivative Works; and
105+
106+
(d) If the Work includes a "NOTICE" text file as part of its
107+
distribution, then any Derivative Works that You distribute must
108+
include a readable copy of the attribution notices contained
109+
within such NOTICE file, excluding those notices that do not
110+
pertain to any part of the Derivative Works, in at least one
111+
of the following places: within a NOTICE text file distributed
112+
as part of the Derivative Works; within the Source form or
113+
documentation, if provided along with the Derivative Works; or,
114+
within a display generated by the Derivative Works, if and
115+
wherever such third-party notices normally appear. The contents
116+
of the NOTICE file are for informational purposes only and
117+
do not modify the License. You may add Your own attribution
118+
notices within Derivative Works that You distribute, alongside
119+
or as an addendum to the NOTICE text from the Work, provided
120+
that such additional attribution notices cannot be construed
121+
as modifying the License.
122+
123+
You may add Your own copyright statement to Your modifications and
124+
may provide additional or different license terms and conditions
125+
for use, reproduction, or distribution of Your modifications, or
126+
for any such Derivative Works as a whole, provided Your use,
127+
reproduction, and distribution of the Work otherwise complies with
128+
the conditions stated in this License.
129+
130+
5. Submission of Contributions. Unless You explicitly state otherwise,
131+
any Contribution intentionally submitted for inclusion in the Work
132+
by You to the Licensor shall be under the terms and conditions of
133+
this License, without any additional terms or conditions.
134+
Notwithstanding the above, nothing herein shall supersede or modify
135+
the terms of any separate license agreement you may have executed
136+
with Licensor regarding such Contributions.
137+
138+
6. Trademarks. This License does not grant permission to use the trade
139+
names, trademarks, service marks, or product names of the Licensor,
140+
except as required for reasonable and customary use in describing the
141+
origin of the Work and reproducing the content of the NOTICE file.
142+
143+
7. Disclaimer of Warranty. Unless required by applicable law or
144+
agreed to in writing, Licensor provides the Work (and each
145+
Contributor provides its Contributions) on an "AS IS" BASIS,
146+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+
implied, including, without limitation, any warranties or conditions
148+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+
PARTICULAR PURPOSE. You are solely responsible for determining the
150+
appropriateness of using or redistributing the Work and assume any
151+
risks associated with Your exercise of permissions under this License.
152+
153+
8. Limitation of Liability. In no event and under no legal theory,
154+
whether in tort (including negligence), contract, or otherwise,
155+
unless required by applicable law (such as deliberate and grossly
156+
negligent acts) or agreed to in writing, shall any Contributor be
157+
liable to You for damages, including any direct, indirect, special,
158+
incidental, or consequential damages of any character arising as a
159+
result of this License or out of the use or inability to use the
160+
Work (including but not limited to damages for loss of goodwill,
161+
work stoppage, computer failure or malfunction, or any and all
162+
other commercial damages or losses), even if such Contributor
163+
has been advised of the possibility of such damages.
164+
165+
9. Accepting Warranty or Additional Liability. While redistributing
166+
the Work or Derivative Works thereof, You may choose to offer,
167+
and charge a fee for, acceptance of support, warranty, indemnity,
168+
or other liability obligations and/or rights consistent with this
169+
License. However, in accepting such obligations, You may act only
170+
on Your own behalf and on Your sole responsibility, not on behalf
171+
of any other Contributor, and only if You agree to indemnify,
172+
defend, and hold each Contributor harmless for any liability
173+
incurred by, or claims asserted against, such Contributor by reason
174+
of your accepting any such warranty or additional liability.
175+
176+
END OF TERMS AND CONDITIONS
177+
178+
APPENDIX: How to apply the Apache License to your work.
179+
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
188+
189+
Copyright [yyyy] [name of copyright owner]
190+
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
194+
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.

0 commit comments

Comments
 (0)