Skip to content

Added detection for LeMaker Banana Pro running Debian Bookworm (12.4) #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

michaelstoops
Copy link
Contributor

It looks like Banana Pro was previously supported, but for Armbian in particular. It looked like _allwinner_variants_id was the right place for adding the detection, so I did.

This shows the SBC host I'm using:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % uname -a
Linux bpro 6.1.0-17-armmp-lpae #1 SMP Debian 6.1.69-1 (2023-12-30) armv7l GNU/Linux

Here's the data I used for the board detection:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % cat /proc/device-tree/model
LeMaker Banana Pro%

Here's my dev environment:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % pip list
Package                 Version      Editable project location
----------------------- ------------ ------------------------------------------------
Adafruit-PlatformDetect 0.0.0+auto.0 /home/mstoops/git/Adafruit_Python_PlatformDetect
astroid                 3.0.2
black                   24.1.1
click                   8.1.7
dill                    0.3.8
isort                   5.13.2
mccabe                  0.7.0
mypy-extensions         1.0.0
packaging               23.2
pathspec                0.12.1
pip                     23.0.1
platformdirs            4.1.0
pylint                  3.0.3
setuptools              66.1.1
tomlkit                 0.12.3
wheel                   0.38.4

pylint results:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python -m pylint adafruit_platformdetect

------------------------------------
Your code has been rated at 10.00/10

Black results:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python -m black adafruit_platformdetect
All done! ✨ 🍰 ✨
7 files left unchanged.

detect.py after my changes:

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python ./bin/detect.py
Board Detection Test

Check that the Chip and Board IDs match your board and that this it is
correctly detecting whether or not it is a Linux board.

Chip id:  A20
Board id:  LEMAKER_BANANA_PRO

Linux Detection
---------------
Is this an embedded Linux system? True

Raspberry Pi Boards
-------------------
Is this a Pi 3B+? False
Is this a Pi 4B? False
Is this a 40-pin Raspberry Pi? False
Is this a Raspberry Pi Compute Module? False

Other Boards
-------------------
Is this a Siemens Simatic IOT2000 Gateway? False
Is this a 96boards board? False
Is this a BeagleBone board? False
Is this a Giant board? False
Is this a Coral Dev board? False
Is this a MaaXBoard? False
Is this a SiFive board?  False
Is this a PYNQ board? False
Is this a Rock Pi board? False
Is this a NanoPi board? False
Is this a Khadas VIM3 board? False
Is this a Clockwork Pi board? False
Is this a Seeed Board? False
Is this a UDOO board? False
Is this an ASUS Tinker board? False
Is this an STM32MP1 board? False
Is this a MilkV board? False
Is this a generic Linux PC? False
Is this an OS environment variable special case? False
LeMaker board detected.

Previously, detect.py crashed as a result of board ID being None. I didn't grab a screenshot.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this update. I just have a small request. Could you also remove from the _armbian_id() function to avoid redundancy? Both should work from where you moved it. Thanks.

@michaelstoops
Copy link
Contributor Author

Sure, done.

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python -m pylint adafruit_platformdetect
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python -m black adafruit_platformdetect
All done! ✨ 🍰 ✨
7 files left unchanged.
mstoops@bpro ~/git/Adafruit_Python_PlatformDetect
 % python ./bin/detect.py

Board Detection Test

Check that the Chip and Board IDs match your board and that this it is
correctly detecting whether or not it is a Linux board.

Chip id:  A20
Board id:  LEMAKER_BANANA_PRO

Linux Detection
---------------
Is this an embedded Linux system? True

Raspberry Pi Boards
-------------------
Is this a Pi 3B+? False
Is this a Pi 4B? False
Is this a 40-pin Raspberry Pi? False
Is this a Raspberry Pi Compute Module? False

Other Boards
-------------------
Is this a Siemens Simatic IOT2000 Gateway? False
Is this a 96boards board? False
Is this a BeagleBone board? False
Is this a Giant board? False
Is this a Coral Dev board? False
Is this a MaaXBoard? False
Is this a SiFive board?  False
Is this a PYNQ board? False
Is this a Rock Pi board? False
Is this a NanoPi board? False
Is this a Khadas VIM3 board? False
Is this a Clockwork Pi board? False
Is this a Seeed Board? False
Is this a UDOO board? False
Is this an ASUS Tinker board? False
Is this an STM32MP1 board? False
Is this a MilkV board? False
Is this a generic Linux PC? False
Is this an OS environment variable special case? False
LeMaker board detected.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thank you.

@makermelissa makermelissa merged commit 662570f into adafruit:main Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants