Skip to content
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

Raspberry: fix hardware check on 64-bit OS #959

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kiracus
Copy link

@kiracus kiracus commented Jan 5, 2025

context

due to the upstream issue raspberrypi/linux#2110, the /proc/cpuinfo on Raspberry 64-bit OS no longer populate the line beginning with hardware, which breaks this repo's assumption.

the fix logic

for 64-bit OS, read /proc/device-tree/compatible instead and get the SOC string for the rpi devices

test

before the fix, with the command si.system()

I get

{
  manufacturer: '',
  model: '',
  version: 'c03111',
  serial: '{omitted}',
  uuid: '',
  sku: '-',
  virtual: false
}

after the fix

I get

{
  manufacturer: 'Raspberry Pi Foundation',
  model: 'Raspberry Pi 4 Model B Rev 1.1',
  version: 'c03111',
  serial: '{omitted}',
  uuid: '',
  sku: '-',
  virtual: false,
  raspberry: {
    manufacturer: 'Sony UK',
    processor: 'BCM2711',
    type: '4B',
    revision: '1.1'
  }
}

this PR should be able to fix #881

@sebhildebrandt
Copy link
Owner

Hi @kiracus ... I yesterday also published a fix for that (slightly different than your approach) ... Version 5.25.6 ... can you confirm that this also works on your side?

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.

si.system() does not return raspberry on Raspberry Pi 4
2 participants