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

    Invaild module format ---insmod in fedora core 2

    when I use insmod to insert a very simple module ( which used in kernel

    2.4.* normally) into kernel 2.6.5, system indicate the error!

    I've searched by google for two days , but have no idea

    anybody has any idea , or please give an example, thankyou!

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Republic Banana
    Did FC2 include a version of the modinit tools ? They are needed for a 2.6 kernel.
    I\'m so tired .....

  3. #3
    so i have!! module-init-tools-3.0 !!

  4. $spacer_open
  5. #4
    Linux User
    Join Date
    Oct 2004
    You can't insert a module compiled for kernel 2.4.x into kernel 2.6.x - if that's what you're trying to do. You have to recompile the module for kernel 2.6.x .
    The Unforgiven
    Registered Linux User #358564

  6. #5
    yes, just I have did something to recompile ,

    but have lots of problem ,

    could any freinds tell me how to insmod ? (

    my system is FC2, kernel-2.6.9 thankyou !

  7. #6
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Republic Banana
    Some more, detailed information would be nice, this sounds like 'HELP, my system is not working' , we need more information.
    So provide the details about what you were doing and what the errors were.
    I\'m so tired .....

  8. #7
    thanks !
    I want to insert the famous examplle of module in kernel-2.6.9, error:
    /************* error below*********************************/
    /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x1: In function `_start':
    : undefined reference to `main'
    hello.o(.text+0xf): In function `hello_init':
    : undefined reference to `printk'
    hello.o(.text+0x2c): In function `hello_exit':
    : undefined reference to `printk'
    collect2: ld returned 1 exit status
    make: *** [hello] Error 1
    /************error above **********************************/
    /************** helllo. c source code********************/
    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/kernel.h>

    static int hello_init(void){
    printk("Hello, world\n");
    return 0;

    static void hello_exit(void){
    printk("Goodbye, cruel work\n");

    /* end of hello.c */

    #my make file is:
    ifneq ($(KERNELRELEASE),)
    obj-m += hello.o

    KDIR += /lib/modules/$(shell uname -r)/build/
    PWD += $(shell pwd)

    $(MAKE) -C $(KDIR)SUBDIRS=$(PWD)modules

    /****************need your help!*********************/

Posting Permissions

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