Skip to content

Conversation

@tomassrnka
Copy link
Member

@tomassrnka tomassrnka commented Feb 9, 2026

Summary

  • Add arm64 kernel configs (configs/arm64/) based on upstream Firecracker aarch64 reference config, with E2B-specific additions (NFS v3, WireGuard, NFSD)
  • build.sh: TARGET_ARCH env var (x86_64 default, arm64), cross-compiles via gcc-aarch64-linux-gnu when building on x86_64 hosts
  • Makefile: build-arm64 convenience target
  • GH Action: matrix strategy builds both architectures in parallel, merges artifacts before publish

arm64 kernels output to builds/vmlinux-{version}/arm64/vmlinux.bin, so GCS gets:

kernels/vmlinux-6.1.102/vmlinux.bin        # x86_64 (unchanged)
kernels/vmlinux-6.1.102/arm64/vmlinux.bin  # arm64 (new)

Test plan

  • Verify GH Action builds both x86_64 and arm64 kernels successfully
  • Verify arm64 kernel binary is valid: file vmlinux.binELF 64-bit LSB ... ARM aarch64
  • Boot arm64 kernel in Firecracker on ARM64 host

Note

Medium Risk
Changes the kernel build/publish pipeline and output layout, so misconfiguration could break CI releases or downstream consumers despite legacy x86_64 compatibility handling.

Overview
Adds ARM64 kernel build support by introducing configs/arm64/* and updating build.sh to build per-architecture via TARGET_ARCH (including optional cross-compilation on x86_64 hosts).

Updates the GitHub Actions workflow to run a build matrix for x86_64 and arm64, upload per-arch artifacts, then on main download/merge those artifacts and publish to GCS and GitHub Releases with arch-aware asset naming while keeping legacy x86_64 output paths for compatibility. Also adds a make build-arm64 convenience target.

Written by Cursor Bugbot for commit 8f588da. This will update automatically on new commits. Configure here.

Copy link
Member

@jakubno jakubno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small nit

It would required changes in infra as well though, but imho it'd make it easier than having IFs everywhere

build.sh Outdated
Comment on lines 35 to 39
if [[ "$TARGET_ARCH" == "arm64" ]]; then
cp ../configs/arm64/"${version}.config" .config
else
cp ../configs/"${version}.config" .config
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it make sense to simplify

Suggested change
if [[ "$TARGET_ARCH" == "arm64" ]]; then
cp ../configs/arm64/"${version}.config" .config
else
cp ../configs/"${version}.config" .config
fi
cp ../configs/"$TARGET_ARCH"/"${version}.config" .config

build.sh Outdated
echo "Copying finished build to builds directory"
mkdir -p "../builds/vmlinux-${version}"
cp vmlinux "../builds/vmlinux-${version}/vmlinux.bin"
# Output path: arm64 builds go into a subdirectory to distinguish from x86_64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could simplify here, if you change as suggested

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Move x86_64 configs to configs/x86_64/ (keep legacy configs/ for now)
- Add arm64 configs in configs/arm64/ (Firecracker reference + NFS v3, WireGuard, NFSD)
- build.sh: TARGET_ARCH env var, configs from configs/{arch}/, cross-compile support
- x86_64 outputs to both legacy path and x86_64/ subdir for backwards compat
- GH Action: matrix build for both architectures, merged artifacts

Output structure:
  builds/vmlinux-{ver}/vmlinux.bin          # x86_64 legacy (backwards compat)
  builds/vmlinux-{ver}/x86_64/vmlinux.bin   # x86_64 new
  builds/vmlinux-{ver}/arm64/vmlinux.bin    # arm64 new
@tomassrnka
Copy link
Member Author

@jakubno

  builds/vmlinux-{ver}/vmlinux.bin          # x86_64 legacy (backwards compat)
  builds/vmlinux-{ver}/x86_64/vmlinux.bin   # x86_64 new path
  builds/vmlinux-{ver}/arm64/vmlinux.bin    # arm64 new path

@tomassrnka tomassrnka enabled auto-merge (squash) February 10, 2026 01:14
@tomassrnka tomassrnka disabled auto-merge February 10, 2026 01:14
@tomassrnka tomassrnka merged commit b8cea06 into main Feb 10, 2026
6 checks passed
@tomassrnka tomassrnka deleted the arm64-support branch February 10, 2026 19:09
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