Kernel modules placed into wrong directory on some distros
Status: Beta
Brought to you by:
biop0b
Make install puts the modules into
/lib/modules/kernel-version (e.g /lib/modules/2.6.12-9).
Some distros like Debian and Ubuntu search for the
modules in /lib/modules/kernel-version-architecture
(e.g. /lib/modules/2.6.12-9-686). In that case the
files are in the wrong place and modprobe doesn't find
them.
Logged In: YES
user_id=54451
Yes, this is a known problem.
We are using the kernel build system and do a "make
modules_install" for our driver. But many distros add
various suffixes to the kernel version like the
architecture, "-smp", etc.
I don't know if using /lib/modules/`uname -r`/ would work
for this problem. We can additional copy the modules by
hand, when the directory "uname -r" exists under /lib/modules/.
Logged In: YES
user_id=1109714
uname -r returns 2.6.12-9-686 for me i.e.
/lib/modules/`uname -r`/ works.
In my opinion there's no need to put the modules in to the
wrong directory first and copying them to the "right one"
after that.
Logged In: YES
user_id=1109714
Detecting the right place would be much better IMO.
Another quick and dirty fix ist reading out /etc/lsb-release.
This is the Linux Standards Base method.
As far as I know Debian isn't that far, yet. Ubuntu is, btw.
I think /etc/debian_release and /etc/debian_version should
help in that case.
Logged In: YES
user_id=1109714
In the current CVS the modules aren't placed into any
directory at all, because /lib/modules/$(uname -r)/extras
doesn't exist.
I don't know the directory structure of other distros by
heart, but at least on Debian and ubuntu, it's different and
no folder "extras" exists.
I'll attach the output of tree.
I think the subdirectories /lib/modules/$/uname
-r)/kernel/drivers/ are the appropiate location for the
modules. I know that you can put them anywhere you want, but
I think it would look nicer if they were at the "correct"
location.
Directory structure of /lib/modules/ (including files)
Directory structure of /lib/modules/ (without files)