lspci -k is broken with depmod from kmod since it doesn't generate modules.pcimap anymore
The depmod from kmod no longer generates file modules.pcimap, and lspci -k relies on that as noted at:
https://bugs.gentoo.org/show_bug.cgi?id=462982
null pciutils-3.1.10 # grep -r modules.*map *ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap", uts.release);
lspci.c:char *opt_pcimap; /* Override path to Linux modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n" lspci.man:.RI /lib/modules/ kernel_version /modules.pcimap.
Since this is not fixed in git, I figured it's time to let people know of it here
Thanks for looking into it,
Samuli
Bjorn Helgaas
maintainerQuoted 5 lines · Samuli Suominen
The depmod from kmod no longer generates file modules.pcimap, and lspci -k relies on that as noted at:
Quoted 8 lines
null pciutils-3.1.10 # grep -r modules.*map *
ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap",
uts.release);
lspci.c:char*opt_pcimap; /* Override path to Linux
modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n"
lspci.man:.RI/lib/modules/kernel_version/modules.pcimap.
I don't think this is a kernel problem, and I don't know where to point you. Maybe Lucas or Kay will know?
Quoted 15 lines · Bjorn Helgaas
Quoted 5 lines · Samuli Suominen
The depmod from kmod no longer generates file modules.pcimap, and lspci -k relies on that as noted at:
Quoted 8 lines
null pciutils-3.1.10 # grep -r modules.*map *
ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap",
uts.release);
lspci.c:char*opt_pcimap; /* Override path to Linux
modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n"
lspci.man:.RI/lib/modules/kernel_version/modules.pcimap.
Quoted 2 lines
I don't think this is a kernel problem, and I don't know where to point you. Maybe Lucas or Kay will know?
This is the mailing list referred at pciutils homepage:
"Feedback:
You can ask questions and report bugs on the linux-pci mailing list running on Vger"
Some bug tracking system would be nice.
Bjorn Helgaas
maintainer[+cc Martin]
Quoted 27 lines · Samuli Suominen
Quoted 20 lines · Bjorn Helgaas
Quoted 7 lines · Samuli Suominen
The depmod from kmod no longer generates file modules.pcimap, and lspci -k
relies on that as noted at:Quoted 8 lines
null pciutils-3.1.10 # grep -r modules.*map *
ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap",
uts.release);
lspci.c:char*opt_pcimap; /* Override path to Linux
modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n"
lspci.man:.RI/lib/modules/kernel_version/modules.pcimap.Quoted 2 lines
I don't think this is a kernel problem, and I don't know where to point you. Maybe Lucas or Kay will know?
This is the mailing list referred at pciutils homepage:
Quoted 8 lines
"Feedback:
You can ask questions and report bugs on the linux-pci mailing list running on Vger"
Some bug tracking system would be nice.
Don't worry, we'll figure out where this should go. It's just that I don't know off the top of my head. If it's a pciutils problem, Martin will surely know.
Quoted 15 lines · Bjorn Helgaas
Quoted 5 lines · Samuli Suominen
The depmod from kmod no longer generates file modules.pcimap, and lspci -k relies on that as noted at:
Quoted 8 lines
null pciutils-3.1.10 # grep -r modules.*map *
ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap",
uts.release);
lspci.c:char*opt_pcimap; /* Override path to Linux
modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n"
lspci.man:.RI/lib/modules/kernel_version/modules.pcimap.
Quoted 2 lines
I don't think this is a kernel problem, and I don't know where to point you. Maybe Lucas or Kay will know?
I don't see why modules.{pci,usb}map are needed here. Could we change lspci to do the equivalent to the following instead (either by calling modprobe or using libkmod)?
for i in /sys/bus/pci/*/modalias;
do
modprobe -R cat $i
done
Kay, am I missing anything?
Lucas De Marchi
Quoted 23 lines · Lucas De Marchi
Quoted 15 lines · Bjorn Helgaas
Quoted 5 lines · Samuli Suominen
The depmod from kmod no longer generates file modules.pcimap, and lspci -k relies on that as noted at:
Quoted 8 lines
null pciutils-3.1.10 # grep -r modules.*map *
ls-kernel.c: sprintf(name, "/lib/modules/%s/modules.pcimap",
uts.release);
lspci.c:char*opt_pcimap; /* Override path to Linux
modules.pcimap */
lspci.c:"-p <file>\tLook up kernel modules in a given file instead of default modules.pcimap\n"
lspci.man:.RI/lib/modules/kernel_version/modules.pcimap.Quoted 2 lines
I don't think this is a kernel problem, and I don't know where to point you. Maybe Lucas or Kay will know?
I don't see why modules.{pci,usb}map are needed here. Could we change lspci to do the equivalent to the following instead (either by calling modprobe or using libkmod)?
Quoted 6 lines
for i in
/sys/bus/pci/*/modalias;
do
modprobe -Rcat $i
doneKay, am I missing anything?
Yes, that needs to be converted to use modaliases, if that feature is desired in lspci. The information is available in /sys and modprobe can be used to resolve that to module names. The old hotplug maps files are gone.
Kay
Hello!
Quoted 4 lines
Yes, that needs to be converted to use modaliases, if that feature is desired in lspci. The information is available in /sys and modprobe can be used to resolve that to module names. The old hotplug maps files are gone.
I'm looking into that. Expect a pciutils patch soon.
Have a nice fortnight
Signature · 3 lines
Martin `MJ' Mares <[email protected]> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth The computer is mightier than the pen, the sword, and usually, the programmer.
Hello!
Quoted 1 line
I'm looking into that. Expect a pciutils patch soon.
Please check the current version in git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
Looking up modules using libkmod should be fully supported.
Have a nice fortnight
Signature · 3 lines
Martin `MJ' Mares <[email protected]> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth Who is General Failure and why is he reading my disk?
Quoted 10 lines · Martin Mares
Hello!
Quoted 1 line
I'm looking into that. Expect a pciutils patch soon.
Please check the current version in
git://git.kernel.org/pub/scm/utils/pciutils/pciutils.gitLooking up modules using libkmod should be fully supported.
Have a nice fortnight
I spotted two possible problems with the commit
First, $PKG_CONFIG is not respected and call to pkg-config is hardcoded, this is likely to break cross-compiling
Since kmod is optional even in systemd source tree, and module loading is optional in the kernel, some embedded Linux users likely wants to enable/disable libkmod at will, for this there should be a ./configure flag of some sort
Thanks for your work!
- Samuli
Hello!
Quoted 2 lines
First, $PKG_CONFIG is not respected and call to pkg-config is hardcoded, this is likely to break cross-compiling
It's respected now.
Quoted 4 lines
Since kmod is optional even in systemd source tree, and module loading is optional in the kernel, some embedded Linux users likely wants to enable/disable libkmod at will, for this there should be a ./configure flag of some sort
Just use "make LIBKMOD=no".
Have a nice fortnight
Signature · 3 lines
Martin `MJ' Mares <[email protected]> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth A: No. Q: Should I include quotations after my reply?