How do I use a custom version of Zephyr with NCS?

We have our application in a git repository with a minimal west.yml as below. We want for Zephyr and have the manifest import our fork, instead of recursively getting from nrfconnect manifest. What is the syntax for that? I'd rather fork zephyr only and not whole NCS just to change the manifest.

manifest:
self:
west-commands: scripts/west-commands.yml

remotes:
- name: ncs
url-base: https://github.com/nrfconnect

projects:
- name: nrf
repo-path: sdk-nrf
remote: ncs
revision: v3.1.0
import: true
Parents
  • Solved it this way: Explicitly adding the Zephyr before NCS will override the Zephyr from NCS.

    manifest:
    self:
    west-commands: scripts/west-commands.yml

    remotes:
    - name: <own remote>
    url-base: https://github.com/<own>
    - name: ncs
    url-base: https://github.com/nrfconnect

    projects:
    - name: zephyr
    remote: <own remote>
    repo-path: zephyr
    # always point this to a tag(better) or hash, never a branch!
    revision: <own tag>
    import:
    # Recursively import these from Zephyr
    # Please keep this list sorted alphabetically.
    name-allowlist:
    - ...

    - name: nrf
    repo-path: sdk-nrf
    remote: ncs
    revision: v3.1.0
    # recursively import EVERYTHING from NCS.
    # This has lower priority than explicitly listed ones.
    # Zephyr above overrides the zephyr from NCS
    import: true
  • Out of curisosity, why do you want to do this? All wireless certifications are tied to the Zephyr version version included in nRF Connect SDK so you will now not have any Bluetooth/Matter/Thread qualifications for products.

  • Actually I'm using an internal branch based on ncs-v3.1.0 release, because some of the peripheral drivers in Zephyr are lacking. Wither no power management, or happen to lack "compatible" support for the variants we use etc.

    Instead of maintaining custom drivers in our external tree, I thought it would be more manageable to fork NCS version of Zephyr, which would also make it easy to contribute back upstream.

    Do you have a recommendation in the regulatory sense? Should we keep any custom driver developments (even things like temperature sensors) strictly out-of-tree?

  • I believe using your own fork of Zephyr is OK as long as it is based on the exact version/hash that was used in the SDK that is qualified, and you do not make any changes related to the Bluetooth stack. If so, using your approach should be OK when you just modify the custom drivers.

Reply Children
No Data
Related