copy_to_user() error when compiling open source AMT driver

copy_to_user() error when compiling open source AMT driver

opperpanter's picture

Hello,

I downloaded the Linux AMT drivers from http://software.intel.com/en-us/articles/download-the-latest-intel-amt-o...

The article by Jeffrey Rott.

I tried to compile (make) on Debian Squeeze (2.6.32-amd64), but this fails:

root@NAS2:/home/qst/mei7/mei-7.1.20# make

cd src && make

make[1]: Entering directory `/home/qst/mei7/mei-7.1.20/src'

make -C /lib/modules/`uname -r`/build M=`pwd` modules

make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'

CC [M] /home/qst/mei7/mei-7.1.20/src/iorw.o

/home/qst/mei7/mei-7.1.20/src/iorw.c: In function amthi_read:

/home/qst/mei7/mei-7.1.20/src/iorw.c:368: error: implicit declaration of funcn copy_to_user

make[5]: *** [/home/qst/mei7/mei-7.1.20/src/iorw.o] Error 1

make[4]: *** [_module_/home/qst/mei7/mei-7.1.20/src] Error 2

make[3]: *** [sub-make] Error 2

make[2]: *** [all] Error 2

make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/qst/mei7/mei-7.1.20/src'

make: *** [all] Error 2

root@NAS2:/home/qst/mei7/mei-7.1.20# ls

COPYING Makefile README src

Since I am new to linux, it might be something simple.

What do I need to change to fix this. Is this some compiler setting? Some kernel flag or come missing kernel library/header?

The README doesn't have info about requirements, so I am not sure whether my kernel version is approprioate.

Thanks!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
opperpanter's picture

Most google results told me to include a header file: #include This didn't work. Since the MEI/AMT driver will be part of kernel 3.0 (2.6.40), I tried to look up the source code for that: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/staging/mei/iorw.c;h=697a2773d7cdde47f535488f592a463e1dd0e93a;hb=8eb73c6c2675f708283822bd058ad1e416836ba2 That version of the file is newer than the one in the download offered by Intel. One of the differences is addition of: #include
Now it compiles!

Judy Hartley (Intel)'s picture

Hi opperpanter,
I'm glad you got it figured out and I'm also glad that you posted here so other developers will be able to see the solution.

Thanks,
Judy

Login to leave a comment.