Skip to content

Commit 608144d

Browse files
committed
Add Raspberry Pi OS 64-bit Detection
1 parent 264f418 commit 608144d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

adafruit_shell.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,13 @@ def is_armv8():
441441
"""
442442
return platform.machine() == "armv8l"
443443

444+
@staticmethod
445+
def is_arm64():
446+
"""
447+
Check if Platform.machine() returns ARM 64
448+
"""
449+
return platform.machine() == "aarch64"
450+
444451
@staticmethod
445452
def get_arch():
446453
"""Return a string containing the architecture"""
@@ -470,6 +477,8 @@ def get_os(self):
470477
for opsys in os_releases:
471478
if opsys in release_file:
472479
release = opsys
480+
if release == "Debian" and os.path.exists("/etc/rpi-issue"):
481+
release = "Raspbian"
473482
if os.path.isdir(os.path.expanduser("~/.kano-settings")) or os.path.isdir(
474483
os.path.expanduser("~/.kanoprofile")
475484
):

0 commit comments

Comments
 (0)