diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dabd8e9cf..edef1bffb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -211,10 +211,6 @@ jobs: artifact-name: macOSArm architecture: x64 arch-override: macarm64 - - os: ubuntu-latest - artifact-name: LinuxArm32 - architecture: x64 - arch-override: linuxarm32 - os: ubuntu-latest artifact-name: LinuxArm64 architecture: x64 diff --git a/README.md b/README.md index 7c4e35652..1e13ed2a7 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,7 @@ Note that these are case sensitive! * `-PArchOverride=foobar`: builds for a target system other than your current architecture. Valid overrides are: * linuxathena - * linuxarm32 * linuxarm64 - * arm32 * arm64 * x86-64 * x86 diff --git a/photon-core/build.gradle b/photon-core/build.gradle index 88d11c24a..8541456c0 100644 --- a/photon-core/build.gradle +++ b/photon-core/build.gradle @@ -47,8 +47,7 @@ dependencies { // Only include mrcal natives on platforms that we build for if (!(jniPlatform in [ "osxx86-64", - "osxarm64", - "linuxarm32" + "osxarm64" ])) { implementation "org.photonvision:photon-mrcal-jni:$mrcalVersion:$wpilibNativeName" } diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java b/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java index 509ea0cd9..57f1eab86 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java @@ -48,12 +48,12 @@ public enum Platform { "Linux AARCH64", "linuxarm64", false, OSType.LINUX, true), // Jetson Nano, Jetson TX2 // PhotonVision Supported (Manual build/install) - LINUX_ARM32("Linux ARM32", "linuxarm32", false, OSType.LINUX, true), // ODROID XU4, C1+ LINUX_ARM64("Linux ARM64", "linuxarm64", false, OSType.LINUX, true), // ODROID C2, N2 // Completely unsupported WINDOWS_32("Windows x86", "windowsx64", false, OSType.WINDOWS, false), MACOS("Mac OS", "osxuniversal", false, OSType.MACOS, false), + LINUX_ARM32("Linux ARM32", "linuxarm32", false, OSType.LINUX, false), // ODROID XU4, C1+ UNKNOWN("Unsupported Platform", "", false, OSType.UNKNOWN, false); private enum OSType { @@ -119,6 +119,10 @@ public enum Platform { return isRoot; } + public static boolean isSupported() { + return currentPlatform.isSupported; + } + ////////////////////////////////////////////////////// // Debug info related to unknown platforms for debug help diff --git a/photon-server/src/main/java/org/photonvision/Main.java b/photon-server/src/main/java/org/photonvision/Main.java index 52a3225be..9dd5e7ad7 100644 --- a/photon-server/src/main/java/org/photonvision/Main.java +++ b/photon-server/src/main/java/org/photonvision/Main.java @@ -347,6 +347,27 @@ public class Main { } public static void main(String[] args) { + logger.info( + "Starting PhotonVision version " + + PhotonVersion.versionString + + " on " + + Platform.getPlatformName() + + (Platform.isRaspberryPi() ? (" (Pi " + PiVersion.getPiVersion() + ")") : "")); + + try { + if (!handleArgs(args)) { + System.exit(1); + } + } catch (ParseException e) { + logger.error("Failed to parse command-line options!", e); + } + + // We don't want to trigger an exit in test mode or smoke test. This is specifically for MacOS. + if (!(Platform.isSupported() || isSmoketest || isTestMode)) { + logger.error("This platform is unsupported!"); + System.exit(1); + } + try { boolean success = TestUtils.loadLibraries(); @@ -384,13 +405,6 @@ public class Main { + e.getMessage()); } - try { - if (!handleArgs(args)) { - System.exit(0); - } - } catch (ParseException e) { - logger.error("Failed to parse command-line options!", e); - } CVMat.enablePrint(false); PipelineProfiler.enablePrint(false); @@ -403,13 +417,6 @@ public class Main { Logger.setLevel(LogGroup.General, logLevel); logger.info("Logging initialized in debug mode."); - logger.info( - "Starting PhotonVision version " - + PhotonVersion.versionString - + " on " - + Platform.getPlatformName() - + (Platform.isRaspberryPi() ? (" (Pi " + PiVersion.getPiVersion() + ")") : "")); - PvCSCoreLogger.getInstance(); logger.debug("Loading ConfigManager..."); diff --git a/scripts/install.sh b/scripts/install.sh index 528956394..472715598 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -50,14 +50,14 @@ ARCH_NAME="" if [ "$ARCH" = "aarch64" ]; then ARCH_NAME="linuxarm64" elif [ "$ARCH" = "armv7l" ]; then - ARCH_NAME="linuxarm32" + echo "ARM32 is not supported by PhotonVision. Exiting." + exit 1 elif [ "$ARCH" = "x86_64" ]; then ARCH_NAME="linuxx64" else if [ "$#" -ne 1 ]; then echo "Can't determine current arch; please provide it (one of):" echo "" - echo "- linuxarm32 (32-bit Linux ARM)" echo "- linuxarm64 (64-bit Linux ARM)" echo "- linuxx64 (64-bit Linux)" exit 1