kernel module compilation error

Vijay Nikam vijay.t.nikam at gmail.com
Fri May 15 21:51:21 EST 2009


Hello All,

I upgraded the Linux kernel version from 2.6.20 to 2.6.23 on eval
board mpc8313erdb. Then I wrote a simple hello_world kernel module for
testing but when I do make it gives following compilation error.
Whereas I did not had this problem with kernel 2.6.20 !!!

It says; 'include/asm/current.h:35: error: invalid register name for ‘current’'

Following is complete error log

################################
make -C /usr/local/mpc8313/linux-2.6.23 M=/opt/test/module/hello_world modules
make[1]: Entering directory `/usr/local/mpc8313/linux-2.6.23'
CC [M] /opt/test/module/hello_world/hello.o
In file included from include/linux/capability.h:48,
from include/linux/sched.h:50,
from include/asm/elf.h:6,
from include/linux/elf.h:8,
from include/linux/module.h:15,
from /opt/test/module/hello_world/hello.c:5:
include/asm/current.h:35: error: invalid register name for ‘current’
make[2]: *** [/opt/test/module/hello_world/hello.o] Error 1
make[1]: *** [_module_/opt/test/module/hello_world] Error 2
make[1]: Leaving directory `/usr/local/mpc8313/linux-2.6.23'
make: *** [all] Error 2
############################################

Could anyone please let me know the way to proceed or a way to think
to resolve this issue ? ? ?

Kindly please acknowledge ... thank you.

Kind Regards,
Vijay Nikam



More information about the Linuxppc-dev mailing list