All of lore.kernel.org
 help / color / mirror / Atom feed
* kci_build proposal
@ 2020-04-20 16:36 Dan Rue
  2020-04-21 15:46 ` Guillaume Tucker
  0 siblings, 1 reply; 23+ messages in thread
From: Dan Rue @ 2020-04-20 16:36 UTC (permalink / raw)
  To: kernelci

Hey Everyone!

I've been working on a kernel building service/api that's designed to perform
massive numbers of builds. The actual kernel build implementation reuses
kernelci's kci_build script.

So far we have not had to modify kernelci-core's kci_build, but we're
approaching a point where we think we're going to have to modify it
fundamentally to meet our needs. I would really like to continue sharing a
build implementation with kernelci, but some of the changes needed are
architectural in nature, and so I'd like to share a brief proposal for
consideration:

Standalone python-based kernel builder with the following properties:
- Independent python package (library and cli) that only does a local kernel
  build
- Takes as arguments things like architecture, toolchain, kernel config, etc.
- Dockerzed toolchain environments are supported directly (e.g. it will run
  "docker run make")
- Builds are done within the context of an existing kernel tree (doing git
  checkout, git fetch, etc are out of scope)
- Artifacts go to some named or default directory path. Uploading them
  elsewhere is out of scope.
- Exception handling is built in and makes it usable as a python library
- Logging is built in with flexibility in mind (log to console, verbose or
  silent, log to file, etc.)
- Simple, one-line dockerized reproducers are given as a build artifact, for
  reproducing builds locally.
- Partial build failure support - e.g. what if kselftest fails but the rest of
  the build passes?
- Rigorous unit testing
- Implementation is modular enough to support things like a documentation build
  and other targets in the tree such as various tools/, sparse checker,
  coccinelle, etc.
- Support for kernel fragement files or urls in addition to supporting
  individual kernel config arguments

Use Case Examples:
- Install using pip, build using the cli interface
  - "pip install --user kernel-builder; cd linux; kernel-builder --arch arm64 --toolchain clang-9"
- Run using a published docker container. This example would need permission to
  launch additional docker containers to perform the build steps.
  - "docker run kernel-builder --arch arm64 --toolchain clang-9"
- Install using pip, and use it from python as a library
  - "import kernel-builder"

In the example above, "kernel-builder" is a placeholder for whatever the name
would be.

The artifacts produced would be similar to the set of artifacts kci_build
produces today, with the addition of a build reproducer script and probably
some differences in metadata files.

Docker support would be optional (you could use a locally installed toolchain),
but allows for arbitrary toolchains to be available and perfect
reproducibility.

It's hard to change kci_build to be anything like this because it's tightly
coupled with the kernelci-core repo, and kernelci itself. The design above also
fundamentally changes how the builder interfaces with docker, such that it
becomes supported directly rather than something that's implemented outside the
scope of the builder.

It's important that docker is supported directly because it makes the
reproducible build use-case a one-liner, it solves the problem of having to get
python and the builder into the build containers, and it allows for more
granular control of the build.

So, thoughts? How close or how far is this from the roadmap for kci_build as it
stands today? We are likely to start working on this soon, and would really
like to work together on it if possible.

Thanks for your feedback,
Dan

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

end of thread, other threads:[~2020-06-23 23:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 16:36 kci_build proposal Dan Rue
2020-04-21 15:46 ` Guillaume Tucker
2020-04-21 15:53   ` Mark Brown
2020-04-21 17:32     ` Dan Rue
2020-04-21 17:28   ` Dan Rue
2020-05-22 18:22     ` Kevin Hilman
2020-05-27 19:58       ` Dan Rue
2020-05-28  6:43         ` Guillaume Tucker
2020-05-28 17:28           ` Dan Rue
2020-05-28 21:03             ` Guillaume Tucker
2020-05-29 15:53               ` Dan Rue
2020-06-15 13:22                 ` "Audience"/"Guest" can join for this meeting running on 23rd? koti koti
2020-06-16 16:16                   ` Mark Brown
2020-06-17  1:49                     ` koti koti
2020-06-17 10:31                       ` Mark Brown
2020-06-17 10:55                         ` koti koti
2020-05-28 23:31             ` kci_build proposal Kevin Hilman
2020-05-29  7:42               ` Mathieu Acher
2020-05-29 10:44                 ` Mark Brown
2020-05-29 14:27                 ` Guillaume Tucker
2020-06-16 16:33                 ` Nick Desaulniers
2020-06-23  7:28                   ` Mathieu Acher
2020-06-23 23:48                     ` Nick Desaulniers

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.