-
Notifications
You must be signed in to change notification settings - Fork 256
Initial addition for Pine64 devices #52
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
Conversation
Output of the latest changes working on the Pinebook running Armbian: linuxuser@pinebook:~/GitHub/Adafruit_Python_PlatformDetect$ python3 Python 3.5.2 (default, Oct 8 2019, 13:06:37) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import adafruit_platformdetect
>>> detector = adafruit_platformdetect.Detector()
>>> detector.chip.id
'PINE64'
>>> detector.board.id
'PINEBOOK' |
hi the chip should be the A64 right? there is no chip called 'pine64'? |
Yes, that's correct. The Original Pine64 was actually called the Pine A64. |
Yeap, the chip is the AllWinner A64, if you want I can make the change reflecting it. I'll also test the new implementation on other OS. Shouldn't we detect the board and chip based on OS? I ask this because there is already a method for getting the Regards. |
no, the chip is set by the hardware - whatever is printed on the microcontroller, it is independant completely from the OS :) |
Got it! :P thanks for the clarification. I'll make the changes tomorrow so you guys will have it to review first time in your morning (different working hours) |
all good, thank you for working with us :) |
…PlatformDetect # Conflicts: # adafruit_platformdetect/chip.py
My pleasure @ladyada, I'll upload the result once I get home and test it on the PineBook itself. After finishing this PR would be great if you or @makermelissa can point me out to the right direction on adding the support on adafruit/Adafruit_Blinka#118 and adding also the Onion Omega board on it (don't want to start making changes out of the blue without a prior guidance 😛 ). Also, @makermelissa can you please test this on your Pine64 board and share the Regards. |
Hi, I'll try to get the |
@makermelissa, no problem. I have tested the new changes just now on the PineBook and this is the result: linuxuser@pinebook:~/GitHub/Adafruit_Python_PlatformDetect$ python3
Python 3.5.2 (default, Oct 8 2019, 13:06:37)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import adafruit_platformdetect
>>> detector = adafruit_platformdetect.Detector()
>>> detector.board.id
'PINEBOOK'
>>> detector.chip.id
'A64'
>>> In yours it should be working also, but by any chance is not and you want me to change something, let me know. |
Sounds good! |
Looks like I accidentally overwrote my Pine64 SD Card with another image, so I'm needing to reset it back up. |
No problem, if you want you can also test it with that distro. There might be something we can add to support the detection on that OS |
Oh, I meant I overwrote it with Ubuntu for the Raspberry Pi while testing another PR. Armbian is the preferred one since we've had really good luck with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Here's my test results:
pi@pine64:~$ python3 detect.py
Chip id: A64
Board id: PINE64
Is this a DragonBoard 410c? False
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
Is this a BBB? False
Is this a Giant Board? False
Is this a Coral Edge TPU? False
Is this a SiFive Unleashed? False
Is this an embedded Linux system? True
Is this a generic Linux PC? False
Is this an OS environment variable special case? False
Pine64 device detected.
Hi thanks for adding the support to the Pine64! This doesn't work for me in my machine I see this for cat /proc/cpuinfo : Hardware : Pine64+ and cat /proc/device-tree/model Pine64+ Maybe is it the + at the end? Thanks! |
What do you get for |
Thanks for the quick reply! cat /proc/device-tree/compatible |
Is that the full string? The one on my board was If so, it seems they may have removed the processor from the string, which is causing the chip to not be detected and the board value isn't even checked at that point. That could present problem because of other boards having similar strings. |
Yes this is the full string. Btw I truly appreciate your quick reply and
help!
…On Sun, 17 Jan 2021, 7:43 pm Melissa LeBlanc-Williams, < ***@***.***> wrote:
Is that the full string? The one on my board was
pine64,pine64-plusallwinner,sun50i-a64.
If so, it seems they may have removed the processor from the string, which
is causing the chip to not be detected and the board value isn't even
checked at that point. That could present problem because of other boards
having similar strings.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIH72UYMYY7C7QOIQA76ILS2N74HANCNFSM4KDXUT6A>
.
|
Ok, created a new issue at #133. Please make any new comments regarding this issue there. |
I will need the output of the
/proc/cpuinfo
and the/proc/device-tree/model
for a better implementation.