欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

centos安装lspci工具

背景:由于centos6.3迷你安装版上没有带lspci工具,在定制内核时,无法用此工具查询硬件相关信息
具体步骤如下:
1.下载 pci包:http://www.kernel.org/pub/software/utils/pciutils/pciutils-3.1.4.tar.bz2
2.解压:tar xvjf pciutils-3.1.4.tar.bz2
3.修改Makefile参数 :
  1.CROSS_COMPILE=arm-none-linux-gnueabi-  (如果GCC报错改回原样)
  2.  ZLIB=no
  3. DNS=no 
4.直接执行make 编译安装
5.查看是否正确安装:
[root@localhost pciutils-3.1.4]# file lspci
lspci: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped 
6.执行/root/pciutils-3.1.4/lspci 命令看是否能读取到PCI信息
7.如果不能读取到,这里需要更新一下:/root/pciutils-3.1.4/update-pciids
8.再一次执行:/root/pciutils-3.1.4/lspc
9.这里命令太长了,使用别名方便使用:
 alias lspci='/root/pciutils-3.1.4/lspci'
 在root/.bashrc文件中添加上面一行,保存并永久生效。

本文出自 “Yi砍柴人” 博客,请务必保留此出处http://join12.blog.51cto.com/1194785/950430

--------------------- 本文来自 婉和 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/wudiyi815/article/details/38325199?utm_source=copy 


来自 https://blog.csdn.net/wudiyi815/article/details/38325199

普通分类: