Linux 系统硬件管理的基础知识(一)


以下讲述关于Linux 硬件管理的基础知识,由于很多朋友对这部分知识了解的不全,希望以下的对大家有所帮助。

一、在Linux 硬件管理中,对硬件判别的标识的依据;

在 LinuxSir.Org 讨论区,我们经常看到有些弟兄这样来描述自己的硬件“我的显示卡是XXX牌子的,Linux 不支持怎么办?”。其实这样描述是最差的,大家也根本没有办法提供帮助;因为Linux对硬件的识别是以为芯片组的厂商为依据的,而非硬件的品牌;因为现在硬件厂商大多是OEM的,也就是说硬件的主芯片是他们生产不了的,但他们会从硬件主芯片厂商拿来,焊接在自己的电路板上,这就是OEM 的过程;

无论什么硬件都是以芯片组的厂商为标识的,而不是什么市场看到的这个品牌,那个品牌的;举个例子,我们在市场上看到有各种各样的显卡,其实看一下他们的芯片,大多是ATI和 NVIDIA的,所有的ATI和NVIDIA的驱动都是ATI和NVIDIA开发出来的。所以我们提问的时候,要把硬件的芯片说出来,芯片是驱动的唯一标识,而不是品牌!!!

所以我们要找硬件的驱动时,我们一定要根据硬件主芯片的信息来找相关的驱动;

二、在Linux中查看硬件信息的工具;

Linux 中,并不是没有工具可以查看硬件的芯片信息,应该说Linux的工具能把硬件信息查看的更清楚;下面介绍几个常用的工具;我们最常用的工具还是lspci ;其它的工具只是了解一下;

1、lspci 列出所有PCI 设备;

lspci - list all PCI devices ,主要是有来列出机器中的PCI 设备,比如声卡、显卡、猫、网卡等,主板集成设备也能列出来;lspci 是读取 hwdata 数据库,hwdata 由软件包 hwdata 提供;大约有如下文件;

  1. [beinan@localhost ~]# rpm -ql hwdata-0.158-1  
  2. /etc/hotplug/blacklist  
  3. /etc/pcmcia  
  4. /etc/pcmcia/config  
  5. /usr/X11R6/lib/X11/Cards  
  6. /usr/share/doc/hwdata-0.158  
  7. /usr/share/doc/hwdata-0.158/COPYING  
  8. /usr/share/doc/hwdata-0.158/LICENSE  
  9. /usr/share/hwdata  
  10. /usr/share/hwdata/CardMonitorCombos  
  11. /usr/share/hwdata/Cards  
  12. /usr/share/hwdata/MonitorsDB  
  13. /usr/share/hwdata/pci.ids  
  14. /usr/share/hwdata/pcitable  
  15. /usr/share/hwdata/upgradelist  
  16. /usr/share/hwdata/usb.ids  

lspci 有两个参数是我们常用的,-b 和-v ,lspci 也会把usb接口列出来;

举例: 

  1. [root@localhost beinan]# lspci -b  
  2. 00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)  
  3. 00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller 
    (rev 02)  
  4. 00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller 
    (rev 02)  
  5. 00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)  
  6. 00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)  
  7. 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller
     #1 (rev 03)  
  8. 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller 
    #2 (rev 03)  
  9. 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller 
    #3 (rev 03)  
  10. 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)  
  11. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)  
  12. 00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)  
  13. 00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)  
  14. 00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)  
  15. 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97
     Audio Controller (rev 03)  
  16. 00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)  
  17. 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)  
  18. 02:09.0 CardBus bridge: Texas Instruments Texas Instruments PCIxx21/x515 Cardbus Controller  
  19. 02:09.2 FireWire (IEEE 1394): Texas Instruments Texas Instruments OHCI Compliant IEEE 1394 Host
     Controller  
  20. 02:09.3 Unknown mass storage controller: Texas Instruments Texas Instruments PCIxx21 
    Integrated FlashMedia Controller  
  21. 02:09.4 Class 0805: Texas Instruments Texas Instruments PCI6411, PCI6421, PCI6611, 
    PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) 

请点下方《Linux 系统硬件管理的基础知识二)》。

相关内容

    暂无相关文章