lspci and dmidecode under MacOS X

2020. 3. 23. 06:22OS

Thanks goes to a guys from coreboot for the DirectHW kernel driver and framework that emulates the most commonly used hardware access functions on x86 machines under Mac OS X.

DirectHW is free software and released under the license ISC-L.

Build the DMG installer with kernel driver and framework:

git clone http://review.coreboot.org/directhw.git

cd direchw/macos

make directhw

A couple of people having trouble building DirectHW, so you can download from mirror

Build and install pciutils-3.1.7:

PCIUTILS="pciutils-3.1.7"
rm -rf ${PCIUTILS}{,.tar.bz2}
wget -v -nd -c ftp://ftp.kernel.org/pub/software/utils/pciutils/${PCIUTILS}.tar.bz2
tar xvjf ${PCIUTILS}.tar.bz2
patch -p0 < patches/${PCIUTILS}.diff
cd ${PCIUTILS}
make OPT="-O2 -arch i386 -arch x86_64" LDFLAGS="-arch i386 -arch x86_64" install install-lib
cd -
rm -rf ${PCIUTILS}{,.tar.bz2}

Build and install dmidecode-2.11:

 
sudo kextload /System/Library/Extensions/DirectHW.kext

Don’t forget to load the kernel extension:

Great, now you can use lspci, dmidecode, etc… don’t forget to use sudo:

update-pciids
sudo lspci -vv
sudo dmidecode
sudo biosdecode