Disable Arm32 Builds (#1325)

Disables Arm32 builds and removes mention of the build option in the README.
This commit is contained in:
Craftzman7
2024-05-19 17:35:40 -07:00
committed by GitHub
parent 713fad6f6b
commit 9e58f5ed02
6 changed files with 29 additions and 25 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"
}

View File

@@ -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

View File

@@ -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...");

View File

@@ -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