From 8793cb19966e400927c3068e261ebec5b48cdc72 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Sun, 16 Aug 2026 20:57:55 +0200 Subject: [PATCH] Add the ARM64 cross toolchain, and follow the image to build/ Batocera and the ES-family handhelds run on ARM, where a linux_x64 binary will not start. The image gains the aarch64 cross compiler and the arm64 dev libraries the pipeline links against. The image itself also moved out of the internal package namespace, which did not travel with the repo during the org reorganization. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 6 +++--- builder.Dockerfile | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d3c8452..d9a574f 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,13 @@ Apple Developer account. `builder.Dockerfile` bakes the pipeline's build-step dependencies (Go + git/make/zip/curl/jq and the X11/GL/ALSA dev libraries needed by the cgo `linux-x64` build) into -`git.teletypegames.org/internal/ebitengine-builder`. Debian-based so +`git.teletypegames.org/build/ebitengine-builder`. Debian-based so the linux binary links against glibc: ```sh docker build --platform linux/amd64 -f builder.Dockerfile \ - -t git.teletypegames.org/internal/ebitengine-builder:latest . -docker push git.teletypegames.org/internal/ebitengine-builder:latest + -t git.teletypegames.org/build/ebitengine-builder:latest . +docker push git.teletypegames.org/build/ebitengine-builder:latest ``` Detailed documentation lives on the wiki: `/development/ebitengine`. diff --git a/builder.Dockerfile b/builder.Dockerfile index 716cb09..87762bc 100644 --- a/builder.Dockerfile +++ b/builder.Dockerfile @@ -8,8 +8,8 @@ # # Build & push (the CI runner is linux/amd64): # docker build --platform linux/amd64 -f builder.Dockerfile \ -# -t git.teletypegames.org/internal/ebitengine-builder:latest . -# docker push git.teletypegames.org/internal/ebitengine-builder:latest +# -t git.teletypegames.org/build/ebitengine-builder:latest . +# docker push git.teletypegames.org/build/ebitengine-builder:latest # 1.26 covers every current game repo's go.mod directive (1.25.x, 1.26.x). FROM golang:1.26-bookworm @@ -24,6 +24,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libasound2-dev \ && rm -rf /var/lib/apt/lists/* +# linux-arm64 cross-build (Raspberry Pi, Odroid, retro handhelds). Ebitengine +# needs cgo on Linux, so the arm64 target needs a cross gcc plus the same +# X11/GL/ALSA headers for arm64. Debian's main mirror carries arm64, so +# `dpkg --add-architecture` is enough — no ports repository needed. +RUN dpkg --add-architecture arm64 \ + && apt-get update && apt-get install -y --no-install-recommends \ + gcc-aarch64-linux-gnu libc6-dev-arm64-cross \ + libgl1-mesa-dev:arm64 libglu1-mesa-dev:arm64 \ + libx11-dev:arm64 libxcursor-dev:arm64 libxi-dev:arm64 \ + libxinerama-dev:arm64 libxrandr-dev:arm64 libxxf86vm-dev:arm64 \ + libasound2-dev:arm64 \ + && rm -rf /var/lib/apt/lists/* + # Our own Go modules (engines/inkwell, engines/gorpg) are served by the forge, # not by proxy.golang.org, and are absent from the public checksum database. ENV GOPRIVATE=git.teletypegames.org