Drivers included in linux kernel

How do I find out which version of a driver is included in a kernel?

I need to find out which driver/module version is contained in a kernel which isn’t installed. Is there a document in the source that contains this or something listed online that haven’t been able to find?

You’re going at this the wrong way. Read this. Use the tools I listed in the troubleshooting section, then from the output tell us what isn’t working.

@eyoung100 It isn’t a matter of troubleshooting. I was asked by one of our dedicated Red Hat resources which driver version is provided by the latest kernel found at kernel.org. Again, this isn’t for running kernels. I know how to obtain that information. I need to know how to determine what a kernel will provide prior to installation. Release notes that list driver versions or similar documentation.

@michas the fnic driver. I was asked to determine which driver version is provided in the source downloaded from kernel.org.

2 Answers 2

You can use the modinfo command to give you all kind of information about a given module.

$ modinfo bluetooth filename: /lib/modules/3.17.4-1-ARCH/kernel/net/bluetooth/bluetooth.ko.gz alias: net-pf-31 license: GPL version: 2.19 description: Bluetooth Core ver 2.19 author: Marcel Holtmann srcversion: 4D63C2C41C55E984E7057A5 depends: rfkill,crc16 intree: Y vermagic: 3.17.4-1-ARCH SMP preempt mod_unload modversions parm: disable_esco:Disable eSCO connection creation (bool) parm: disable_ertm:Disable enhanced retransmission mode (bool) 

However most of the time you will not find any explicit version, because the module is simply the one contained in your kernel source tree.

Источник

Does the Linux kernel source code contain device drivers?

I have been interested in kernel development for a while. What I am wondering is whether the kernel source code contains any code about the hardware components. In other words, are device drivers part of kernel source code? If they are part of kernel source code, how can it be possible? By using a virtual machine or dual boot, we can set up Linux in any computer. How does Linus Torvalds write it to be compatible with all computers and their hardware components? I think that device drivers are not part of the kernel.

In fact, device drivers are included in the kernel source code which you can easily verify by downloading it and browsing, for example, drivers/net/wireless. Like Santa Claus with his elves, Mr. Torvalds has many helpers.

Читайте также:  Linux kernel header vmware

2 Answers 2

Device drivers are in the kernel.

Linus wrote the original Linux kernel by himself, and remains very much involved (last I heard about it anyway) but now there are thousands of people developing for the Linux kernel. These folks include employees of companies like Intel who write drivers for their devices for the Linux kernel (and get paid to do it).

Note that one driver can work for many different devices. For example, i915 is the kernel’s Intel CPU driver. There doesn’t need to be a driver for every single different Intel CPU.

Loosely described, Linux kernel development is a huge, widely distributed project overseen by Linus and other core developers, with people contributing as their full time job, part of their work, as a hobby or project, all communicating through mailing lists. Anyone can write a patch for the kernel, patch the kernel, and use and distribute their patched kernel. But if your patch is so great it really ought to be in the kernel by default, with some feedback and help from others, it might get merged into a future kernel release. This open and diffuse model of development, with many minds and perspectives on the job, accounts somewhat for how the Linux kernel manages to support such a wide range of hardware. Here’s the documentation for kernel development.

As chilli555 pointed out you can download the kernel source code and find device drivers. To do this, enable source repositories, create a directory in your home and enter it, and from there run ( sudo is not needed):

You could get it from the linux kernel source code, the same as ubuntu

$ find linux-3.10.0-1127.el7/drivers/net/ethernet/broadcom/ -iname Kconfig | xargs grep -i support tristate "Broadcom 440x/47xx ethernet support" # Auto-select SSB PCI-HOST support, if possible tristate "Broadcom 63xx internal mac support" This driver supports the ethernet MACs in the Broadcom 63xx tristate "QLogic bnx2 support" This driver supports QLogic bnx2 gigabit Ethernet cards. tristate "QLogic CNIC support" This driver supports offload features of QLogic bnx2 gigabit tristate "SB1250 Gigabit Ethernet support" This driver supports Gigabit Ethernet interfaces based on the tristate "Broadcom Tigon3 support" This driver supports Broadcom Tigon3 based gigabit Ethernet cards. bool "Broadcom Tigon3 HWMON support" tristate "Broadcom NetXtremeII 10Gb support" This driver supports Broadcom NetXtremeII 10 gigabit Ethernet cards. bool "Broadcom 578xx and 57712 SR-IOV support" Virtualization support in the 578xx and 57712 products. This tristate "BCMA bus GBit core support" This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus. tristate "Broadcom NetXtreme-C/E support" This driver supports Broadcom NetXtreme-C/E 10/25/40/50 gigabit bool "Broadcom NetXtreme-C/E SR-IOV support" Virtualization support in the NetXtreme-C/E products. This bool "TC Flower offload support for NetXtreme-C/E" bool "Data Center Bridging (DCB) Support" bool "Broadcom NetXtreme-C/E HWMON support" 

Thanks David, How to find the source code ? Debian and ubuntu has the search web page. CentOS could unpack the src.rpm to got the source code

Читайте также:  Виды файловых систем ос linux

Источник

Ethernet Device Drivers¶

