All of lore.kernel.org
 help / color / mirror / Atom feed
* proposal: build pipelines in bitbake-setup
@ 2026-05-05 10:17 Alexander Kanavin
  2026-05-05 16:17 ` [Openembedded-architecture] " Trevor Gamblin
  2026-05-07 12:36 ` [bitbake-devel] " Ross Burton
  0 siblings, 2 replies; 12+ messages in thread
From: Alexander Kanavin @ 2026-05-05 10:17 UTC (permalink / raw)
  To: openembedded-architecture, bitbake-devel, Yocto-mailing-list; +Cc: Zhangfei Gao

Hello,

bitbake-setup currently doesn't support describing build pipelines: a
sequence of commands that actually produce something useful. For a
true end-to-end solution this gap should be filled.

Here's my proposal, which probably has obvious shortcomings, that I
would like to hear about :)

0. Design goals:

- something suitable for most situations, including newcomers running
a local build, and CI doing a nightly job
- avoid custom scripts in most situations
- self-documented; everything must be described
- extensible; if there's something missing that no one thought about,
it can be added later in a way that supplements existing features
without replacing them.

1. Specification in a build configuration would look like this:

"build-targets": {
    "steps" : [
        { "name": "build-apple", "description": "Build an apple for
the purpose of making apple pie", "command": "bitbake apple-image"},
        { "name": "build-orange", "description": "Build an orange for
the purpose of making orange juice", "command": "bitbake
orange-image"},
        { "name": "test-apple", "description": "Test an apple using
testimage class", "command": "bitbake -c testimage apple-image"},
        { "name": "test-orange", "description": "Test an orange using
testimage class", "command": "bitbake -c testimage orange-image"},
        { "name": "qemu-console", "description": "Start the last built
image in qemu with console UI", "command": "runqemu kvm snapshot
nographic"},
        { "name": "publish", "description":"Copy build artefacts to a
public download server", "command":
"path/to/publish-image-executable"}
    ],
    "pipelines": [
        {"name": "publish-apple", "description": "Build, test, and
publish apple (requires publishing rights on the download server)",
"steps": ["build-apple", "test-apple", "publish"]},
        {"name": "publish-orange", "description": "Build, test, and
publish orange  (requires publishing rights on the download server)",
"steps": ["build-orange", "test-orange", "publish"]},
        {"name": "qemu-apple", "description": "Build and start apple
in qemu with console UI", "steps": ["build-apple", "qemu-console"]},
        {"name": "qemu-orange", "description": "Build and start orange
in qemu with console UI", "steps": ["build-orange", "qemu-console"]}
    ]
}

Configurations would include a list of possible pipelines:
        "configurations": [
        {
            "name": "fruitgarden",
            "description": "Alex's fruit garden",
            "bb-layers": ["meta-fruit"],
            "oe-fragments": [ "distro/fruit-garden", "machine/earth" ],
            "pipelines": ["qemu-apple", "qemu-orange",
"publish-apple", "publish-orange"]
        }

2. Nomenclature:

- "step" is a single command that is also given a short name and a
longer description. Steps are building blocks for pipelines and can't
be individually executed.
- "pipeline" is a sequence of steps, that is also given a short name
and a longer description. Pipelines can mix and match defined steps as
they please.
- each configuration includes a list of possible targets, and once it
is set up, any of them can be executed (see below for the UI).

3. User Interface to pipelines

Once there is a setup, there are two ways to execute a pipeline:

a) For each pipeline there is a shell script that can be run directly:

/path/to/bitbake-builds/fruitgarden/qemu-apple
/path/to/bitbake-builds/fruitgarden/publish-apple
etc.

qemu-apple script would look something like:

#!/bin/sh
# Build and start apple in qemu with console UI
. init-build-env
# Build an apple for the purpose of making apple pie
bitbake apple-image
# Start the last built image in qemu with console UI
runqemu kvm snapshot nographic

e.g. assembled from pipeline steps and their descriptions.

b) Interactive UI :'bitbake-setup build'

This would present an interactive UI similar to 'bitbake-setup init', e.g:
$ bitbake-setup build
Available build pipelines:
1. qemu-apple  Build and start apple in qemu with console UI
2. qemu-orange Build and start orange in qemu with console UI
... etc
Please choose one of the above: 1

The following commands will be executed:
# Build an apple for the purpose of making apple pie
bitbake apple-image
# Start the last built image in qemu with console UI
runqemu kvm snapshot nographic

Proceed? [y/N]
etc.

4. Implementation

This should actually be fairly straightforward. There's no need to add
new features to bitbake (e.g. 'standard target definitions' in layers
was considered at some point, but after more consideration I think it
can be postponed or perhaps altogether avoided), or modify oe-core.

Alex


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-05-07 13:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 10:17 proposal: build pipelines in bitbake-setup Alexander Kanavin
2026-05-05 16:17 ` [Openembedded-architecture] " Trevor Gamblin
2026-05-05 18:42   ` Alexander Kanavin
2026-05-06 10:23     ` Daiane Angolini
2026-05-06 12:43       ` Alexander Kanavin
2026-05-06 13:29         ` Trevor Gamblin
2026-05-06 14:02           ` Daiane Angolini
2026-05-06 14:22             ` Alexander Kanavin
2026-05-07 12:36 ` [bitbake-devel] " Ross Burton
2026-05-07 13:13   ` Alexander Kanavin
2026-05-07 13:20     ` [Openembedded-architecture] " Richard Purdie
2026-05-07 13:51       ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.