add linux arm support: RaspberryPi(armv7l) and aarch64
This commit is contained in:
parent
abc0b82961
commit
4c34cbed3c
4 changed files with 22 additions and 3 deletions
7
ctl
7
ctl
|
@ -44,6 +44,13 @@ else
|
|||
else
|
||||
ARCH=32
|
||||
fi
|
||||
if [ $PLATFORM == "aarch64" ]; then
|
||||
ARCH="_aarch64"
|
||||
PLATFORM_PY=3.5
|
||||
fi
|
||||
if [ $PLATFORM == "armv7l" ]; then
|
||||
ARCH="_armv7l"
|
||||
fi
|
||||
PLATFORM="linux$ARCH"
|
||||
fi
|
||||
if [ $SYSTEM == "Darwin" ]; then
|
||||
|
|
7
install
7
install
|
@ -20,7 +20,12 @@ def get_platform():
|
|||
name = 'darwin64'
|
||||
elif name.startswith('linux'):
|
||||
import platform
|
||||
if platform.architecture()[0] == '64bit':
|
||||
machine = platform.machine()
|
||||
if machine == 'armv7l':
|
||||
name = 'linux_armv7l'
|
||||
elif machine == 'aarch64':
|
||||
name = 'linux_aarch64'
|
||||
elif machine == 'x86_64':
|
||||
name = 'linux64'
|
||||
else:
|
||||
name = 'linux32'
|
||||
|
|
|
@ -298,6 +298,8 @@ def get_tor():
|
|||
for path in (
|
||||
os.path.join(settings.base_dir, '..', 'platform_linux64', 'tor', 'tor'),
|
||||
os.path.join(settings.base_dir, '..', 'platform_linux32', 'tor', 'tor'),
|
||||
os.path.join(settings.base_dir, '..', 'platform_linux_armv7l', 'tor', 'tor'),
|
||||
os.path.join(settings.base_dir, '..', 'platform_linux_aarch64', 'tor', 'tor'),
|
||||
):
|
||||
if os.path.isfile(path) and os.access(path, os.X_OK):
|
||||
return os.path.normpath(path)
|
||||
|
|
|
@ -113,7 +113,12 @@ def get_platform():
|
|||
name = 'darwin64'
|
||||
elif name.startswith('linux'):
|
||||
import platform
|
||||
if platform.architecture()[0] == '64bit':
|
||||
machine = platform.machine()
|
||||
if machine == 'armv7l':
|
||||
name = 'linux_armv7l'
|
||||
elif machine == 'aarch64':
|
||||
name = 'linux_aarch64'
|
||||
elif machine == 'x86_64':
|
||||
name = 'linux64'
|
||||
else:
|
||||
name = 'linux32'
|
||||
|
|
Loading…
Reference in a new issue