本文主要是介绍[嵌入式linux]busybox 编译出的 lspci 命令只显示device id的,不支持-vvv解决办法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
busybox应该是有一个自带的简化版lspci,并不是完整的pciutils程序。
如果没有安装pciutils,默认lspci就是下面简化版的。
# lspci -h
lspci: invalid option -- 'h'
BusyBox v1.27.2 (2019-01-02 12:04:07 CST) multi-call binary.Usage: lspci [-mk]List all PCI devices-m Parsable output-k Show driver# lspci
00:00.0 Class 0604: 16c3:abcd
01:00.0 Class 0200: 10ec:8168
busybox(buildroot)安装pciutils
make menuconfig-> Target packages -> Hardware handling[*] pciutils
重新make busybox-rebuild all,在make一下,新的rootfs里面就有完整版的lspci了
# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
# lspci --help
lspci: invalid option -- '-'
Usage: lspci [<switches>]Basic display modes:
-mm Produce machine-readable output (single -m for an obsolete format)
-t Show bus treeDisplay options:
-v Be verbose (-vv for very verbose)
-k Show kernel drivers handling each device
-x Show hex-dump of the standard part of the config space
-xxx Show hex-dump of the whole config space (dangerous; root only)
-xxxx Show hex-dump of the 4096-byte extended config space (root only)
-b Bus-centric view (addresses and IRQ's as seen by the bus)
-D Always show domain numbersResolving of device ID's to names:
-n Show numeric ID's
-nn Show both textual and numeric ID's (names & numbers)Selection of devices:
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots
-d [<vendor>]:[<device>][:<class>] Show only devices with specified ID'sOther options:
-i <file> Use specified ID database instead of /usr/share/pci.ids.gz
-p <file> Look up kernel modules in a given file instead of default modules.pcimap
-M Enable `bus mapping' mode (dangerous; root only)PCI access options:
-A <method> Use the specified PCI access method (see `-A help' for a list)
-O <par>=<val> Set PCI access parameter (see `-O help' for a list)
-G Enable PCI access debugging
-F <file> Read PCI configuration dump from a given file
这篇关于[嵌入式linux]busybox 编译出的 lspci 命令只显示device id的,不支持-vvv解决办法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!