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

Fix Zgemma h9 CPU info (undefined problem) #1658

Closed
wants to merge 1 commit into from
Closed

Fix Zgemma h9 CPU info (undefined problem) #1658

wants to merge 1 commit into from

Conversation

persianpros
Copy link
Contributor

@persianpros persianpros commented Jul 28, 2018

/proc/cpuinfo won't give us what we need for h9 instead /proc/stb/info/chipset give us hi3798mv200
After this you will see 1600 MHz (4 cores) too.
It seems HiSilicon has this problem so you could use this for future models too.
Screenshot: https://forums.openpli.org/topic/28532-merge-requests-for-plis-git/?view=findpost&p=912860

/proc/cpuinfo won't give us what we need for h9 instead /proc/stb/info/chipset give us hi3798mv200
After this you will see 1600 MHz (4 cores) too.
It seems HiSilicon has this problem so you could use this for future models too.
if HardwareInfo().get_device_model() in ("h9") and fileCheck("/proc/stb/info/chipset"):
f = open("/proc/stb/info/chipset", 'r')
processor = f.readline().strip()
f.close()
for line in open("/proc/cpuinfo").readlines():
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't there be an "else", a bit pointless to attempt to execute the for loop...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it's not pointless as we get "cpu_count" from /proc/cpuinfo.
And we're getting "cpu_speed" from /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq , what a mess LOL

@littlesat
Copy link
Member

Device model check should not be accepted here!

@littlesat
Copy link
Member

Also three lines to access the file is not done (I know openatv does it Everywhere to make things extra complicated

@littlesat littlesat closed this Jul 28, 2018
@persianpros
Copy link
Contributor Author

persianpros commented Jul 28, 2018

This code is not in openatv, I did it myself and tested ok.

@WanWizard
Copy link
Member

@littlesat Perhaps give (or point to) an example on how it should be done?

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.

None yet

3 participants