[嵌入式linux]busybox 编译出的 lspci 命令只显示device id的,不支持-vvv解决办法
busybox应该是有一个自带的简化版lspci,并不是完整的pciutils程序。如果没有安装pciutils,默认lspci就是下面简化版的。# lspci -hlspci: invalid option -- 'h'BusyBox v1.27.2 (2019-01-02 12:04:07 CST) multi-call binary.Usage: lspci [-mk]...
·
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 tree
Display 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 numbers
Resolving 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's
Other 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
更多推荐
已为社区贡献1条内容
所有评论(0)