Skip to content

Missing commits - #3

Merged
sittner merged 4 commits into
mainfrom
missing-commits
Aug 3, 2026
Merged

Missing commits#3
sittner merged 4 commits into
mainfrom
missing-commits

Conversation

@sittner

@sittner sittner commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

sittner and others added 4 commits August 3, 2026 15:35
Both boards compiled for over an hour and then failed in binary-headers:

  HOSTCC  debian/linux-headers-.../scripts/basic/fixdep
  fixdep.c:92:10: fatal error: sys/types.h: No such file or directory

install_kernel_headers in scripts/package/builddeb deliberately overrides
CC with <target>-gcc when cross compiling, so the fixdep and modpost
shipped in linux-headers are arm64 binaries that run on the Pi. That is
the only step in the whole build that compiles userspace code for the
target, and it needs libc6-dev-arm64-cross - kernel code is freestanding
and never includes libc headers, so an hour of successful kernel
compilation says nothing about it. --no-install-recommends kept it off
the runner.

Add a preflight probe that compiles a trivial program including
<sys/types.h> with the cross toolchain, which reproduces the exact error
in about a second and names the missing package. Verified both ways: it
passes with a real toolchain and fails with a stub cross gcc.

Not a problem, checked while here: the headers package also ships
resolve_btfids built for the build machine, but cmd_btf_ko skips BTF
generation when vmlinux is absent, which it is in a headers package, so
out-of-tree module builds on the Pi never execute it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`./scripts/build.sh smoke` builds a tinyconfig kernel through the
complete bindeb-pkg path in ~7 minutes cold, ~2 incremental, and then
checks what came out: the image package carries vmlinuz and a .ko, and
the headers package's fixdep is an AArch64 binary. That last assertion is
the one that was worth writing - if it ever regresses, out-of-tree module
builds on the Pi break and nothing else in the pipeline notices.

It immediately earned its keep by exposing a much worse bug in
resolve-kernel-ref.sh. The GitHub commit listing spans the whole
reachable history, so with the branch tip now at 6.18.42, v6.18.40
resolved to 6a7ecc25 - an upstream stable commit with none of the Pi
patches: no bcm2711_defconfig, no Pi drivers. The v6.18.34 resolution
reported earlier was wrong the same way. Only the fast path, where the
requested version is still at the branch tip, was ever correct.

Resolution now runs over the branch's first-parent history, every
ancestor of which is a Pi-branch commit by construction, via a
commits-only fetch (--filter=tree:0) and a binary search over the
version, and the result must contain bcm2711_defconfig. v6.18.40 now
resolves to 1047a719 ("usb: xhci: Partial revert to upstream", 6.18.40,
defconfig present) and both boards configure cleanly against it again.

The CI gates deliberately run against rpi-6.18.y rather than a pinned
version: they check that these scripts still work against the current
branch, and it avoids a history fetch in three jobs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sittner
sittner merged commit ad0e229 into main Aug 3, 2026
8 checks passed
@sittner
sittner deleted the missing-commits branch August 3, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant