Add zephyr modules which are not part of name-allowlist in NCS manifest, in a custom project

I have custom project, which utilizes manifest file to fetch nRF Connect SDK. I need to add tflite-micro module to my project, which is present in zephyr.

After some research, I found out that NCS manifest file does not import tflite-micro. NCS includes the optional group from zephyr (in which the tflite-micro module can be found), but in the name-allowlist in the NCS manifest file, tflite-micro is not present.

Currently, I see only two options to add tflite-micro support to my project:

1. In my main manifest file - add the tflite-micro module as in the optional submanifest in zephyr. This approach requires to find the exact commit hash from the corresponding zephyr version used in NCS, which is not ideal. In fact, I've tried this with NCS v2.6.2 and the hello-world sample from tflite-micro is working. For reference, this is the fragment of my project manifest file that adds tflite-micro module (extracted from https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1-2/submanifests/optional.yaml, which is used in NCS v2.6.2):

- name: tflite-micro
  revision: 1a34dcab41e7e0e667db72d6a40999c1ec9c510c
  path: modules/lib/tflite-micro
  remote: zephyr

2. Make a fork of NCS and edit its manifest file to include tflite-micro in the name-allowlist section for the zephyr project. This approach requires me to maintain my fork with the NCS changes in future, for a very small patch of the manifest file.

I am wondering if there is another solution, perhaps cleaner one, to add zephyr modules not found in name-allowlist in NCS manifest?

Or maybe there is a completely different way that I am missing.

Thank you in advance.

Related