Re: [Zephyr-devel] [Zephyr-users] Introducing west, Zephyr's meta-tool

Luiz Augusto von Dentz

Hi Carles,

On Mon, Jan 28, 2019 at 10:54 PM Cufi, Carles <> wrote:

Hi Luiz,

-----Original Message-----
From: <> On
Behalf Of Luiz Augusto von Dentz
Sent: 28 January 2019 21:00
Subject: Re: [Zephyr-devel] [Zephyr-users] Introducing west, Zephyr's

Hi Carles,

How about pull request, how does west deals with them? Or it doesn't and
which case we have to deal with individual git repositories and issue
git push ourselves? This looks like repo which I never liked.
You can see that dealing with Pull Requests is listed as an unresolved issue in the description here:

There are several possibilities to deal with this, but first and since that you mention Google repo let me make an important distinction. With repo you typically (though not always) track the tip of master on multiple repositories. With west, although that is also possible, we will require specific SHAs for all repos (projects) that are not the main zephyr repo (i.e. the manifest repo).

Options we have (informally, in calls and chats) considered:
1. Send 2 PRs to the 2 repos affected (say for example zephyr + mbedtls), where the branch name used matches. Then CI running in zephyr could look at all repositories listed in the manifest and check if an outstanding PR for it exists with the same GitHub username and branch name.
2. Send the PR to the external project (mbedtls in our example) and another PR to zephyr with the manifest modified so that it points to the fork and branch name of the project's PR. When those are merged, CI could then replace the contents of the manifest with the proper SHA.
3. Introduce some sort of per-PR ChangeId that CI knows how to parse.
4. GitHub adds support for cross-repository PRs. There have been multiple hints that this is coming, but obviously we cannot know when, if ever, this feature will be available.
From these alternatives I only see 4 really working in practice, but
it is limited to repositories being in github in which case the PR
requests can perhaps be generated from a single clone and github could
then forward to each individual project but still tracking on the
original. For other options even if west learn how to properly
separate each PR the user still needs its own repository for each of
those if they are hosted in github which would have to be tracked
individually, or in case it is not hosted in github it may have to
deal with mailing list, gerrit, etc.

Note that we have not at any point considered moving away from GitHub. The plan is to adapt to what the service offers and try to find a solution that works well with it. This is also one of the reasons we are first introducing west without actually splitting the ext/ folder into multiple external repos: we want to expose users to west before we start doing more radical changes.
Well good, though Im not sure what problem does west solves then? For
pulling it sounds like submodules is the preferable solution (to linux
folks at least):

Ideas and feedback welcome!



On Mon, Jan 28, 2019 at 10:43 AM Cufi, Carles
<> wrote:

Hi all,

For a few months now we have been working on a meta-tool named west,
designed to act both as a command-line tool to build, flash an debug
Zephyr-based applications and also to manage the additional Git
repositories that Zephyr will require in order to build in the near

West is written in Python 3, lives in its own repository [1] and its
bootstrapper is available on PyPi [2].
As soon as we merge the topic-west [3] branch into master (which
should happen in the next few days) you will need to install west in
order to flash and debug, since those commands will rely on havig west
present as part of your Zephyr workflow.

The updated west documentation will be online in the Zephyr
documentation website [4] as soon as the topic-west branch is merged
into master. In the meantime you can also look at the unrendered
documentation sources in the topic-west branch [5] and the existing
GitHub issues [6][7].

In order to install the west boostrapper (which you can do today) run:

# On Linux
pip3 install --user west

# On macOS and Windows
pip3 install west

Once the west bootstrapper is installed and the topic-west branch is
merged into master, you will have 2 choices to get a west main

1. Clone a new copy of the zephyr repository using west:

west init zephyrproject
cd zephyrproject
west update

2. Install west around an existing local zephyr clone:

Move the cloned zephyr/ repository to an empty enclosing folder (for
example zephyrproject/zephyr/), and from this enclosing folder
zephyrproject/ run:

west init -l zephyr/
west update
The -l <path to zephyr> parameter instructs west to use an existing
local copy instead of cloning a remote repository.

Feedback and patches are welcome, but note that the feature will
likely be merged as-is since we consider we have left ample time to
raise any major issues regarding the workflow and decisions taken during
the development of west. This is however only the beginning of west's
(hopefully) long existence as the Zephyr command-line meta-tool, and it
will certainly evolve and change considerably in the future with the
help of the community.

Please submit feedback in the form of GitHub issues on the west
repository itself [1] unless it affects features or functionality in the
zephyr repository directly.

I will reply to this email once the topic-west branch is merged into

Thank you to everybody who has contributed so far!



/west [6]

Luiz Augusto von Dentz

Luiz Augusto von Dentz

Join to automatically receive all group messages.