Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

error: ‘nNIRLP_lock’ undeclared, when install nirlpk.ko

Hello,

  I try to install nirlpk.ko, and encount some errors when I run make

 

 error: ‘nNIRLP_lock’ undeclared

 error: unknown field ‘nopage’ specified in initializer

 

  I have removed "enable_wake", "VM_SHM",and changed "#include linux/config.h" to "#include linux/autoconf.h"

 

/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:92: warning: type defaults to ‘int’ in declaration of ‘DECLARE_MUTEX’
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:92: warning: parameter names (without types) in function declaration
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_pciProbe’:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:128: error: ‘nNIRLP_lock’ undeclared (first use in this function)
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:128: error: (Each undeclared identifier is reported only once
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:128: error: for each function it appears in.)
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_pciRemove’:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:143: error: ‘nNIRLP_lock’ undeclared (first use in this function)
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: At top level:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:325: error: unknown field ‘nopage’ specified in initializer
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:326: warning: initialization from incompatible pointer type
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_getDeviceNumber’:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:584: error: ‘nNIRLP_lock’ undeclared (first use in this function)
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_procRead’:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:919: error: ‘nNIRLP_lock’ undeclared (first use in this function)
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_procLsdaq’:
/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.c:961: error: ‘nNIRLP_lock’ undeclared (first use in this function)
make[2]: *** [/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects/nirlpk.o] Error 1
make[1]: *** [_module_/home/hanl/NI-DAQ/nimhddk_linux26/Linux26/nirlpk/objects] Error 2
make[1]: Leaving directory `/home/hanl/Downloads/linux-2.6.31.12'
make: *** [objects/nirlpk.ko] Error 2

 Please help me!

 Thank you!

0 Kudos
Message 1 of 2
(5,724 Views)

Hello hanl,

 

I believe that you are using a version of the Linux kernel that was not tested with the current Linux 2.6 osinterface.  The osinterface that will ship with the X Series DDK does have these errors addressed. 

 

See this thread for information about when the X Series DDK should release.

http://forums.ni.com/t5/Driver-Development-Kit-DDK/X-Series-support-update/td-p/1145701/page/2

 

The problem is that DECLARE_MUTEX has changed to DEFINE_SEMIPHORE (its a pretty trivial change).  Also the vma_operations_struct member, .nopage, has been changed to .fault.  The changes to get the .fault member to work correctly is not trivial and required a little work.  I would recommend waiting for the new DDK to get the fixes.

 

I hope this helps!

Steven T.

0 Kudos
Message 2 of 2
(5,717 Views)