pciutils.efi/PciUtilsPkg is a UDK/EDK2 porting of GNU's pciutils for the handy PCI tools: lspci
and setpci
As a full UDK package, PciUtilsPkg can be built using either the standard EDK II build process or iPug.
- Python 2.7.10+ or Python 3.7.0+
- git 2.19.0+
- UDK/EDK2 code tree in following tags: edk2-stable{201811, 201903, 201905}
- git-cloned GNU's pciutils to directory
PciUtilsPkg/pciutils
(if not using iPug)
- nasm (2.0 or above)
- iasl (version 2018xxxx or later, maybe optional)
- MSVC(Windows) or Xcode(Mac) or GCC(Open-source Posix)
- build-essential uuid-dev (Posix)
- pip2 install future (Python 2.7.x)
- motc (Xcode)
- Reference:
sudo apt update && sudo apt install nasm iasl build-essential uuid-dev
- When using the latest iPug:
pip install ipug --user --upgrade
- Only Linux (Debian & Arch) and Windows build are tested. Xcode is not covered yet.
- The double/triple/quadruple command with {'x', 'm', 'v' ...} may not work correctly.
- UDK with Python3 has build-dependency issue which causes slow re-building. Python2 is still recommended anyway.
"pci.ids" database is not working yet.(Many thanks to http://www.lab-z.com/disfopen/)
git clone https://github.com/timotheuslin/pciutils.efi.git
- Change-directory to folder pciutils.efi .
- (Optional) Edit
CODETREE
inproject.py
to specify where to place the downloaded source files of the UDK git repo or any other additional respos. - To build the code, run
python project.py setup
thenpython project.py
. (iPug will then handle all the rest of the tedious works with the UDK code tree setup and the build process.) - Browse to folder Build/PciUtilsPkg for the build results.
- Browse to folder Build/Conf for CONF_PATH setting files.
- Run
python project.py {clean, cleanall}
to clean (all) the intermediate files. - The PCI list data base file,
pci.ids
must be copied alone withlspci.efi
.
- The full UDK code tree is git-cloned-checked-out to:
- Windows: %USERPROFILE%/.cache/pug/edk2
- Linux: $HOME/.cache/pug/edk2
- On Windows, the default MSVC tool chain tag is vs2012x86. The following command should be run first in the command console:
- "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
- pciutils.efi, as the current working directory, is assigned as the "WORKSPACE" directory. PACKAGES_PATH a.k.a. MULTIPLE-WORKSPACE is used here to implicitly reference other standard packages outside the current working directory tree.
- For the 1st-time one-shot setup, following code trees are automatically git-cloned:
- the UDK code tree
- the openssl repo (and some other CryptoPkg's submodules maybe)
- the edk2-libc code tree -- UDK newer than edk2-stable201905 needs this for StdLib package.
- the GNU pciutils source