Re: ELC-E Zephyr Multiimage BoF - Bob Build Tool

Jan Kloetzke <jan@...>

On Mon, Nov 04, 2019 at 10:34:37PM +0000, Bolivar, Marti wrote:
"Jan Kloetzke via Lists.Zephyrproject.Org"
<> writes:

On Fri, Nov 01, 2019 at 09:24:59AM +0000, Bolivar, Marti wrote:
"Jan Kloetzke via Lists.Zephyrproject.Org"
<> writes:

Hi Kumar,

On Wed, Oct 30, 2019 at 02:05:36AM -0500, Kumar Gala wrote:

On Oct 29, 2019, at 5:08 AM, jan@... wrote:


I think the
example is the most interesting one to the Zephyr community (even
though it's using FreeRTOS+Linux at the moment).

If you guys have a particular example that already builds multiple
dependent Zephyr images then we can try to setup some Bob recipes
that builds the same thing...

You can take a look at the open-amp sample, it creates 2 zephyr images:
I'm currently preparing some recipes. It will post them with some
instructions how to build in the next days once I got it working...
Ok, here it is:

There is a with a short overview. Basically you just have to
clone the recipes and build it:

$ git clone \
$ cd zephyr-example-recipes
$ bob dev demo::zephyr -j

Make sure that you have the latest version of Bob. The demo recipes use
the "layers" feature that has not been released yet. It's best to
install Bob via:

$ pip3 install [--user] git+

Otherwise have a look at

for further options.

Note that the recipes do not use west but clone the involved
repositories directly and calls cmake itself. This has the advantage
that there is only one tool that fetches/updates sources.
Seems like zephyr.yaml is the file controlling this in a map called
checkoutSCM. (I haven't read the bob docs, but I'm sure that's covered
Yes, that's correct. It's covered here:

I made a quick hack west extension to convert the upstream zephyr
manifest into the format used there, in case it's useful:


$ west gen-bob-checkout
- commit: 07380358424edecdefeb28ed7cb43e27b530014d
dir: zephyr
scm: git
- commit: 04ff67a0826a51041e51034faf8fc4d3eeacd846
dir: modules/hal/atmel
scm: git
- commit: e01f3bce2a94847253369efb9a081f5c0e9ec882
dir: tools/ci-tools
scm: git
- commit: 99129c5efc907ea613c4b73ccff07581feb58a7a
dir: modules/lib/civetweb
scm: git

Just in case it's useful to anyone who wants all the projects but
doesn't want to do the paperwork themselves.
That looks indeed useful.

I was wondering if there is a way to select only the needed
repositories? West seems to always clone all known projects up-front.
OTOH Bob's approach is normally to checkout the sources individually for
each project and then build these individually. AFAICT this won't work
for Zephyr because all repositories must be present to be gathered in
one large CMake project. So the structure ends up with a single large
source package. Are there any plans to make this more modular in the

the OpenAMP sample was put into a dedicated repository because some
refactoring was needed, namely removing the "ExternalProject" link
between the images.

The recipes also show how a toolchain is defined in the recipes. There
is no need for the user to install a toolchain but the right one is
brought in by the recipes automatically. Usually this is done with all
involved tools to maximize reproducibility but this would have just made
the example more complicated.

Sounds great!

Please be aware of this in that case:

It would be good to see a solution that doesn't have this issue.
This is handled well by Bob. The explicit goal of Bob is to feel like
"make" even though Bob controls the build of whole packages.

Have fun.


Join to automatically receive all group messages.