mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 08:16:03 +08:00
Drop support for Intel macOS (#37215)
* Drop support for Intel macOS * arch.sh * scons * platform.sh * lil more * mv tici
This commit is contained in:
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Centralized platform and architecture detection for openpilot.
|
||||
# Source this script to get OPENPILOT_ARCH set to one of:
|
||||
# larch64 - linux tici arm64
|
||||
# aarch64 - linux pc arm64
|
||||
# x86_64 - linux pc x64
|
||||
# Darwin - macOS arm64
|
||||
#
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
OPENPILOT_ARCH=$(uname -m)
|
||||
|
||||
# ── check OS and normalize arch ──────────────────────────────
|
||||
if [ -f /TICI ]; then
|
||||
# TICI runs AGNOS — no OS validation needed
|
||||
OPENPILOT_ARCH="larch64"
|
||||
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
if [[ "$OPENPILOT_ARCH" == "x86_64" ]]; then
|
||||
echo -e " ↳ [${RED}✗${NC}] Intel-based Macs are not supported!"
|
||||
echo " openpilot requires an Apple Silicon Mac (M1 or newer)."
|
||||
exit 1
|
||||
fi
|
||||
echo -e " ↳ [${GREEN}✔${NC}] macOS detected."
|
||||
OPENPILOT_ARCH="Darwin"
|
||||
|
||||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
if [ -f "/etc/os-release" ]; then
|
||||
source /etc/os-release
|
||||
case "$VERSION_CODENAME" in
|
||||
"jammy" | "kinetic" | "noble" | "focal")
|
||||
echo -e " ↳ [${GREEN}✔${NC}] Ubuntu $VERSION_CODENAME detected."
|
||||
;;
|
||||
*)
|
||||
echo -e " ↳ [${RED}✗${NC}] Incompatible Ubuntu version $VERSION_CODENAME detected!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo -e " ↳ [${RED}✗${NC}] No /etc/os-release on your system. Make sure you're running on Ubuntu, or similar!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e " ↳ [${RED}✗${NC}] OS type $OSTYPE not supported!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user