Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I compile and install the kernel modules after nikal and nipalk for a 64-bit Gentoo installation?

Solved!
Go to solution

We are trying to install a PCIe 6251 DAQ card in a 64-bit Gentoo box running Linux kernel 2.6.28-gentoo-r5, gcc-4.3.2 and glibc-2.8.  We have installed rpm utilities to handle the installation.  The present problem is that we are unable to compile and install the kernel modules: nidmxfk, nimsdrk, nimstsk, and nipxirmk.  Here is a summary of what we have done so far, and how far we have gotten.

First, we modified the kernel config so that we could export the unused symbol init_mm by changing the kernel config option to CONFIG_UNUSED_SYMBOLS=y and recompiling the kernel.  Next we installed LabView 8.6.1.  Then we ran the installer for Nikal 1.9 which installed the source code but failed on the compile.  To fix this, we changed the pte_offset function to pte_offset_kernel by modifying the file /usr/local/natinst/nikal/configure following the instructions here:


http://decibel.ni.com/content/docs/DOC-4511

We were then able to compile and install the nikal kernel module through:

./configure
make
make install

lsmod indicated that nikal was properly installed.  We then ran the installer for DAQmx 8.0.1 by:

./INSTALL --nodeps

When doing this, we received errors stating that LabView support could not be installed because a dependency check (incorrectly, we think) indicated that labviewbase86 was not installed; this caused the installer to abort.  Consequently we declined to install LabView 8.6 support and reran the installer which produced the output:

Installing NI-DAQmx for Linux Installer Distribution version 8.0.1f0...

Skipping nikali-1.9.0-f0.noarch.rpm installation, same or newer already
installed.


Pre Installation ...............................

Preparing... ########################################### [100%]
1:nitimingi ########################################### [ 4%]
2:nipalki ########################################### [ 7%]
3:nipali ########################################### [ 11%]
rc0.d directory not found, startup script not being registered with init levels.
4:labview80-rte ########################################### [ 14%]
5:ni653x ########################################### [ 18%]
6:nicdigi ########################################### [ 21%]
7:nidaqmxcapiexmp ########################################### [ 25%]
8:nidaqmxcapihelp ########################################### [ 29%]
9:nidaqmxcapii ########################################### [ 32%]
ln: creating symbolic link `/usr/local/include/NIDAQmx.h': No such file or directory
10:nidaqmxcfgi ########################################### [ 36%]
11:nidaqmxef ########################################### [ 39%]
12:nidaqmxhelp ########################################### [ 43%]
13:nidaqmxinfi ########################################### [ 46%]
14:nidaqmxswitch ########################################### [ 50%]
15:nidimi ########################################### [ 54%]
16:nidsai ########################################### [ 57%]
17:nimdbgi ########################################### [ 61%]
18:nimioi ########################################### [ 64%]
19:nimru2i ########################################### [ 68%]
20:nimxdfi ########################################### [ 71%]
21:nimxpi ########################################### [ 75%]
22:nimxs ########################################### [ 79%]
rc0.d directory not found, startup script not being registered with init levels.
23:niorbi ########################################### [ 82%]
24:nipxirmi ########################################### [ 86%]
25:nirpci ########################################### [ 89%]
26:niscarabmm ########################################### [ 93%]
27:niscxi ########################################### [ 96%]
28:nistci ########################################### [100%]

Post Installation ...............................


At this point, after reading this report, we used the Gentoo rc-update utility to add several init scripts to the boot runlevel:

rc-update -a nipal boot
rc-update -a nipxirmu boot
rc-update -a mxssvr boot
rc-update -a nisvcloc boot
rc-update -a nidevldu boot

During reboot, we get an error message stating that the following kernel modules are not found: nidmxfk, nimsdrk, nimstsk, and nipxirmk.  lsmod shows that both nikal and nipalk are installed, but no other NI kernel modules are present.  modprobe -l shows that only nikal and nipalk are available.


So, we have several questions:

1.  Are we installing the correct drivers in the correct order?  Should we have used NI-VISA 4.5 or NI-488.2 rather than DAQmx 8.0.1?

2.  Which kernel modules should be loaded for this hardware to run?  How can we compile and install the ones we do not yet have, specifically nidmxfk, nimsdrk, nimstsk, and nipxirmk?  Are there others?

3.  How can we get the installer to recognise correctly that we have LabView Core installed and install LabView support?  Are there additional kernel modules associated with LabView support?

4.  What is the symlink that was not created in the report on DAQmx installation? (ln: creating symbolic link `/usr/local/include/NIDAQmx.h': No such file or directory)?



I apologise for so many questions, but these seem to be the last barriers to getting NI to run properly on this system.  Is there any other information we can provide that would be helpful?  Thanks for any help or suggestions that you can offer.

Craig

0 Kudos
Message 1 of 5
(4,640 Views)

Hey Craig,

 

At this point NI does not have a 64-bit Linux DAQ driver for your PCIe-6251.  So, unfortunately this isn't going to work.  If you need to use 64-bit Linux then you may want to try the Comedi drivers which should support the PCIe-6251 on 64-bit Linux.

 

LabVIEW itself doesn't directly depend on any kernel modules so you should be able to run 32-bit LabVIEW as long as you have the appropriate 32-bit libraries installed.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
Message 2 of 5
(4,636 Views)

Hi Shawn,

 

Thanks very much for your quick reply.

 

I am trying to understand exactly what you mean by your answer.  Yes, we can get LabView to work with emulation libraries, but which part of the driver architecture is not 64-bit compatible?  I am assuming that the kernel modules that we successfully compiled and installed are 64-bit.  Are the other kernel modules not yet available in 64-bit versions?  Or are the software drivers which use the kernel modules not 64-bit?  Part of my problem is that I don't know what is the overall configuration of kernel modules and software drivers which must be made to work; that is, the interaction between the PCIe card, the kernel modules, the software drivers and LabView.  Anything you could point me towards to clear this up would be very helpful.

 

Regards,

Craig

 

0 Kudos
Message 3 of 5
(4,607 Views)
Solution
Accepted by topic author csteeves

Hey Craig,

 

Since you are running 64-bit Linux all kernel modules need to be compiled for 64-bit.  The user-mode binaries can be 32-bit assuming you have installed any needed 32-bit support libraries.

 

NI-DAQmx is a complex architecture and requires multiple kernel modules to support your PCIe card.  Most of those kernel modules have not been ported to support 64-bit Linux.  Some of the kernel modules are infrustructure compontents that are shared with other NI drivers like NI-VISA and NI-488.2 and have been ported to support 64-bit Linux.  Unfortunately you need all of the modules to use your hardware.

 

Hopefully that answers your question.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 5
(4,596 Views)

@Shawn B.

NI-DAQmx is a complex architecture and requires multiple kernel modules to support your PCIe card. 

I really wonder why it has to be that complicated. Setting some registers and pushing around some buffers is anything but rocket science. And for the rest, we have the IIO subsystem - it's made for exactly this usecase, and it's *the* standard API on Linux for DAQ devices.

 

Writing a completely new IIO driver (assuming precise specs) is a task of a few weeks.

(yes, I'm doing that on regular basis)

 

Most of those kernel modules have not been ported to support 64-bit Linux.

What is so complicated about that ?

When I write such drivers, they're completely arch-independent from day 0.

 

--mtx

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 5 of 5
(2,730 Views)