Find the answer to your Linux question:
Results 1 to 2 of 2
In my project, I am trying to build a loadable .ko file for a Linux box with specific linux kernel (uname -r result is 2.6.24-1-486) installed on it. This Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    1

    Angry [help] try to build loadable .ko file for a specific kernel (2.6.24-1-486)


    In my project, I am trying to build a loadable .ko file for a Linux box with specific linux kernel (uname -r result is 2.6.24-1-486) installed on it.
    This Linux box contains no directory named /lib/modules/2.6.24-1-486/build; it contains no related kernel header files for its 2.6.24-1-486 kernel. The remaining docs of it say that some test/unstable Debian release with 2.6.24 kernel may be OK to produce loadable .ko kernel modules for it.
    I tried several 2.6.24 kernels, and just got the version verifying failure info below:
    # insmod my_kernel_mod.ko
    insmod: error inserting 'my_kernel_mod.ko': -1 Invalid module format
    # dmesg|tail
    my_kernel_mod: disagrees about version of symbol struct_module
    my_kernel_mod: disagrees about version of symbol struct_module

    Thus, I think I do need the Linux kernel source files (or just header files) with specific kernel version: 2.6.24-1-486. But, I cannot find this kind of 2.6.24-1-486 stuffs...

    Does any know how to download the Linux kernel source files (or just header files) with specific kernel version 2.6.24-1-486??

    Thanks a lot in advance.

  2. #2
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    Your using Debian? Try using apt to install those. You first need to gain root privileges, using sudo or su.

    For the kernel source:
    Code:
    sudo apt-get install linux-source
    For the headers, try using the uname -r , surrounded by backticks.
    Code:
    sudo apt-get install kernel-headers-`uname -r`
    The purpose of that is to install the headers for the currently running kernel. If you run the uname -r command in a terminal (without the backticks), it will give you the currently running kernel. It is a method of running a command within another command.

    That being said, it will not always work, and you may have to specify the exact header version to install. Open the Synaptic Package Manager, and look to see what is available to install.
    Please do not send Private Messages to me with requests for help. I will not reply.

Posting Permissions

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