Repository navigation
pipeline: install the right qemu package for the x86_64 leg - #66
Open
greatbridf wants to merge 2 commits into
Open
greatbridf wants to merge 2 commits into
greatbridf wants to merge 2 commits into
Conversation
The x86_64 matrix entry installs `qemu-system-x86_64`, but Ubuntu 24.04 has no package with that name. QEMU's x86_64 emulator is shipped by `qemu-system-x86`, which only Provides `qemu-system-amd64` and `qemu-system-x86-64`. apt therefore aborts the setup step with "E: Unable to locate package qemu-system-x86_64", so Configure, build, artifact upload and the test run are all skipped. The riscv64 leg kept working by accident: `qemu-system-riscv64` is a Provides name of `qemu-system-misc`, so `qemu-system-$arch` happened to resolve there. Install the package through an explicit per-entry `qemu_pkg` field, so the package name no longer depends on QEMU's Provides aliases. The loongarch64 leg, which is still in the matrix but has no `target`/`platform` set and fails to build, falls back to `qemu-system-misc`. Drop `qemu-kvm` from the install line: it only resolved as a Provides alias of `qemu-system-x86`, and the test step already forces `QEMU_ACCEL: ''`, so KVM is never used. Fixes: 731798d ("pipeline: remove loongarch64 and add x86 build and test") Signed-off-by: greatbridf <greatbridf@icloud.com>
With the QEMU step fixed, the x86_64 leg gets past Configure and fails one
step later while building the boot image:
CARGO_TARGET_DIR=build cargo objcopy -q ... -- -O binary -j .mbr \
build/mbr.bin
error: no such command: `objcopy`
make: *** [Makefile:182: build/mbr.bin] Error 101
`build/mbr.bin`, `build/stage1.bin` and `build/kernel.bin` are produced with
`cargo objcopy`, which comes from cargo-binutils. The riscv64 leg never
needed it because it boots the ELF kernel directly with `-kernel`.
Install cargo-binutils in CI. `llvm-tools` (needed by cargo-objcopy) is
already installed by the preceding step.
Fixes: 731798d ("pipeline: remove loongarch64 and add x86 build and test")
Signed-off-by: greatbridf <greatbridf@icloud.com>
greatbridf
force-pushed
the
fix/x86-pipeline
branch
from
October 27, 2026 17:19
c2c1db0 to
b543cae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
x86_64CI leg never got past setup: first Setup QEMU failed withE: Unable to locate package qemu-system-x86_64, and once that is fixed thebuild fails in build/mbr.bin with
error: no such command: objcopy. Bothare missing CI dependencies, not kernel problems. The
loongarch64leg isleft exactly as it is on
master(still failing its build).Root cause
matrix arch,
qemu-system-${{ matrix.arch }}. That only works forriscv64by accident: there is noqemu-system-riscv64package, butqemu-system-miscProvides:that name, so apt resolves it. Forx86_64the generated name
qemu-system-x86_64is provided by nothing —qemu-system-x86onlyProvides:qemu-system-amd64,qemu-system-x86-64andqemu-kvm(hyphen, not underscore). apt aborts,and Configure, build, artifact upload and the test run are all skipped.
cargo objcopy. With QEMU available, the image build reachesmake build/mbr.bin, which runscargo objcopy. That subcommand comesfrom cargo-binutils, which CI never installs. The riscv64 leg never needed
it because it boots the ELF kernel with
-kernel.Fix
qemu_pkgto each matrix entry (qemu-system-riscv64forriscv64,
qemu-system-x86for x86_64) and install${{ matrix.qemu_pkg || 'qemu-system-misc' }}. The||default keeps theloongarch64leg installing a QEMU capable of runningloongarch64(as onmaster, where the alias resolved toqemu-system-misc) without touchingthat entry.
llvm-tools(needed bycargo-objcopy) is already installed by the preceding step.
qemu-kvmis dropped from the install line: it only resolved as aProvidesalias ofqemu-system-x86, and the test step already forcesQEMU_ACCEL: '', so KVM is never used.The
arch: [riscv64, loongarch64]matrix list is unchanged.Verification
noblemain/binary-amd64package metadata:qemu-system-x86:Provides: qemu-kvm, qemu-system-amd64, qemu-system-any, qemu-system-i386, qemu-system-x86-64— noqemu-system-x86_64.qemu-system-misc:Provides: ... qemu-system-loongarch64, qemu-system-riscv64 ....riscv64passed Setup QEMU,x86_64failed atSetup QEMU.
c2c1db0(QEMU fix only): x86_64 Setup QEMUsucceeded, and the build failed at
build/mbr.binwitherror: no such command: objcopy— this PR's second commit.b543cae(this branch, both commits):build-and-run-test (riscv64)— successbuild-and-run-test (x86_64, qemu-system-x86, x86_64-unknown-none, acpi_compat)— success: Setup QEMU, build, artifact upload andTest 7185 with ARCH=x86_64 passedall greenbuild-and-run-test (loongarch64)— still fails, at the same build step ason
master, oneonix_halerrors (unresolved imports eonix_mm::paging::{NoAlloc, Page},E0437/E0050/E0046onRawTrapContext/TrapReturn). That is the pre-existing leg state and isuntouched by this PR.
/usr/sbin/fdisk),mkfs.fatandkillallare present on therunner, as the successful riscv64 run shows.
this PR are the verification.
Fixes: 731798d ("pipeline: remove loongarch64 and add x86 build and test")