I am trying to compile a driver. See below
The instructions are simple, just type "make all", etc.
But the compile fails when it comes across an undefined identifier.
But the identifier is defined in a sub-sub directory of the directory that "make[2]" searched.
1. Does the compiler's search stop at the first directory that it entered? Can I force it go deeper?
2. Where is the definition of the directory that the compiler is searching? I've tried /etc/environment (no effect)
I did two days of google searches, got 3 books from the library. I really stuck!
Thanks for your help
terry@terry-desktop:~$ make all
make -C kmodule/ modules
make[1]: Entering directory `/home/terry/kmodule'
make -C /lib/modules/2.6.32-21-generic/build M="/home/terry/kmodule" modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.32-21-generic'
CC [M] /home/terry/kmodule/martian.o
/home/terry/kmodule/martian.c: In function ‘martian_isr’:
/home/terry/kmodule/martian.c:131: warning: value computed is not used
/home/terry/kmodule/martian.c:148: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/terry/kmodule/martian.c:148: error: (Each undeclared identifier is reported only once
/home/terry/kmodule/martian.c:148: error: for each function it appears in.)
/home/terry/kmodule/martian.c: In function ‘martian_read’:
/home/terry/kmodule/martian.c:554: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/terry/kmodule/martian.c:554: error: implicit declaration of function ‘signal_pending’
/home/terry/kmodule/martian.c:554: error: implicit declaration of function ‘schedule’
make[3]: *** [/home/terry/kmodule/martian.o] Error 1
make[2]: *** [_module_/home/terry/kmodule] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-21-generic'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/terry/kmodule'
make: *** [all] Error 2
terry@terry-desktop:~$
Bookmarks