Device drivers for Ethernet and Ethernet-based virtual function devices.

  • Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher)
    • Introduction
    • Special Driver Features
    • Full-duplex mode
    • Available Transceiver Types
    • Revision history (this file)
    • Module parameters
    • Overview
    • ENA Source Code Directory Structure
    • Management Interface:
    • Data Path Interface
    • Interrupt Modes
    • Interrupt Moderation
    • RX copybreak
    • Statistics
    • MTU
    • Stateless Offloads
    • RSS
    • DATA PATH
    • 1. Kernel Configuration
    • 2. Driver parameters list
    • 3. Command line options
    • 4. Driver information and notes
    • 5. Debug Information
    • 6. Statistics Support
    • Identifying the Adapter
    • Info versions
    • Parameters
    • Firmware Management
    • Health Reporters
    • Enabling the driver
    • Support
    • Overview
    • Using the device
    • Enabling the driver
    • Support
    • Identifying Your Adapter
    • Configuration
    • Supported ethtool options
    • Command Line Parameters
    • Config file parameters
    • Support
    • License
    • Introduction
    • Features
    • Performance
    • Driver Messages
    • Known Issues
    • Support
    • 1. Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters
    • 1.1. Product Overview
    • 1.2. Driver Description
    • 2. Adapter Installation and Configuration
    • 3. Loading the Driver as a Module
    • 4. Compiling the Driver
    • 5. Testing and Troubleshooting
    • 6. Technical Support
    • Compatibility List
    • Quick Install
    • Compiling the Driver
    • Installing the Driver
    • Parameter Description
    • Configuration Script Sample
    • Troubleshooting
    • Introduction
    • Defining the platform device
    • Platform data
    • PHY Link state polling
    • DM9000A / DM9000B
    • ethtool
    • DPAA Ethernet Overview
    • DPAA Ethernet Supported SoCs
    • Configuring DPAA Ethernet in your kernel
    • DPAA Ethernet Frame Processing
    • DPAA Ethernet Features
    • DPAA IRQ Affinity and Receive Side Scaling
    • Debugging
    • DPAA2 (Data Path Acceleration Architecture Gen2) Overview
    • DPAA2 DPIO (Data Path I/O) Overview
    • DPAA2 Ethernet driver
    • DPAA2 MAC / PHY support
    • DPAA2 Switch driver
    • Checksum Offloading
    • VLAN
    • Multicasting
    • Padding
    • Ethtool
    • Supported Hardware
    • PCI Bars
    • Device Interactions
    • Overview:
    • Supported PCI vendor ID/device IDs:
    • Driver Architecture and Source Code:
    • hinic_hwdev contains the following components:
    • HW Interface:
    • MGMT components:
    • IO components:
    • HW device:
    • hinic_dev contains the following components:
    • Miscellaneous
    • Support
    • Contents
    • In This Release
    • Identifying Your Adapter
    • Driver Configuration Parameters
    • Additional Configurations
    • Support
    • Contents
    • Identifying Your Adapter
    • Command Line Parameters
    • Speed and Duplex Configuration
    • Additional Configurations
    • Support
    • Contents
    • Identifying Your Adapter
    • Command Line Parameters
    • Additional Features and Configurations
    • Support
    • Contents
    • Identifying Your Adapter
    • Additional Features and Configurations
    • Known Issues/Troubleshooting
    • Support
    • Contents
    • Identifying Your Adapter
    • Command Line Parameters
    • Additional Features and Configurations
    • Support
    • Contents
    • Identifying Your Adapter
    • Additional Features and Configurations
    • Support
    • Contents
    • Identifying Your Adapter
    • Command Line Parameters
    • Additional Features and Configurations
    • Known Issues/Troubleshooting
    • Support
    • Contents
    • Identifying Your Adapter
    • Known Issues/Troubleshooting
    • Support
    • Contents
    • Identifying Your Adapter
    • Performance Optimization
    • Known Issues/Troubleshooting
    • Support
    • Contents
    • Overview
    • Identifying Your Adapter
    • Additional Features and Configurations
    • Known Issues/Troubleshooting
    • Support
    • Contents
    • Identifying Your Adapter
    • Important Notes
    • Additional Features and Configurations
    • Performance Optimization
    • Support
    • Trademarks
    • Contents
    • Overview
    • Drivers
    • Basic packet flow
    • Devlink health reporters
    • Quality of service
    • Contents
    • Overview
    • Supported Devices
    • Interface Control
    • Enabling the driver and kconfig options
    • Devlink
    • Switchdev
    • Tracepoints
    • Ethtool counters
    • Compatibility
    • Features
    • 1. Introduction
    • 2. Identifying the adapter/interface
    • 3. Features supported
    • 4. Command line parameters
    • 5. Performance suggestions
    • 6. Support
    • Contents
    • Overview
    • Acquiring Firmware
    • Devlink Info
    • Configure Device
    • Statistics
    • Contents
    • Identifying the Adapter
    • Enabling the driver
    • Configuring the Driver
    • Statistics
    • Support
    • Contents
    • In This Release
    • Feature List
    • Kernel Configuration
    • Command Line Parameters
    • Driver Information and Notes
    • Debug Information
    • Support
    • Multiqueue & CBS & MQPRIO
    • Test setup
    • Test setup for examples
    • Port renaming
    • Dual mac mode
    • Devlink configuration parameters
    • Bridging in dual mac mode
    • Enabling «switch»
    • Bridge setup
    • On/off STP
    • VLAN configuration
    • Add extra VLANs
    • Multicast flooding
    • Access and Trunk port
    • NFS
    • Port renaming
    • Multi mac mode
    • Devlink configuration parameters
    • Enabling «switch»
    • Bridge setup
    • On/off STP
    • VLAN configuration
    • Add extra VLANs
    • Multicast flooding
    • Access and Trunk port
    • I. Supported Devices
    • II. Driver Options
    • III. Things to try if you have problems
    • Abstract
    • The Structure of the RX Ring.
    • The RX RAM full bug/feature
    • The TX ring
    • Contents
    • Support
    • Support

    Источник

Оцените статью
Adblock
detector