linux kernel module programming

This is a discussion on linux kernel module programming within the Linux Programming forums, part of the Platform Specific Boards category; hi, i m using same program and makefile as CIRCUIT and compiling the way NYDA says.Still I m Stuck on ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    1

    Question having same error as CIRCUIT

    hi,

    i m using same program and makefile as CIRCUIT and compiling the way NYDA says.Still I m Stuck on same error

    insmod: error inserting './hello.ko': -1 Invalid module format

    i m getting a ko file so y the error.

    i m using 2.6.22 kernel.

    Any help is welcome :-)

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,742
    Split from linux kernel module programming
    Removed size abuse - we can read normal sized text thanks.
    Don't bump ancient threads in future.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm pretty sure the problem here is that you are using "old" style compilation. The thread where this appears to have come from is pretty old and refers to a 2.4 kernel - not so long ago, I found that making my own module wasn't working as the book I was reading. Reason: Book talked about 2.4 kernel, and I had a 2.6.13 or so kernel. 2.6 has a different kernel format.

    There are a few different solutions - in my case, I choose to just add my module to the normal kernel build.

    Try searching for some info based on 2.6 kernel.

    --
    Mats

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling Linux kernel on Windows
    By jmd15 in forum Linux Programming
    Replies: 9
    Last Post: 04-10-2006, 08:28 AM
  2. linux kernel module programming
    By circuit in forum Linux Programming
    Replies: 10
    Last Post: 12-01-2004, 06:08 PM
  3. Linux kernel not compiling
    By frenchfry164 in forum Tech Board
    Replies: 2
    Last Post: 04-29-2003, 05:10 PM
  4. linux kernel 2.5
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-01-2002, 12:17 AM
  5. Function basics
    By sjleonard in forum C++ Programming
    Replies: 15
    Last Post: 11-21-2001, 12:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21