modul library association - Embedded

This is a discussion on modul library association - Embedded ; Kernel 2.6: When I do a system with kernel modules, I create multiple kernel versions for testing, and I use boot loader options to load one of them, how does the system find the correct location for the modules' *.ko ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: modul library association

  1. modul library association

    Kernel 2.6:

    When I do a system with kernel modules, I create multiple kernel
    versions for testing, and I use boot loader options to load one of them,
    how does the system find the correct location for the modules' *.ko files ?

    Thanks,
    -Michael

  2. Re: modul library association

    Michael Schnell schrieb:
    > Kernel 2.6:
    >
    > When I do a system with kernel modules, I create multiple kernel
    > versions for testing, and I use boot loader options to load one of them,
    > how does the system find the correct location for the modules' *.ko files ?


    Doesn't the kernel simply use something like

    /lib/modules/$(uname -r)

    to find the base directory for module files ?

    /S
    --
    Stefan Naewe
    naewe.s_AT_atlas_DOT_de

  3. Re: modul library association

    Stefan Nwe wrote:
    > Michael Schnell schrieb:
    >> Kernel 2.6:
    >>
    >> When I do a system with kernel modules, I create multiple kernel
    >> versions for testing, and I use boot loader options to load one of them,
    >> how does the system find the correct location for the modules' *.ko files ?

    >
    > Doesn't the kernel simply use something like
    >
    > /lib/modules/$(uname -r)
    >
    > to find the base directory for module files ?
    >
    > /S


    Sounds good.

    That means I would need to change the uname for the different kernel
    versions. How do I do that properly ?

    Thanks,

    -Michael

  4. Re: modul library association

    Stefan Nwe wrote:
    > Michael Schnell schrieb:
    >> Kernel 2.6:
    >>
    >> When I do a system with kernel modules, I create multiple kernel
    >> versions for testing, and I use boot loader options to load one of them,
    >> how does the system find the correct location for the modules' *.ko files ?

    >
    > Doesn't the kernel simply use something like
    >
    > /lib/modules/$(uname -r)
    >
    > to find the base directory for module files ?
    >
    > /S


    Sounds good.

    That means I would need to change the Kernel Release name for the
    different kernel versions. How do I do that properly ?

    Thanks,

    -Michael

  5. Re: modul library association

    Michael Schnell schrieb:
    > Stefan Nwe wrote:
    >> Michael Schnell schrieb:
    >>> Kernel 2.6:
    >>>
    >>> When I do a system with kernel modules, I create multiple kernel
    >>> versions for testing, and I use boot loader options to load one of them,
    >>> how does the system find the correct location for the modules' *.ko
    >>> files ?

    >>
    >> Doesn't the kernel simply use something like
    >>
    >> /lib/modules/$(uname -r)
    >>
    >> to find the base directory for module files ?
    >>
    >> /S

    >
    > Sounds good.
    >
    > That means I would need to change the Kernel Release name for the
    > different kernel versions. How do I do that properly ?


    Huh?
    You don't need to change anything!

    Look at the output of 'uname -r' on different kernel versions.

    /S
    --
    Stefan Naewe
    naewe.s_AT_atlas_DOT_de

  6. Re: modul library association

    > You don't need to change anything!
    >
    > Look at the output of 'uname -r' on different kernel versions.
    >


    Thanks, I think found out what I need to do.

    In the kernel configuration I set "general_setup" -> "local_version" to
    some different texts to specify the different versions used in parallel.

    -Michael

  7. Re: modul library association

    Michael Schnell wrote:

    >> You don't need to change anything!
    >>
    >> Look at the output of 'uname -r' on different kernel versions.
    >>

    >
    > Thanks, I think found out what I need to do.
    >
    > In the kernel configuration I set "general_setup" -> "local_version" to
    > some different texts to specify the different versions used in parallel.
    >


    Now I'm with you!
    You want to test the same kernel version with different configs.
    Then 'local version' is the way to go ('uname -r' will give you different
    results.)

    /S

    --


  8. Re: modul library association


    > Now I'm with you!
    > You want to test the same kernel version with different configs.
    > Then 'local version' is the way to go ('uname -r' will give you different
    > results.)
    >

    Great !
    Thanks,
    -Michael

  9. Re: modul library association

    > Now I'm with you!
    > You want to test the same kernel version with different configs.
    > Then 'local version' is the way to go ('uname -r' will give you different
    > results.)
    >


    Additionally I want to check different versions of (usually my own)
    Kernel modules (loadable and not loadable).


    -Michael

  10. Re: modul library association

    >>>
    >>> Look at the output of 'uname -r' on different kernel versions.
    >>>

    >> Thanks, I think found out what I need to do.
    >>
    >> In the kernel configuration I set "general_setup" -> "local_version" to
    >> some different texts to specify the different versions used in parallel.
    >>

    >
    > Now I'm with you!
    > You want to test the same kernel version with different configs.
    > Then 'local version' is the way to go ('uname -r' will give you different
    > results.)
    >


    This does not seem to work, but maybe I do have some other booting problem.

    I did a test on a desktop PC running SUSE 9.2 (running 2.6.11 before).

    I compiled a new kernel and with "make modules_install" indeed the
    modules were copied to /lib/modules/2.6.16-default/ .

    Now I copied the new bzImage from /usr/src/linux/arch/i368/boot/bzImage
    to /boot/bzImage_2.

    I created a menu entry for grub in /boot/grub/menu.lst pointing to
    bzImage_2. (I Know with lilo I would need to call lilo to activate this,
    but grub seems to do without such an action.)

    When booting, now I get an "insmod" error message that the modules in
    /lib/modules/2.6.11-21.11-default/ are in "an invalid module format" for
    the Kernel.

    It seem that the new kernel uses the old setting for the module directory.

    any help ?

    -Michael

  11. Re: modul library association


    Michael Schnell wrote:

    > I did a test on a desktop PC running SUSE 9.2 (running 2.6.11 before).
    >
    > I compiled a new kernel and with "make modules_install" indeed the
    > modules were copied to /lib/modules/2.6.16-default/ .
    >
    > Now I copied the new bzImage from /usr/src/linux/arch/i368/boot/bzImage
    > to /boot/bzImage_2.
    >
    > I created a menu entry for grub in /boot/grub/menu.lst pointing to
    > bzImage_2. (I Know with lilo I would need to call lilo to activate this,
    > but grub seems to do without such an action.)
    >
    > When booting, now I get an "insmod" error message that the modules in
    > /lib/modules/2.6.11-21.11-default/ are in "an invalid module format" for
    > the Kernel.
    >
    > It seem that the new kernel uses the old setting for the module directory.
    >
    > any help ?
    >
    > -Michael


    Hi Michael -

    Why are you doing a manual copy to the boot directory?

    If you do "sudo make install modules_install" the kernel build system
    will correctly set stuff up. Then you need to modify the boot loader
    (grub or Lilo) to tell it the name and options.

    You may also have to create an initrd file depending on how your distro
    set up the boot. Use google for instructions for that, they vary per
    distribution.

    Regards, Steve


  12. Re: modul library association

    > Why are you doing a manual copy to the boot directory?
    >
    > If you do "sudo make install modules_install" the kernel build system
    > will correctly set stuff up. Then you need to modify the boot loader
    > (grub or Lilo) to tell it the name and options.
    >


    After some more trial and error I found, that, when I do "make install"
    _both_ with the new system _and_ with the old one, I can switch between
    them using a GRUB menu. (details see the comp.os.linux.setup group.)

    Thanks,
    -Michael

+ Reply to Thread