5T33Z0 / OC-Little-Translated

ACPI Hotpatches and Guides for the OpenCore Bootmanager. Enhance and fine-tune your Hackintosh by adding devices and enabling additional features not covered in the OpenCore Install Guide. Only place that covers how to use OpenCore Legacy Patcher on PCs.
BSD 3-Clause "New" or "Revised" License
547 stars 73 forks source link

[Python Script] Read PCIInfo.txt in human-readable form #32

Closed dreamwhite closed 2 years ago

dreamwhite commented 2 years ago

With a friend of mine, I created a handy script to read in human-readable form the file generated by OpenCore SysReport PCIInfo.txt. This saves a lot of time when having to deal with obtaining info about every PCI device connected on the motherboard.

You can read more here

5T33Z0 commented 2 years ago

Interesting. But how do I obtain PCIInfo.txt? Is it the same as pcidevices.txt that you get when exporting the PCI devices list in Hackintool?

dreamwhite commented 2 years ago

Interesting. But how do I obtain PCIInfo.txt?

Good morning. Basically you need to enable config.plist/Misc/Debug/SysReport with OpenCore DEBUG binaries and when you boot, it'll create a SysReport dump. We created an EFI for such purposes that you can consult here.

Is it the same as pcidevices.txt that you get when exporting the PCI devices list in Hackintool?

Nope.

We created such script since we wanted to have an overview of the motherboard PCI devices directly from OpenCore's SysReport, so we can create a suitable EFI without the need of adding unneeded patches/kexts

5T33Z0 commented 2 years ago

Added a "Debugging" chapter.

I've tested the SysReport option and the python script.

In my test, the PCI section from Hackingtool listed 16 devices while PCIinfo.txt contained 18, twon of which had invalid or unknown vendor IDs (ffff). That's probably why the devices are not listed in Hackintool. Besides that, Hackintintool detects everything else.

I included the script but as far as PCI devices are concerned, I think Hackintool really is all you need to for analyzing PCI devices.

dreamwhite commented 2 years ago

Added a "Debugging" chapter.

I've tested the SysReport option and the python script.

Thank you so much !!

In my test, the PCI section from Hackingtool listed 16 devices while PCIinfo.txt contained 18, twon of which had invalid or unknown vendor IDs (ffff). That's probably why the devices are not listed in Hackintool. Besides that, Hackintintool detects everything else.

Yeah, probably that's why those unknown/invalid devices arent' listed in Hackintool.

I included the script but as far as PCI devices are concerned, I think Hackintool really is all you need to for analyzing PCI devices.

Absolutely, but I wanna remark this point: as long as you don't have a bootable macOS installation, hence the case where you are creating a suitable EFI for your hardware, the script is fine.

I'm willing to create a parsing script that analyzes Hackintool report, but I don't see it useful, since Hackintool already reports the name of those devices. Also please note that in case you're using a custom device-id (such as for iGPU or a dGPU), Hackintool and SysReport's PCIInfo.txt IDs won't match.

That's the case of my Intel UHD Graphics 620 of my Intel Core i5-8250U:

SysReport: 2. Vendor ID: 0x8086, Device ID: 0x5917, ... Hackintool: Vendor ID: 0x8086, Device ID: 0x5916, ...

Let me know your thoughts on that