Skip to content

[eve-kernel-riscv64-v6.1.38-generic] Backport #228 #229#234

Open
rucoder wants to merge 5 commits intolf-edge:eve-kernel-riscv64-v6.1.38-genericfrom
rucoder:backport/gha-lk-builder-riscv64-v6.1
Open

[eve-kernel-riscv64-v6.1.38-generic] Backport #228 #229#234
rucoder wants to merge 5 commits intolf-edge:eve-kernel-riscv64-v6.1.38-genericfrom
rucoder:backport/gha-lk-builder-riscv64-v6.1

Conversation

@rucoder
Copy link
Copy Markdown
Collaborator

@rucoder rucoder commented Mar 31, 2026

Summary

Backport of two PRs from eve-kernel-amd64-v6.12.49-generic to eve-kernel-riscv64-v6.1.38-generic:

Makefile.eve commits cherry-picked from the jp6 backport (PR #231); GHA commits adapted from jp6 backport with riscv64-specific branch names and runner labels.

Key adaptations for riscv64-v6.1.38-generic

  • No matrix / no KERNEL_CONFIG_FLAVOR — single kernel build (kernel-gcc)
  • Split publish.yml into two workflows:
    • pr-build.ymlon: pull_request, build-only, targeted cleanup
    • publish.ymlon: push, build + push + targeted cleanup
  • runner-xl, Linux runner labels
  • Simplified image tags — no flavor prefix
  • Added Docker Hub pull login step (was missing on the original riscv64 workflow)

Changes

From PR #228

  1. Replace go install linuxkit acquisition with flexible two-mode mechanism (build from pinned commit or download release binary)
  2. Pin linuxkit to upstream master tip (3bf33c3a11fc)
  3. Switch kernel-build-% from docker buildx build to linuxkit pkg build; add build.yml
  4. Remove manual BuildKit builder management (ensure-builder, BUILD_KIT_VERSION)

From PR #229

  1. Pin actions/checkout to v6.0.2 and docker/login-action to v4.0.0 (commit SHAs)
  2. Add clean-gcc/clean-clang Makefile targets for targeted image removal
  3. Add BuildKit cache pruning with configurable BUILDKIT_KEEP_STORAGE_MB quota
  4. Remove unnecessary Docker Hub login from PR builds

🤖 Generated with Claude Code

rucoder added 5 commits March 31, 2026 13:11
Replace the single release-download-only linuxkit path with a two-mode
acquisition mechanism:

  1. LINUXKIT_GIT_URL + LINUXKIT_GIT_REF (commit hash) — clone the repo
     at the pinned commit and build the binary.  The short SHA is used as
     the versioned binary name (/tmp/linuxkit-<sha12>) so make skips the
     clone+build if the binary already exists.
  2. LINUXKIT_GIT_URL unset (default) — download the upstream release
     binary, same as before.

Both LINUXKIT_GIT_URL and LINUXKIT_GIT_REF default to empty so existing
CI behaviour is unchanged until the pin commit is added on top.

Drop the manual buildkit builder management: remove BUILD_KIT_VERSION,
BUILD_KIT_BUILDER, and the ensure-builder target entirely.  Current
linuxkit creates and manages the builder container automatically when
needed, so pre-creating it is no longer required.  Remove the
--builder= flag from docker buildx build and the | ensure-builder
order-only prerequisite from kernel-build-%.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Set LINUXKIT_GIT_URL and LINUXKIT_GIT_REF to build linuxkit from a
pinned upstream commit rather than downloading a release binary.

Pinned to the same commit used by the EVE repo (mk/linuxkit.mk):
  https://github.com/linuxkit/linuxkit @ 3bf33c3a11fc

Update by running:
  git ls-remote https://github.com/linuxkit/linuxkit master

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Switch kernel-build-% from docker buildx build to linuxkit pkg build.
linuxkit pkg build manages its own moby/buildkit builder container
automatically, avoiding the docker-driver limitation that prevented
--sbom=true from working after ensure-builder was removed.

The OCI tarball intermediate file is also eliminated — linuxkit pkg build
writes directly to the linuxkit content-addressable cache, from which the
existing push-image-% target already reads.

Add build.yml with org/image descriptor required by linuxkit pkg build.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
- actions/checkout: v3 -> v6.0.2 (de0fac2e4500dabe0009e67214ff5f5447ce83dd)
- docker/login-action: v3 -> v4.0.0 (b45d80f862d83dbcd57f89517bcf500b2ab88fb2)

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
- Replace nuclear 'docker system prune -af' and 'docker volume prune -af'
  with targeted removal of only the image we just built
- Add clean-gcc/clean-clang Makefile targets that remove specific image
  from both linuxkit cache and docker
- Add BuildKit cache pruning with configurable quota via BUILDKIT_KEEP_STORAGE_MB
  env var (defaults to 32000 MB) to prevent unbounded disk growth
- Print BuildKit disk usage before pruning for diagnostics
- Use buildctl inside linuxkit-builder container for cache management
- Add pr-build.yml for PR builds (on: pull_request)
- Restructure publish.yml for push-only trigger
- Remove unnecessary Docker Hub login from PR builds

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@rucoder rucoder requested a review from rene March 31, 2026 13:38
@rene
Copy link
Copy Markdown
Collaborator

rene commented Mar 31, 2026

@rucoder this branch is locked.

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.

2 participants