west imports and destination paths

Marc Reilly
 

Hi all,

I like the (new?) west import feature, it makes it easy to checkout zephyr and associated modules along side an application/project.

Is there a way to specify where a 'sub-modules' of an import will end up?
At the moment it seems to just be relative to the base folder. From what I can tell, specifying a path as the import value itself is mainly concerned with how west _sources_ the import, not where it ends up.

An example, with a basic west.yml file (like Example 1.1 of current docs) which is effectively:

#west.yml
manifest:
  projects:
    - name: my-app
      remote: whatever
    - name: zephyr
      remote: as_normal
      import: true
#

when zephyr is imported, zephyr's modules end up in the 'base' west folder, like this:

.../my-project
    - west.yml
    - my-app/
    - bootloader/
    - tools/
    - modules/
    - zephyr/

But what I'd like to end up with is zephyr and submodules under their own subfolder,
something like:

.../my-project
    - west.yml
    - my-app/
    - zephyrproject/
        - bootloader/
        - tools/
        - modules/
        - zephyr/

(ie, bootloader, tools, modules, etc are all siblings of the zephyr/ folder which was the nominated import)

So I alter the path for the zephyr project in the west.wml like so:

#west.yml  v2
manifest:
  projects:
    - name: my-app
      remote: whatever
    - name: zephyr
      remote: as_normal
      import: true
      path: zephyrproject/zephyr


But what this yields is only the zephyr project ends up at the desired path, it's modules still end up in the base folder
something like this:

.../my-project
    - west.yml
    - my-app/
    - zephyrproject/
        - zephyr/
    - bootloader/
    - tools/
    - modules/

Is there a way to make it so that the zephyr imported modules end up where I want them? (eg the folders zephyr, bootloader, tools, modules etc all end up in a nominated sub folder)

Cheers,
Marc

Join devel@lists.zephyrproject.org to automatically receive all group messages.