Tag Archives: directhw

lspci and dmidecode under MacOS X

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/p/directhw.git
cd directhw/macosx
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:

DMIDECODE="dmidecode-2.11"
rm -rf ${DMIDECODE}{,.tar.bz2}
wget -v -nd -c http://download-mirror.savannah.gnu.org/releases/dmidecode/${DMIDECODE}.tar.bz2
tar xvjf ${DMIDECODE}.tar.bz2
patch -p0 < patches/dmidecode-2.11.diff
cd ${DMIDECODE}
make install
cd -
rm -rf ${DMIDECODE}{,.tar.bz2}

Don’t forget to load the kernel extension:

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

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

update-pciids
sudo lspci -vv
sudo dmidecode
sudo biosdecode