Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    insmod : Invalid module format

    hi all,
    i am trying to get a simple module working

    #include <linux/init.h>
    #include <linux/module.h>
    static int hello_init(void)
    printk(KERN_ALERT "Hello, world\n");
    return 0;
    static void hello_exit(void)
    printk(KERN_ALERT "Goodbye, cruel world\n");

    obj-m +=hello.o
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

    the module is created but not inserted.
    I m using Ununtu 9.10 with kernel 2.6.33-020633-generic downloaded as deb file from ubuntu site .

    Plzz help..

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    So, where in your make file are you installing the kernel module? Have you tried to install it manually?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Quote Originally Posted by Rubberman View Post
    So, where in your make file are you installing the kernel module? Have you tried to install it manually?
    i have posted the make file in the first post.
    i tried to install kernel manually but finally got this error
    make[1]: Leaving directory `/usr/src/linux-'
    test ! -e scripts/package/builddeb || mv -f scripts/package/builddeb scripts/package/builddeb.kpkg-dist
    test ! -e scripts/package/Makefile || test -f scripts/package/Makefile.kpkg-dist || (mv -f scripts/package/Makefile scripts/package/Makefile.kpkg-dist && (echo "# Dummy file "; echo "help:") > scripts/package/Makefile)
    COLUMNS=150 dpkg -l 'gcc*' perl dpkg 'libc6*' binutils make dpkg-dev |\
    awk '$1 ~ /[hi]i/ { printf("%s-%s\n", $2, $3) }'> debian/buildinfo
    uname -a >> debian/buildinfo
    echo using the compiler: >> debian/buildinfo
    grep LINUX_COMPILER include/linux/compile.h | \
    sed -e 's/.*LINUX_COMPILER "//' -e 's/"$//' >> debian/buildinfo
    grep: include/linux/compile.h: No such file or directory
    echo applied kernel patches: >> debian/buildinfo
    echo done > debian/stamp/build/kernel
    /usr/bin/make -f ./debian/rules debian/stamp/binary/pre-linux-image-
    make[1]: Entering directory `/usr/src/linux-'
    ====== making target debian/stamp/install/linux-image- [new prereqs: ]======
    This is kernel package version 11.015.
    echo "The UTS Release version in include/linux/version.h"; echo " \"\" "; echo "does not match current version:"; echo " \"\" "; echo "Please correct this."; exit 2
    The UTS Release version in include/linux/version.h
    does not match current version:
    Please correct this.
    make[1]: *** [debian/stamp/install/linux-image-] Error 2
    make[1]: Leaving directory `/usr/src/linux-'
    make: *** [kernel_image] Error 2

    such a large error message so i decided to go for packaged kernel.

  4. $spacer_open

Posting Permissions

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