Linux

如何在 linux 核心更新中檢查驅動程序版本

  • January 24, 2013

如何在 NIC 的 linux 核心更新中找到有關驅動程序版本的資訊:

目前的:

# uname -r
2.6.32-279.2.1.el6.x86_64
# ethtool -i eth0
driver: e1000e
version: 1.9.5-k
firmware-version: 2.1-2
bus-info: 0000:02:00.0

可用的核心更新:

# yum check-update kernel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.for.me.uk
* epel: mirrors.coreix.net
* extras: centos.mirroring.pulsant.co.uk
* updates: mirror.for.me.uk

kernel.x86_64                                                               2.6.32-279.19.1.el6

如何確定此驅動程序的實際版本是什麼 - 是否有任何其他命令用於此目的?

# rpm -q --changelog kernel.x86_64 0:2.6.32-279.19.1.el6 | egrep -i 'e1000' | grep -i 'version'
- [netdrv] e1000e: update to upstream version 1.4.4 (Andy Gospodarek) [730607]
- [netdrv] e1000e: update to upstream version 1.3.16-k (Andy Gospodarek) [694223 698291]
- [netdrv] e1000e: upstream to upstream version 1.2.20 (Andy Gospodarek) [636325]
- [netdrv] e1000e: update driver version number (Andy Gospodarek) [582803]
- [netdrv] e1000: update DRV_VERSION to match upstream (Dean Nelson) [737719]
- [netdrv] e1000: remove not used fw_version from .get_drvinfo (Dean Nelson) [737719]
- [netdrv] e1000e: increase version number (Dean Nelson) [737713]
- [netdrv] e1000e: cleanup strlcpy conversion of .get_drvinfo routines (Dean Nelson) [737713]
- [netdrv] e1000e: update to upstream version 1.4.4 (Andy Gospodarek) [730607]
- [netdrv] e1000e: update to upstream version 1.3.16-k (Andy Gospodarek) [694223 698291]
- [netdrv] e1000e: upstream to upstream version 1.2.20 (Andy Gospodarek) [636325]
- [netdrv] e1000e: update driver version number (Andy Gospodarek) [582803]
- [netdrv] e1000: update DRV_VERSION to match upstream (Dean Nelson) [737719]
- [netdrv] e1000: remove not used fw_version from .get_drvinfo (Dean Nelson) [737719]
- [netdrv] e1000e: increase version number (Dean Nelson) [737713]
- [netdrv] e1000e: cleanup strlcpy conversion of .get_drvinfo routines (Dean Nelson) [737713]
- [netdrv] e1000e: update to upstream version 1.4.4 (Andy Gospodarek) [730607]
- [netdrv] e1000e: update to upstream version 1.3.16-k (Andy Gospodarek) [694223 698291]
- [netdrv] e1000e: upstream to upstream version 1.2.20 (Andy Gospodarek) [636325]
- [netdrv] e1000e: update driver version number (Andy Gospodarek) [582803]
/sbin/modinfo e1000e

這將向您顯示目前核心模組中核心模組的版本。

或者,您可以使用 -k 選項來選擇特定的核心版本:

/sbin/modinfo -k 2.6.32-220.4.1.el6.x86_64

您還可以指定核心模組的文件名而不是名稱:

modinfo /lib/modules/2.6.32-220.4.1.el6.x86_64/kernel/drivers/net/e1000e/e1000e.ko

引用自:https://serverfault.com/questions/472013