Home  >  Article  >  System Tutorial  >  How to solve the missing function of finding pci device in CentOS7

How to solve the missing function of finding pci device in CentOS7

WBOY
WBOYforward
2024-01-05 09:08:28539browse

When using Xilinx PCIE demo, I compiled a Linux driver provided by xapp1022, and an error message showed that the pci_find_device function could not be found. The description says that this driver is for fedora, and the current environment is Centos7. The only header file used in the driver is linux/pci.h, which is related to PCI, so I checked it out and found it was not there.

I was thinking that I might need to install a library, and after searching, I found it: pciutils.

After installation, I recompiled the following, but it still failed.

Looking at the header file again, there is an additional pci folder, which contains a pci.h. There are many function declarations in this pci.h, but there is no pci_find_device.

It is said on the Internet that pci_get_device is used in new Linux.

Modified, compiled and passed.

refer to:

CentOS7中无法找到pci find device函数的解决方法

The above is the detailed content of How to solve the missing function of finding pci device in CentOS7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete