config: Implemented multi-target support
With this patch support for building multiple targets in parallel with
bitbake is now supported.
Changes:
- Its now possible to state a list of targets under the target key in
the configuration file.
Example:
target:
- product-image
- product-update-image
- Its now possible to define multiple targets in the kas command line.
Example:
$ kas build --target product-image --target product-update-image \
kas.yml
- Its now possible to define multiple targets via the environment:
Example:
$ export KAS_TARGET="product-image product-update-image"
$ kas build kas.yml
Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
committed by
Daniel Wagner
parent
f7d2e5ae20
commit
ab8e4cd375
@@ -209,13 +209,19 @@ class Config:
|
||||
repo_dict[repo] = rep
|
||||
return repo_dict
|
||||
|
||||
def get_bitbake_target(self):
|
||||
def get_bitbake_targets(self):
|
||||
"""
|
||||
Return the bitbake target
|
||||
Returns a list of bitbake targets
|
||||
"""
|
||||
return os.environ.get('KAS_TARGET',
|
||||
self._config.get('target',
|
||||
'core-image-minimal'))
|
||||
environ_targets = [i
|
||||
for i in os.environ.get('KAS_TARGET', '').split()
|
||||
if i]
|
||||
if environ_targets:
|
||||
return environ_targets
|
||||
target = self._config.get('target', 'core-image-minimal')
|
||||
if isinstance(target, str):
|
||||
return [target]
|
||||
return target
|
||||
|
||||
def get_bitbake_task(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user