Skip to content

build: add loong64 (LoongArch) build support - #2585

Merged
thomasferrandiz merged 1 commit into
flannel-io:masterfrom
qiangxuhui:loong64
Oct 20, 2026
Merged

thomasferrandiz merged 1 commit into
flannel-io:masterfrom
qiangxuhui:loong64

Conversation

@qiangxuhui

Copy link
Copy Markdown

Description

Type: build/tooling addition. No Go source change and no runtime behaviour change; only the Makefile is touched.

Extend the build tooling so flanneld can be built for loong64 (LoongArch), both natively and as a cross build. loong64 is a GOARCH supported by the Go toolchain (linux/loong64, added in Go 1.19).

Makefile changes:

  • add the qemu asset name and pinned SHA256 for qemu-loongarch64-static, so the per-arch binary target resolves for loong64 too
  • list loong64 among the valid ARCH values

The binary can be built with either of:

ARCH=loong64 make dist/flanneld           # native build on a loong64 host
ARCH=loong64 make dist/flanneld-loong64   # cross build

Components affected: Makefile only (build tooling for the flanneld binary). The existing arch paths are unchanged - the diff only adds variables and updates a comment.

Testing:

  • Manual: ARCH=loong64 make dist/flanneld (native) and ARCH=loong64 make dist/flanneld-loong64 (containerised per-arch target) both build successfully.
  • Automated: none; the change is Makefile-only and does not touch runtime code.

Known limitation: container image targets (image, release, build-multi-arch) are not covered for loong64, because the golang:alpine3.24 and alpine:3.24 base images used by images/Dockerfile have no loong64 variant. GitHub Actions workflows and the release artifact (tar.gz) path are intentionally not touched by this PR.

Todos

  • Tests
  • Documentation
  • Release note

Release Note

None required

Extend the build tooling so flanneld can also be built for loong64, both
natively and as a cross build. loong64 is a GOARCH supported by the Go
toolchain (linux/loong64, added in Go 1.19).

Add the qemu asset name and pinned SHA256 for qemu-loongarch64-static so
that the per-arch binary target resolves for loong64 too, and list
loong64 among the valid ARCH values. The binary can then be built with
either of

  ARCH=loong64 make dist/flanneld           # native build on loong64
  ARCH=loong64 make dist/flanneld-loong64   # cross build

Container image targets are not covered for loong64 yet: the
golang:alpine3.24 and alpine:3.24 base images used by images/Dockerfile
are not published for loong64.

Signed-off-by: qiangxuhui <qiangxuhui@loongson.cn>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The small, additive changes follow existing build patterns, with no unresolved findings.

No open issues 🎉

What changed in this PR

Adds loong64 (LoongArch) binary build support using the existing Makefile architecture mappings.

Changes:

  • Adds the QEMU asset mapping and pinned SHA256 for loong64.
  • Updates the valid architecture comment; container image and release support remain out of scope.
File Description
Makefile Adds loong64 QEMU mappings and documents the architecture option.

Review effort: Balanced

@thomasferrandiz
thomasferrandiz merged commit 135870c into flannel-io:master Oct 20, 2026
11 checks passed
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.

3 participants