pciutils.efi/PciUtilsPkg is an EDKII/UEFI porting of the GNU's pciutils for its handy PCI tools: lspci
and setpci
As a full EDKII package, PciUtilsPkg can be built with the guides in/from:
- Python 3.10+
- git 2.44+
- The EDKII/TianoCore code tree in following tags: edk2-stable{202405, 202408}
- git-cloned GNU's pciutils to the directory
PciUtilsPkg/pciutils
(if not using iPug)
- nasm (2.15.05+)
- (Windows) add the nasm's folder to the environment variable "PATH" list setting
- iASL (version 2020xxxx or later, maybe optional)
- MSVC(Windows) or Xcode(Mac) or GCC(Open-source Posix)
- build-essential uuid-dev (Posix)
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/GCC (Debian/Ubuntu/MintLinux & ArchLinux/Manjaro) and Windows/MSVC build are tested. No plan to cover OSX/Xcode.
- The double/triple/quadruple command with {'x', 'm', 'v' ...} may not work correctly.
"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 EDKII/TianoCore 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 EDKII/TianoCore 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 EDKII code tree is git-cloned-checked-out to:
- Windows: %USERPROFILE%/.cache/pug/edk2
- Linux: $HOME/.cache/pug/edk2
- On Windows, VS2022 is tested as the default compiler. The following command should be run first in the windows command console:
%comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat"
- 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 EDKII/TianoCore code tree
- submodules such as the openssl repo and some other CryptoPkg's submodules, maybe.
- the edk2-libc code tree - The StdLib package.
- the GNU pciutils source
- the EDKII/TianoCore code tree