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


Bolivar, Marti
 

Hi,

"Jan Kloetzke via Lists.Zephyrproject.Org"
<jan=kloetzke.net@...> writes:

On Mon, Nov 04, 2019 at 10:34:37PM +0000, Bolivar, Marti wrote:
I made a quick hack west extension to convert the upstream zephyr
manifest into the format used there, in case it's useful:

https://github.com/mbolivar/tree/bob-the-builder

Example:

$ west gen-bob-checkout
checkoutSCM:
- commit: 07380358424edecdefeb28ed7cb43e27b530014d
dir: zephyr
scm: git
url: https://github.com/zephyrproject-rtos/zephyr
- commit: 04ff67a0826a51041e51034faf8fc4d3eeacd846
dir: modules/hal/atmel
scm: git
url: https://github.com/zephyrproject-rtos/hal_atmel
- commit: e01f3bce2a94847253369efb9a081f5c0e9ec882
dir: tools/ci-tools
scm: git
url: https://github.com/zephyrproject-rtos/ci-tools
- commit: 99129c5efc907ea613c4b73ccff07581feb58a7a
dir: modules/lib/civetweb
scm: git
url: https://github.com/zephyrproject-rtos/civetweb
[...]

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.
Plain "west update" updates all the repositories. You can say "west
update project-1 project-2 ..." to just work on a subset of them.

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
future?
If you have cloned all the modules your application needs to build,
you're fine. You don't need to download all of them.

Indeed, you don't need west at all if you manually set ZEPHYR_MODULES
before building:

https://docs.zephyrproject.org/latest/guides/west/without-west.html#specifying-modules

But west doesn't manage dependencies between repositories. That would
take it into package manager territory. We are staying away from that
as a design decision.

It's up to the user to either manage their application's dependencies
explicitly, or just fetch the kitchen sink. Either way, Kconfig
ultimately controls what gets built into the final firmware image.

Marti

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