depmod - I am having problems - where can I get the latest source code ? - Help

This is a discussion on depmod - I am having problems - where can I get the latest source code ? - Help ; 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 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: depmod - I am having problems - where can I get the latest source code ?

  1. depmod - I am having problems - where can I get the latest source code ?

    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.

  2. Re: depmod - I am having problems - where can I get the latest source code ?

    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.

    --



  3. Re: depmod - I am having problems - where can I get the latest source code ?

    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>...
    > 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 de


    pmod 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.
    >
    > --


  4. Re: depmod - I am having problems - where can I get the latest source code ?

    On 1 Mar 2004 02:05:58 -0800, dave-young@163.net (hidave) wrote:

    >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.
    >


    On my target machine, custom paths will apply.

    I actually wish to override /lib/modules/version with a pathname of my
    own.

  5. depmod and modinfo have hard coded paths

    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.


  6. Re: depmod and modinfo have hard coded paths

    gOn Fri, 05 Mar 2004 23:11:36 GMT, markhobley@hotpop.deletethisbit.com
    (Mark Hobley) wrote:

    >#define MODULE_DIR "/lib/modules"
    >
    >I have amended this to:
    >
    >#define MODULE_DIR "/kernel/modules"


    Wouldn't it have been easier and more reliable to create a link from
    where the libs are to where it wants them?

    --
    Joe Zeff
    The Guy With the Sideburns
    If it ain't baroque, don't fix it.
    http://www.lasfs.org http://home.earthlink.net/~sidebrnz

+ Reply to Thread