- depmod - I am having problems - where can I get the latest source code ?
- Posted by Mark Hobley on February 28th, 2004
I am having a problem with the depmod utility.
I am trying to build modules for the 2.6.2 kernel, using a machine
running a 2.4 kernel
I am using customized paths and I want to achieve the following:
My modules are located in:
/u1/build/kmodules/
I want depmod to create a modules.dep file at the following location:
/u1/build/kmodules/modules.dep
it is trying to write to the following location, which is not what I
want:
/u1/build/kmodules/lib/modules/2.6.0/modules.dep
It has appended a /lib/modules/2.6.0 to my customized path name.
I want to modify the behaviour not to do this and I require the latest
source code.
Where do I obtain this ?
Thanks in advance to anyone who can help.
- Posted by Mark Hobley on February 29th, 2004
Ok, I have found the source.
It is part of the modules-init-tools project.
The problem with the depmod utility is as follows:
There does not appear to be an option to prevent depmod from appending
/lib/modules/2.x.x to the output path when using the -b option.
For example:
depmod -ae -F System.map -b /u1/build/kmodules -r 2.6.0
gives error:
depmod: Can't open /u1/build/kmodules/lib/modules/2.6.0/modules.dep
for writing.
The directory /u1/build/kmodules exists with read,write,execute
permission.
The depmod utility is trying to write to a subdirectory
lib/modules/2.6.0, which does not exist.
This is causing the kernel building process to fail.
--
- Posted by hidave on March 1st, 2004
From man page:
-b basedir --basedir basedir
If your modules are not currently in the (normal) directory
/lib/modules/version, but in a staging area, you can specify
a basedir which is prepended to the directory name. This
basedir is stripped from the resulting modules.dep file, so
it is ready to be moved into the normal location.
markhobley@hotpop.deletethisbit.com (Mark Hobley) wrote in message news:<4041df01.69292905@news.blueyonder.co.uk>...
pmod utility is trying to write to a subdirectory
- Posted by Gillian Hobley on March 2nd, 2004
On 1 Mar 2004 02:05:58 -0800, dave-young@163.net (hidave) wrote:
On my target machine, custom paths will apply.
I actually wish to override /lib/modules/version with a pathname of my
own.
- Posted by Mark Hobley on March 5th, 2004
On my system, which is under development kernel modules are located in
/kernel/modules instead of /lib/modules.
The module-init-tools have hard coded paths to /lib/modules which has
been causing a problem with the kernel build.
There does not appear to be a method of overriding the path using an
environment variable or a command line switch.
Looking through the code, in both depmod.c and modinfo.c there appears
a line as follows:
#define MODULE_DIR "/lib/modules"
I have amended this to:
#define MODULE_DIR "/kernel/modules"
I am currently testing this to see if it solves the problem.
The facility to override paths by a command line switch or a change to
the environment would be ideal.