Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I'm hoping someone can help me out with this. I need to add a .ko file to my kernel. What I'm doing right now is using insmod everytime I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    21

    adding a .ko libary to the kernel


    Hello, I'm hoping someone can help me out with this.
    I need to add a .ko file to my kernel. What I'm doing right now is using insmod everytime I boot. But I would like it to load at boot automatically. I've also put the it in my /lib/modules/2.6.81 folder, but this has not work.
    Can anyone advise?
    Thanks!

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    So do you want the module to be built in to the kernel, or do you want to just have it automatically modprobe/insmod'd at bootup?

  3. #3
    Just Joined!
    Join Date
    Sep 2005
    Posts
    21
    The first would be best if possible from the ko file?

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035

  5. #5
    Just Joined!
    Join Date
    Jan 2006
    Location
    India
    Posts
    52
    If you are inserting kernel modules included as part of source tree, then

    You can insert that module either statically /Dynamically.

    *Statically including the kernel module

    You need to recompile the kernel if you want .ko available every time you boot the system.
    Run <make menuconfig>
    And select the correspondig kernel configuration option.
    You have three options:
    1> Build into kernel
    2> Build as kernel module
    3> Ignore the module
    But you have two kernel images now with and without '.ko' module.

    *Dynamically inserting the kernel module

    What ever you have mentioned is, nothing but dynamic way of inserting modules.
    If you want it to insert automatically every time when your system boots, then please see the '/etc/init.d/boot.loadmoules' script for inserting the modules on reboot.

  6. #6
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401
    Quote Originally Posted by rajeshk
    If you want it to insert automatically every time when your system boots, then please see the '/etc/init.d/boot.loadmoules' script for inserting the modules on reboot.
    This depends on distro... I'm using Debian and I use /etc/modules.
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •