how to build .ko on linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,

       In kernel version 2.6.9-16.EL, the loadable modules will have an
extension .ko rather than .o

      My module name is pw_module.c,  am using
      gcc -c -Wall -O2 -DLINUX -DMODULE -D__KERNEL__
pw_module.c -I/lib/modules/`uname -r`/build/include
         will result in pw_module.o

     Its working fine on kernel version 2.4.18-14.
     If i tried to load the same module on kernel version 2.6.9-16.EL,
resulting an  "error : Invalid module format."

    Can any one suggest, how to build .ko file on kernel version
2.6.9-16.EL .
    Thanks, in advance.

regards,
kishore,packetware.




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux