#!/bin/bash # build.sh - cross-compile the log shipper for the Spike 2 machine (i.MX6, armv7). # Pure Go (CGO off), so the binary is fully static and needs nothing from the machine. set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -trimpath -ldflags "-s -w" -o logshipper . echo "built logshipper ($(stat -c %s logshipper 2>/dev/null || stat -f %z logshipper) bytes)"