Lines Matching +full:zephyr +full:- +full:main +full:- +full:ci +full:- +full:weekly +full:- +full:1
6 As an open-source project, we welcome and encourage the community to submit
24 https://github.com/zephyrproject-rtos/zephyr/blob/main/LICENSE
26 .. _GitHub repo: https://github.com/zephyrproject-rtos/zephyr
28 Zephyr uses the `Apache 2.0 license`_ (as found in the LICENSE file in
38 https://www.zephyrproject.org/faqs/#1571346989065-9216c551-f523
41 https://www.whitesourcesoftware.com/whitesource-blog/top-10-apache-license-questions-answered/
52 There are some imported or reused components of the Zephyr project that
55 Importing code into the Zephyr OS from other projects that use a license
57 context and approved by the Zephyr governing board.
61 the Zephyr community can develop products with the Zephyr Project
64 See :ref:`external-contributions` for more information about
70 :maxdepth: 1
84 https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/
91 To make a good faith effort to ensure licensing criteria are met, the Zephyr
97 later in this document), the developer simply adds a ``Signed-off-by``
104 .. code-block:: none
129 sign-off) is maintained indefinitely and may be redistributed
133 DCO Sign-Off
136 The "sign-off" in the DCO is a "Signed-off-by:" line in each commit's log
137 message. The Signed-off-by: line must be in the following format::
139 Signed-off-by: Your Name <your.email@example.com>
143 - ``Your Name`` with your legal name (pseudonyms, hacker handles, and the
146 - ``your.email@example.com`` with the same email address you are using to
147 author the commit (CI will fail if there is no match)
149 You can automatically add the Signed-off-by: line to your commit body using
150 ``git commit -s``. Use other commits in the zephyr git history as examples.
156 - If you are altering an existing commit created by someone else, you must add
157 your Signed-off-by: line without removing the existing one.
159 - If you forget to add the Signed-off-by: line, you can add it to your previous
160 commit by running ``git commit --amend -s``.
162 - If you've pushed your changes to GitHub already you'll need to force push
163 your branch after this with ``git push -f``.
169 for the Project to use. Developers are permitted to cherry-pick patches that
174 * the cherry-picked commits or portions of a commit shall preserve the original
175 sign-off messages and the author identity.
186 As a contributor, you'll want to be familiar with the Zephyr project, how to
187 configure, install, and use it as explained in the `Zephyr Project website`_
188 and how to set up your development environment as introduced in the Zephyr
198 The Zephyr development workflow supports all 3 major operating systems
201 tools yourself, you will need to rely on the Continuous Integration (CI)
212 To clone the main Zephyr Project repository use the instructions in
215 This section describes the main repository's source tree. In addition to the
216 Zephyr kernel itself, you'll also find the sources for technical documentation,
220 Understanding the Zephyr source tree can help locate the code
221 associated with a particular Zephyr feature.
226 The top-level file for the CMake build system, containing a lot of the
227 logic required to build Zephyr.
230 The top-level Kconfig file, which refers to the file :file:`Kconfig.zephyr`
231 also found in the top-level directory.
238 the west command-line tool.
240 The Zephyr source tree also contains the following top-level
245 Architecture-specific kernel and system-on-chip (SoC) code.
250 * architecture-specific kernel source files
251 * architecture-specific kernel include files for private APIs
260 Zephyr technical documentation source files and tools used to
267 :ref:`devicetree <dt-guide>` source files used to describe non-discoverable
268 board-specific hardware details.
274 Architecture-independent kernel code.
280 Miscellaneous code that doesn't belong to any of the other top-level
284 Sample applications that demonstrate the use of Zephyr features.
287 Various programs and other files used to build and test Zephyr
291 Additional build scripts needed to build Zephyr.
294 Subsystems of Zephyr, including:
302 Test code and benchmarks for Zephyr features.
305 Additional architecture independent data. It currently contains Zephyr's CMake
311 .. _Zephyr Project Issues: https://github.com/zephyrproject-rtos/zephyr/issues
313 .. _open pull requests: https://github.com/zephyrproject-rtos/zephyr/pulls
319 Before starting on a patch, first check in our issues `Zephyr Project Issues`_
321 conversation on the `Zephyr devel mailing list`_ (or the `Zephyr Discord
324 similar ideas for changes or additions. Send a message to the `Zephyr devel
333 You can find all `open pull requests`_ on GitHub and open `Zephyr Project
346 For example, if your name is ``Zephyr Developer`` and your email
349 .. code-block:: console
351 git config --global user.name "Zephyr Developer"
352 git config --global user.email "z.developer@example.com"
357 address you use to sign your commits. If they don't match, the CI system will
367 compliance with Zephyr standards and facilitate the review process.
369 If in doubt, it's advisible to explore existing Pull Requests within the Zephyr
373 .. _commit-guidelines:
382 .. code-block:: none
386 [Commit message body (must be non-empty)]
388 Signed-off-by: [Your Full Name] <[your.email@address]>
396 -------
400 .. code-block:: none
409 Signed-off-by: Zephyr Developer <z.developer@example.com>
412 ---------------------------
430 * ``net: ethernet:`` for Ethernet-related networking changes
446 -------------------
452 pull request will fail CI checks if you do not.
461 * **how** you know it works -- for example, which tests you ran.
467 For examples of accepted commit messages, you can refer to the Zephyr GitHub
468 `changelog <https://github.com/zephyrproject-rtos/zephyr/commits/main>`__.
471 Signed-off-by: ...
472 ------------------
477 already. Create your commit with ``git commit -s`` to add the
478 Signed-off-by: line automatically using this information.
481 Signed-off-by: line that looks like this:
483 .. code-block:: none
485 Signed-off-by: [Your Full Name] <[your.email@address]>
487 For example, if your full name is ``Zephyr Developer`` and your email
490 .. code-block:: none
492 Signed-off-by: Zephyr Developer <z.developer@example.com>
501 See the :ref:`contributor-expectations` for a more complete discussion of
505 ------------
508 …https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolink…
515 .. code-block:: none
522 .. code-block:: none
530 .. code-block:: none
532 Link: https://github.com/zephyrproject-rtos/zephyr/issues/<issue number>
540 https://kernel.org/doc/html/latest/process/coding-style.html
548 ``switch`` body, even for single-line code blocks.
550 * Use C89-style single line comments, ``/* */``. The C99-style single line
554 * Avoid using non-ASCII symbols in code, unless it significantly improves
560 The Linux kernel GPL-licensed tool ``checkpatch`` is used to check
567 code, make the file *$ZEPHYR_BASE/.git/hooks/pre-commit* executable and edit
570 .. code-block:: bash
573 set -e exec
574 exec git diff --cached | ${ZEPHYR_BASE}/scripts/checkpatch.pl -
577 before pushing on zephyr repo. To do this, make the file
578 *$ZEPHYR_BASE/.git/hooks/pre-push* executable and edit it to contain:
580 .. code-block:: bash
583 remote="$1"
593 exec ${ZEPHYR_BASE}/scripts/series-push-hook.sh $args
599 issues, you can add option --no-verify to the git push command.
603 clang-format
604 ------------
606 The `clang-format tool <https://clang.llvm.org/docs/ClangFormat.html>`_ can
608 `Coding Style`_ standards together with the ``.clang-format`` configuration file
609 provided in the repository. ``clang-format`` is well integrated into most
612 .. code-block:: bash
614 clang-format -i my_source_file.c
616 ``clang-format`` is part of LLVM, which can be downloaded from the project
617 `releases page <https://github.com/llvm/llvm-project/releases>`_. Note that if
618 you are a Linux user, ``clang-format`` will likely be available as a package in
628 Continuous Integration (CI)
631 The Zephyr Project operates a Continuous Integration (CI) system that runs on
639 CI is run on Github Actions and it uses the same tools described in the
640 `CI Tests`_ section. The CI results must be green indicating "All
641 checks have passed" before the Pull Request can be merged. CI is run when the
644 The current status of the CI run can always be found at the bottom of the
657 non-green) build.
661 Running CI Tests Locally
667 -------------------
670 compliance with Zephyr's established guidelines and best practices. The script
677 .. code-block:: bash
679 ./scripts/ci/check_compliance.py -c upstream/main..
682 -------
689 and let the project CI automatically run the :ref:`twister_script` for you.
691 If a test fails, you can check from the CI run logs how to rerun it locally,
694 .. code-block:: bash
696 west twister -p native_sim -s tests/drivers/build_all/sensor/sensors.generic_test
718 <https://scan.coverity.com/projects/zephyr>`_ website. In order to access the
719 results you have to create an account yourself. From the Zephyr project page,
723 Static analysis of the Zephyr codebase is conducted on a bi-weekly basis. GitHub
744 Update the related Github issue in the zephyr project with the details, and only close
758 When contributing to the Zephyr Project, it is also important you provide as much
762 The general GitHub workflow used by Zephyr developers uses a combination of
767 .. _Create a Fork of Zephyr:
768 https://github.com/zephyrproject-rtos/zephyr#fork-destination-box
770 #. `Create a Fork of Zephyr`_
772 right corner of the Zephyr project repo page in GitHub.)
774 #. On your development computer, change into the :file:`zephyr` folder that was
777 cd zephyrproject/zephyr
780 <https://github.com/zephyrproject-rtos/zephyr>`_ from ``origin`` to
787 git remote add origin https://github.com/<your github id>/zephyr
791 git remote -v
795 origin https://github.com/<your github id>/zephyr (fetch)
796 origin https://github.com/<your github id>/zephyr (push)
797 upstream https://github.com/zephyrproject-rtos/zephyr (fetch)
798 upstream https://github.com/zephyrproject-rtos/zephyr (push)
800 #. Create a topic branch (off of ``main``) for your work (if you're addressing
803 git checkout main
804 git checkout -b fix_comment_typo
806 Some Zephyr subsystems do development work on a separate branch from
807 ``main`` so you may need to indicate this in your checkout::
809 git checkout -b fix_out_of_date_patch origin/net
817 git add [file(s) that changed, add -p if you want to be more specific]
825 git diff --cached
829 git commit -s
831 The ``-s`` option automatically adds your ``Signed-off-by:`` to your commit
833 agreement with the :ref:`DCO`. See the :ref:`commit-guidelines` section for
846 request for the ``main`` branch. The title and message from your commit
855 on your pull request at https://github.com/zephyrproject-rtos/zephyr/pulls.
858 a ``This branch is out-of-date with the base branch`` message and a
866 new branch off of ``main`` and not the previous branch.)::
868 git checkout main
869 git checkout -b fix_another_issue
876 git rebase -i <offending-commit-id>^
887 git rebase --continue
891 git push --force origin fix_comment_typo
899 git fetch --all
900 git rebase --ignore-whitespace upstream/main
902 The ``--ignore-whitespace`` option stops ``git apply`` (called by rebase)
905 git push --force origin fix_comment_typo
908 outside GitHub, and the one recommended by Zephyr, it's not the main
911 one - GitHub complains it can't find older commits. You're also not
916 #. If the CI run fails, you will need to make changes to your code in order
918 Additional information about the CI system can be found in
930 .. _git-rebase:
931 https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---keep-base
933 #. When pushing follow-up changes, use the ``--keep-base`` option of
934 `git-rebase`_
946 #. Watch early CI results immediately after submissions and fix issues as they
949 #. Revisit PR after 1-2 hours to see the status of all CI checks, make sure all
953 sure you click the "Re-request review" button on the GitHub UI to notify
985 cases where the file is an original to Zephyr, the commit message should
992 <external-contributions>`, the commit message shall contain details regarding
993 the original project, the location of the project, the SHA-id of the origin
999 License: BSD 3-Clause
1000 URL: http://www.contiki-os.org/
1007 License: BSD 3-Clause
1019 .. _treewide-changes:
1032 A *treewide change* is defined as any change to Zephyr APIs, coding practices,
1034 throughout the zephyr source code repository or can reasonably be expected to
1035 do so for a wide class of external Zephyr-based source code.
1041 Project maintainers should use good judgement and prioritize the Zephyr
1043 Protracted disagreements can be resolved by the Zephyr Project's Technical
1049 - The zephyr repository must apply the 'treewide' GitHub label to any issues or
1052 - The person proposing a treewide change must create an `RFC issue
1053 …<https://github.com/zephyrproject-rtos/zephyr/issues/new?assignees=&labels=RFC&template=003_rfc-pr…
1057 - The project's `Architecture Working Group (WG)
1058 <https://github.com/zephyrproject-rtos/zephyr/wiki/Architecture-Working-Group>`_
1064 - The Architecture WG must specify the procedure for merging any PRs associated
1068 - The person proposing a treewide change must email
1077 - the deprecation of version 1 of the :ref:`Logging API <logging_api>` in favor
1079 <https://github.com/zephyrproject-rtos/zephyr/commit/262cc55609b73ea61b5f999c6c6daaba20bc5240>`_)
1080 - the removal of support for a legacy :ref:`dt-bindings` syntax
1082 <https://github.com/zephyrproject-rtos/zephyr/commit/6bf761fc0a2811b037abec0c963d60b00c452acb>`_)
1091 Drivers for standalone devices should use the Zephyr bus APIs (SPI, I2C...)
1095 If it is not technically possible to achieve full performance using the Zephyr
1099 Zephyr APIs) for all other SoCs. Every exception must be approved by the