It seems nobody can help me. I'm still trying to fix that and found out some things:
Now I'm trying to compile my own module where I use the function mentioned above.
The module is a char device driver and the important parts are the following:
# include <linux/init.h># include <linux/module.h># include <linux/ioport.h># include <linux/fs.h># include <asm/io.h># include <asm/uaccess.h>
__copy_from_user(cmd,buffer,2);
Now i don't get the errors anymore, but warnings instead:
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__copy_from_user" undefined!
The Makefile: (for building outside the kernel tree)
obj-m := mymod.o
all:
$(MAKE) -C ../../../uClinux-dist SUBDIRS=$(PWD) modules
Eventually the module is built, but when I try to plug it into the running kernel, I get this error:
root:~> insmod mymod.ko
mymod: Unknown symbol __copy_from_user
insmod: can't insert 'mymod.ko': unknown symbol in module, or unknown parameter
Am I missing something here? Cause the symbol _is_ actually defined, as I can see from /proc/kallsyms:
root:~> cat /proc/kallsyms | grep copy_from_user
c8006854 T __copy_from_user
c8008210 T copy_from_user_page
c805075c t __iovec_copy_from_user_inatomic
c805081c T iov_iter_copy_from_user
c80508ac T iov_iter_copy_from_user_atomic
c8086654 t pipe_iov_copy_from_user
c8123d58 T csum_partial_copy_from_user
One other thing I've found is this post on the forum:
http://www.alteraforum.com/forum/showthread.php?t=14426 (
http://www.alteraforum.com/forum/showthread.php?t=14426&highlight=copy_from_user)
wentao suggests to include another EXPORT_SYMBOL in the according file. I did the same in arch/nios/mm/uaccess.c but it didn't help.
Thanks for your support
steron