Linux: Find Out If a Particular Driver / Feature Compiled Into Running Kernel or Not

by on October 10, 2008 · 0 comments· LAST UPDATED October 10, 2008

in , ,

Q. I know how to find out information about compiled driver under FreeBSD kernel. But, how do I find out if a Particular feature, driver or filesystem support is compiled into my running Linux kernel or not? How do I find out if DMA support is compiled into my kernel?

A. Current Linux kernel configuration is stored in .config file or config-$(uname -r) file:
[a] /boot/config-$(uname -r) or /boot/config-$(uname -r)*: Automatically generated kernel config file. This file present under almost all Linux distros including RHEL / CentOS / Fedora / Debian / Ubuntu Linux.

[b] /usr/src/kernels/$(uname -r)-$(uname -m)/.config or /usr/src/linux-2.6.N/.config: Current kernel config file.

If there is not a /usr/src/kernels/$(uname -r)-$(uname -m)/ directory on your system, then the kernel source has not been installed. Use apt-get or yum command to install kernel source.

Find out if DMA support compiled or not, enter:
grep -i DMA .config
OR
grep -i DMA /boot/config-$(uname -r)*
Sample output:

CONFIG_GENERIC_ISA_DMA=y
CONFIG_ISA_DMA_API=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
CONFIG_PDC_ADMA=m
# CONFIG_PATA_OPTIDMA is not set
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
CONFIG_BCM43XX_DMA=y
CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
# CONFIG_BCM43XX_DMA_MODE is not set
CONFIG_CARDMAN_4000=m
CONFIG_CARDMAN_4040=m
# DMA Engine support
CONFIG_DMA_ENGINE=y
# DMA Clients
CONFIG_NET_DMA=y
# DMA Devices
CONFIG_INTEL_IOATDMA=m
CONFIG_HAS_DMA=y

For simplicity, most lines only contain one argument. Anything following a # is considered a comment and ignored. The option CONFIG_HAS_DMA has total 3 possiblities:

  • CONFIG_HAS_DMA=y: DMA support compiled.
  • CONFIG_HAS_DMA=m: DMA support compiled as a loadable kernel module.
  • CONFIG_HAS_DMA=n: No DMA support.
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , , , , , , , , , ,

Previous Faq:

Next Faq: