cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

[DEV] Support multiple targets #106

Closed Louson closed 2 years ago

Louson commented 2 years ago

Enable the build of several targets in the same build directory. The field 'target' in the menu can be a single string or an array of string. If given an array, all entries will be built (the build order is undefined).

This does not affect the previous 'target' behaviour.

Louson commented 2 years ago

Linked to issue #103

Louson commented 2 years ago

An undefined behavior remains concerning the inheritance:

Inherit from a virtual build configuration an set a bitbake target

This removes the virtual bitbake target

Inherit from a normal build configuration and set a bitbake target

This removes previous targets, but maybe we want to merge them ?

Inherit from multiple virtual build configurations

Should we merge all bitbake targets ?

Inherit from multiple build configurations with at least one non virtual

Should we merge all non virtual bitbake targets ?

pboettch commented 2 years ago

An undefined behavior remains concerning the inheritance:

Inherit from a virtual build configuration an set a bitbake target

This removes the virtual bitbake target

Inherit from a normal build configuration and set a bitbake target

This removes previous targets, but maybe we want to merge them ?

Inherit from multiple virtual build configurations

Should we merge all bitbake targets ?

Inherit from multiple build configurations with at least one non virtual

Should we merge all non virtual bitbake targets ?

I think targets should be overridden by the final build. As you have done your implementation.

Parent build-targets have most like no sens in this inherited build-configuration. At least not for image-targets.

What is actually your use-case? What are the multiple targets you are building within one build-config/build-dir using the same local.conf and thus machine.conf etc. I only can think of non-image-targets. Please enlighten us.

Louson commented 2 years ago

Well, there is nothing I want to do with inheritance. I was just wondering.

In my case I am creating training courses. I will use the beaglebone for all projects. I'd like to build them all together.

pboettch commented 2 years ago

After discussing with @cpb- we understood that currently the target-field is overwritten if a parent has it. Your patch does the same with list of targets. So it's fine, let's discuss this in another thread or issue if this needs a change.

pboettch commented 2 years ago

Regarding your multiple targets. You are build several images with the same machine.conf? Is that what you're saiing?

Louson commented 2 years ago

Yes, same machine.conf, same local.conf, same layers

pboettch commented 2 years ago

Just with different package selections, or something different?

Louson commented 2 years ago

Mainly. More generally, I would say whatever can be defined in your .bb