Re: insmod: Invalid module format (2.6.4-52-default, gcc-3.3.3)

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

 



On 6/19/05, MHD.Tayseer <gilmour@xxxxxxxxxxx> wrote:

> KERNEL_SOURCE = /usr/src/linux-`uname -r`/
> obj-m := t2.o
> default:
>      make -C  ${KERNEL_SOURCE} SUBDIRS=`pwd` modules


Bang!

This works. :) I guess the 

CFLAGS = -g -D__KERNEL__ -DMODULE -I$(KERNEL_SOURCE)/include -O -Wall

was creating problems. Now, so that we understand it better, any ideas
why? Does the kbuild process already know (through the obj-m flag)
that we need to build this binary as a module thereby rendering the
-D__KERNEL__ and -DMODULE flags redundant? Nevertheless, why would
that be a problem anyway?

Thanks a lot,
./h

./h

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