Git Product home page Git Product logo

Comments (18)

ladyada avatar ladyada commented on July 24, 2024

looks like Arch is different enough, can you ask the Arch maintainers how you would know what chip its running on? cause as-is, CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 is not enough to determine the raspberry pi in use!

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

Hello, same issue on Ubuntu 18.04 server for arm64 and pi 3 b, same /proc/cpuinfo output as opening post. Is the advice the same for me (go ask Ubuntu maintainers how to determine chip)? Thank you.

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

yep! ask them "how can i tell what raspberry pi am i on"
we have it working on raspbian just fine but ubuntu & arch put that detail elsewhere :/

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

I managed to find a file called /sys/firmware/devicetree/base/cpus/cpu@0/compatible which lists the processor as 'arm,cortex-a53'. The problem is that both the pi 2 v1.2 and the pi 3 use the same processor... Is there any chance you could use something like the frequency (the pi 2 chip has a default lower clock) to determine the board? Edit: running lshw lists the board directly as a Pi 3 model B. Do you think you could use that or do you need the folder that houses this info?

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

close but not enough, we need something more specific if possible!

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

Ok what about the lswh command (my edit above)? It doesn't get much more specific than "Raspberry Pi Model B Rev 1.2"...

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

sure, thats good enough - can you submit a PR to add that to
https://github.com/adafruit/Adafruit_Python_PlatformDetect
once we can detect it, then blinka will automatically work

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

Hello again. I got some code working (hopefully not too crude, I'm a total novice) to detect the pi version on my platform, and was about to put together that pull request, but ran into another issue: now that my platform is detected, the line from RPi._GPIO import * fails saying "This module can only be run on a Raspberry Pi!" So apparently something else now fails to detect the platform and breaks. I can't seem to find where the enigmatic RPi._GPIO lives so I don't know how to fix that.

I will try to get the pull request underway, but it doesn't seem like it'll fix the problem completely.

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

does RPi GPIO python library work on your pi?

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

Apparently not. Running import RPi.GPIO results in the same error. Do I need to go modify the RPi.GPIO's platform detection code to work on my setup?

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

yep you got a lot of work ahead of you - most things wont work on non-raspbian. we really only guarantee it (and so does the pi foundation)

from adafruit_blinka.

anvoice avatar anvoice commented on July 24, 2024

I see, thanks for your help.

from adafruit_blinka.

satmandu avatar satmandu commented on July 24, 2024

I mentioned this problem here: #130

On 3B+, since /proc/cpuinfo doesn't give anything useful on mainline arm64 kernels.) Though that is addressed in part in gpio-python here https://sourceforge.net/p/raspberry-gpio-python/tickets/161/ by looking at cat /proc/device-tree/system/linux,revision | xxd on some arm64 systems, though not on mainline kernels, though /proc/device-tree/model seems to be always useful:

On 3B

cat /proc/device-tree/model 
Raspberry Pi 3 Model B

On 3B+

cat /proc/device-tree/model 
Raspberry Pi 3 Model B Plus Rev 1.3

The sourceforge link has a patch which can be used to get gpio-python working on arm64:

sudo apt install mercurial
sudo pip3 install --upgrade hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO

from adafruit_blinka.

gutoandreollo avatar gutoandreollo commented on July 24, 2024

On Arch latest (as of 2019-12-26), on a Raspberry Pi 3B (non-plus):

[alarm@alarm base]$ uname -a
Linux alarm 5.4.6-1-ARCH #1 SMP Mon Dec 23 09:59:08 MST 2019 aarch64 GNU/Linux

I got these strings that are quite handy, off the devicetree:

[alarm@alarm ~]$ cat /sys/firmware/devicetree/base/model ; echo
Raspberry Pi 3 Model B
[alarm@alarm ~]$ cat /sys/firmware/devicetree/base/compatible ; echo
raspberrypi,3-model-bbrcm,bcm2837
[alarm@alarm ~]$

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

PR's to platform-detect are welcome...we dont run anything other than Raspbian :)

from adafruit_blinka.

mruz avatar mruz commented on July 24, 2024

Raspberry pi 4 board is also not detected on openSUSE-Tumbleweed-ARM-JeOS-raspberrypi4.aarch64-2020.01.08-Snapshot20200115
https://en.opensuse.org/HCL:Raspberry_Pi4

from adafruit_blinka.

ladyada avatar ladyada commented on July 24, 2024

@mruz thanks, we aren't running openSUSE - if you could PR an update to platform-detect to help it know what its running on, blinka will 'magically' work :)
https://github.com/adafruit/Adafruit_Python_PlatformDetect

from adafruit_blinka.

makermelissa avatar makermelissa commented on July 24, 2024

This was fixed in an update to PlatformDetect. Closing.

from adafruit_blinka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.