From 074bfa2c9770acdd9e80dbea6576ba5566ebd042 Mon Sep 17 00:00:00 2001 From: kirito201922 <52266724+kirito201922@users.noreply.github.com> Date: Fri, 26 Dec 2025 13:31:30 +0100 Subject: [PATCH] Add CPU architecture check helper Adds a small helper script under bin/ that detects the host CPU architecture (e.g. amd64 vs arm64) and prints a message. This assists operators who may be troubleshooting container image mismatches or building native binaries locally. --- bin/check_cpu_arch.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bin/check_cpu_arch.sh diff --git a/bin/check_cpu_arch.sh b/bin/check_cpu_arch.sh new file mode 100644 index 00000000..678d025d --- /dev/null +++ b/bin/check_cpu_arch.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +# This helper script prints the CPU architecture detected at runtime. +# It can be useful when debugging issues related to mismatched container images +# or verifying that a local build uses the correct arch (e.g. amd64 vs arm64). + +arch="$(uname -m)" + +case "$arch" in + x86_64) + echo "Detected architecture: x86_64 (amd64)" + ;; + aarch64 | arm64) + echo "Detected architecture: arm64/aarch64" + ;; + *) + echo "Detected architecture: $arch (unrecognized)" + ;; +esac + +echo "Tip: ensure you pull or build the Base node images matching your host architecture."