Add additional ARM version indicator for choosing correct native binary

This commit is contained in:
hedgecrw85 2020-02-18 12:32:14 -06:00
parent c856cc1ef4
commit 71d959c7f6
1 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* SerialPort.java
*
* Created on: Feb 25, 2012
* Last Updated on: Jan 22, 2020
* Last Updated on: Feb 18, 2020
* Author: Will Hedgecock
*
* Copyright (C) 2012-2020 Fazecast, Inc.
@ -130,8 +130,8 @@ public final class SerialPort
// Determine the specific ARM architecture of this device
try
{
BufferedReader cpuPropertiesFile = new BufferedReader(new FileReader("/proc/cpuinfo"));
String line;
BufferedReader cpuPropertiesFile = new BufferedReader(new FileReader("/proc/cpuinfo"));
while ((line = cpuPropertiesFile.readLine()) != null)
{
if (line.contains("ARMv"))
@ -139,6 +139,11 @@ public final class SerialPort
libraryPath = "Linux/armv" + line.substring(line.indexOf("ARMv")+4, line.indexOf("ARMv")+5);
break;
}
else if (line.contains("ARM") && line.contains("(v"))
{
libraryPath = "Linux/armv" + line.substring(line.indexOf("(v")+2, line.indexOf("(v")+3);
break;
}
else if (line.contains("aarch"))
{
libraryPath = "Linux/armv8";