Re: how to build .ko on linux

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

 



Hi,
   on 2.6 kernesl you can build module with following command
 make -C /lib/modules/2.6.9-22.ELsmp/build M=/home/kishore
 where its assumed that u have your kernel module C file under
/home/kishore and you can replace for whatever kernel you want to
bulid module instaed of 2.6.9-22.ELsmp
regards,
Parag.

On 12/29/05, kishore <kishore@xxxxxxxxxxxxxxxxxxx> wrote:
> 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/
>
>

--
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