Lines Matching +full:use +full:- +full:tree +full:- +full:checkout

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
30 contribution and allowing you to use the software however you would like
32 allows you to freely use, modify, distribute and sell your own products
38 https://www.zephyrproject.org/faqs/#1571346989065-9216c551-f523
41 https://www.whitesourcesoftware.com/whitesource-blog/top-10-apache-license-questions-answered/
53 use other licensing, as described in :ref:`Zephyr_Licensing`.
55 Importing code into the Zephyr OS from other projects that use a license
64 See :ref:`external-contributions` for more information about
84 https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/
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
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.
187 configure, install, and use it as explained in the `Zephyr Project website`_
209 Source Tree Structure
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
220 Understanding the Zephyr source tree can help locate the code
223 At the top of the tree, several files are of importance:
226 The top-level file for the CMake build system, containing a lot of the
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
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.
311 .. _Zephyr Project Issues: https://github.com/zephyrproject-rtos/zephyr/issues
313 .. _open pull requests: https://github.com/zephyrproject-rtos/zephyr/pulls
349 .. code-block:: console
351 git config --global user.name "Zephyr Developer"
352 git config --global user.email "z.developer@example.com"
356 …pseudonym or hacker handle. The email address that you use in your Git configuration must match th…
357 address you use to sign your commits. If they don't match, the CI system will
370 repository. Use the search filters and labels to locate PRs related to changes
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
434 If you're not sure what to use, try running ``git log FILE``, where
446 -------------------
461 * **how** you know it works -- for example, which tests you ran.
464 less. Use newlines to wrap longer lines. Exceptions include lines
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]>
490 .. code-block:: none
492 Signed-off-by: Zephyr Developer <z.developer@example.com>
495 with the :ref:`DCO`. For this reason, you must use your legal name.
498 Your name and the email address you use must match the name and email
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.
549 * Use spaces instead of tabs to align comments after declarations, as needed.
550 * Use C89-style single line comments, ``/* */``. The C99-style single line
552 * Use ``/** */`` for doxygen comments that need to appear in the documentation.
554 * Avoid using non-ASCII symbols in code, unless it significantly improves
557 Use these coding guidelines to ensure that your development complies with the
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 -
578 *$ZEPHYR_BASE/.git/hooks/pre-push* executable and edit it to contain:
580 .. code-block:: bash
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
657 non-green) build.
667 -------------------
677 .. code-block:: bash
679 ./scripts/ci/check_compliance.py -c upstream/main..
682 -------
694 .. code-block:: bash
696 west twister -p native_sim -s tests/drivers/build_all/sensor/sensors.generic_test
714 dereferencing, use after free, unchecked return values, dead code, buffer
723 Static analysis of the Zephyr codebase is conducted on a bi-weekly basis. GitHub
768 https://github.com/zephyrproject-rtos/zephyr#fork-destination-box
780 <https://github.com/zephyrproject-rtos/zephyr>`_ from ``origin`` to
791 git remote -v
797 upstream https://github.com/zephyrproject-rtos/zephyr (fetch)
798 upstream https://github.com/zephyrproject-rtos/zephyr (push)
803 git checkout main
804 git checkout -b fix_comment_typo
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
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
868 git checkout main
869 git checkout -b fix_another_issue
871 and use the same process described above to work on this new topic branch.
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
910 such as not being able to use "View Changes" buttons except for the last
911 one - GitHub complains it can't find older commits. You're also not
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`_
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
963 proposal (RFC) for your work first, to be sure that we can use it. Please
973 * Motivation for or Use Case
983 When adding a new file to the tree, it is important to detail the source of
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:
1035 do so for a wide class of external Zephyr-based source code.
1041 Project maintainers should use good judgement and prioritize the Zephyr
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...)