|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH test-artifacts] Build minimal images with Buildroot
On 1/10/26 14:32, Andrew Cooper wrote: On 01/10/2026 12:52 pm, Titouan Christophe wrote:Add a way to build minimal Xen + Linux dom0 images, and their corresponding cross-compilation toolchains with Buildroot [1]. This effectively provides a consistent cross-architecture development environment. Buildroot is a project that makes it easy to build embedded system images, including Linux, Xen or bootloaders. Leverage that build system to build minimal images for use in the CI environment of Xen sub-projects, namely Unikraft. This approach is based on a Buildroot External tree [2] which currently only provides 2 target defconfigs (arm64 and x86_64, both running on qemu). It uses a recent development version of Buildroot that integrates changes to build Xen on x86_64 [3], on its latest official version 4.22.0 [4]. It also includes the latest kernel (linux-7.2.7 at the time of writing). As a byproduct, aside xen+kernel+rootfs, we also get a cross-compilation toolchain (that runs on x86_64 hosts). This makes it easy to cross-compile domUs for arm64, and it alleviates dynamic libraries mismatches when adding userspace programs to the dom0 Linux image. As an example, one such problem: Alpine linux is based on musl while your regular development computer is probably based on glibc, which causes issues if you are recompiling `xl` and try to use it in the Alpine image. [1] https://buildroot.org/ [2] https://buildroot.org/downloads/manual/manual.html#outside-br-custom [3] https://gitlab.com/buildroot.org/buildroot/-/commit/0bf8b2ecee6b1b41746e8863b57c2c5ba3a623b1 [4] https://gitlab.com/buildroot.org/buildroot/-/commit/a962be2eea146e06661712159698bc7cbf3305f2 This work is derived from this original series: https://gitlab.com/xen-project/fusa/unikraft/-/merge_requests/1 Signed-off-by: Titouan Christophe <titouan.christophe@xxxxxxx>Thankyou for your submission. Hi Andrew, and thank you for having looked so quickly into this patch. How are you intending to use this image? There's no consumer shown, so it's hard to judge the patch. The goal is to obtain a `binaries` directory containing xen, linux and its rootfs; as well as the corresponding cross-compilation toolchain (either additional linux applications, or "bare" domUs to run with Xen). Concretely, my next step would be to use that in Unikraft's CI in the following manner: 1. Download the latest binaries from test-artifacts (that should provide the latest Xen and a suitable linux) 2. Cross-compile a Unikraft application3. Launch it on Xen, and assert expected output (similarly to the smoke tests in https://gitlab.com/xen-project/xen/-/tree/staging/automation/scripts) Therefore, Xen serves as a base platform for the above, and it feels like a stretch to have to recompile it from scratch in Unikraft's CI. Perhaps there are other projects that could benefit from this ? As far as I understand, all Xen tests are currently run on their native architecture (ie. arm64 runs on arm64 hosts etc...), and I had some trouble adding programs to the alpine images due to dynamic libraries mismatches (musl vs. glibc for example). One thing I see is that it intentionally embeds a fixed kernel and (commented but not actually added yet) Xen, and I'm not sure that's a route we want to go down. Nit: Xen IS actually included, not sure to which commented section you are referring ? As for compiling the binary somewhere and copying it to a different environment, we have build containers for that, and I don't see how using buildroot changes the problem. As you might guess, I'm quite new to the Xen Project :) Are these "build containers" the ones obtained in the test-artifacts repository ? If not, where are they coming from, and how are they created ? ~Andrew Kind regards, Titouan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |