Menu

#149 Use /proc/device-tree/compatible to extract platform infos

New
nobody
None
High
Patch
2018-04-11
2017-02-22
No

On some distributions, like SLES and openSUSE, the /proc/cpuinfo is not modified to include the Hardware and Revision fields. Enough information can be found in /proc/device-tree/compatible. See the upstream kernel Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt for the possible values to expect.

To avoid any regression for raspbian users, the device-tree data are used as a fallback if nothing can be found in cpuinfo.

The attached patch works like a charm on a SLES running on RPi 3.

1 Attachments

Discussion

  • Cedric Bosdonnat

    Updated the patch: len variable was used instead of linelen, discard the first patch

     
  • Ashwini Gunjal

    Ashwini Gunjal - 2018-04-11

    Hello Sir,

    I did all changes in cpuinfo.c file . then I got another error i.e Import Error: undefinded symbol /usr/lib64/python2.7/site-packages/ROi/_GPIO.so : Undefined symbol strn

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.