From 7a0771215d9bd52dc9d6913abee56a9f62893d3e Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Fri, 18 Sep 2026 10:24:32 +0200 Subject: deploy: cross-compile arm64 binaries on the dev machine The target only assembles the image from prebuilt binaries, so redeploys no longer compile sqlite/argon2 on the NAS. New deploy/Dockerfile.cross provides the gcc-aarch64-linux-gnu toolchain; the Dockerfile uses .prebuilt/ when present. --- deploy/cross-build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 deploy/cross-build.sh (limited to 'deploy/cross-build.sh') diff --git a/deploy/cross-build.sh b/deploy/cross-build.sh new file mode 100644 index 0000000..7c90b0f --- /dev/null +++ b/deploy/cross-build.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Cross-compile bokfd/bokfctl/bokftui for aarch64. Expects the source +# read-only at /src, writes the binaries to /out and takes the version from +# $VERSION. Run through deploy/Dockerfile.cross. +set -eu + +make -C /src -j"$(nproc)" BUILD=/tmp/build \ + CC=aarch64-linux-gnu-gcc \ + CFLAGS="-O2 -g -L/usr/lib/aarch64-linux-gnu" \ + VERSION="${VERSION:-0.1.0-dev}" + +mkdir -p /out +cp /tmp/build/bokfd /tmp/build/bokfctl /tmp/build/bokftui /out/ -- cgit v1.3