On Wed, Mar 09, 2005 at 09:53:42AM +0000, Przemyslaw Urbanski wrote: > I am very beginner at kernel programing, and I have to work with > someones else code. Anyway, I do not know which header should be > included from <asm/mach-default/...> (if any) If you don't know what to include, figure that out first. You shouldn't randomly include header files. > anyway, when I get rid of -I/lib/modules..... option from my makefile > i'm getting warnings (which stops me from loading module afterward) > like: > > *** Warning: "__subdf3" [/tmp/123/ppval.ko] undefined! > *** Warning: "__muldf3" [/tmp/123/ppval.ko] undefined! > *** Warning: "__divdf3" [/tmp/123/ppval.ko] undefined! > *** Warning: "__ledf2" [/tmp/123/ppval.ko] undefined! > *** Warning: "__adddf3" [/tmp/123/ppval.ko] undefined! > *** Warning: "__fixunsdfsi" [/tmp/123/ppval.ko] undefined! > *** Warning: "__ltdf2" [/tmp/123/ppval.ko] undefined! > *** Warning: "__floatsidf" [/tmp/123/ppval.ko] undefined! That's a linker error, not a compiler error. For 2.4 kernels, your CFLAGS should look like: LINUXSRC = /lib/modules/$(shell uname -r)/build CFLAGS = -D__KERNEL__ -DMODULE -O2 -Wall -I$(LINUXSRC)/include For 2.6 kernels, you should use the kbuild system, and your Makefile should look like described in http://lwn.net/Articles/21823/ . Erik -- Erik Mouw J.A.K.Mouw@xxxxxxxxxxxxxx mouw@xxxxxxxxxxxx
Attachment:
signature.asc
Description: Digital signature