From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing NI VISA on Mandriva Spring 2009.1

Hi,

I really need the NIDAQmx to work for my master thesis, but it seems impossible to install NI VISA.

I keep getting the "Kernel source in /lib/modules/2.6.29.1-desktop-4mnb/source does not appear to be for the 2.6.29.1-desktop-4mnb kernel. Ensure that kernel source for the 2.6.29.1-dektop-4mnb kernel is installed and configured".

According to the "Installing NI-DAQmx 8.0.1 on Mandriva"-document by NeilS I have to make sure that "the kernel source files for building kernel module that exactly correspond to the kernel version you are running".

When I types "uname -r" I get the respond "2.6.29.1-desktop-4mnb" (If I got it right; it means that I'm currently running kernel 2.6.29.1-desktop-4mnb" correct?!).

And when I type "rpm -qa|grep kernel-source" i get "kernel-source-2.6.29.1-4mnb-1-1mnb2". is that equal to I'm running the same kernel as the kernel-source??

I've downloaded the latest NI VISA 4.5 and tried to install with the same result. In the README.txt's INSTALLATION FAQS the problem is described for SUSE Linux and the solution is to run "make cloneconfig" in the /usr/src/linux-<version, in this case 2.6.29....>. Is the "cloneconfig"-script(I guess it's a script) unique for SUSE? Is it the same as "make oldconfig" in Mandriva??

Anyway, I can't get it to work..


Can anybody describe, in detail, how I installs the NI VISA and ensures that the kernel module and kernel-source corresponds? or should I forget about GNU/Linux and turn back to Windows, by that giving the pleasure to my friends (whom betting I won't be able to make it work) being right??

Thax!

Erik

0 Kudos
Message 1 of 8
(8,426 Views)

erihjo-5 wrote:

According to the "Installing NI-DAQmx 8.0.1 on Mandriva"-document by NeilS I have to make sure that "the kernel source files for building kernel module that exactly correspond to the kernel version you are running".

When I types "uname -r" I get the respond "2.6.29.1-desktop-4mnb" (If I got it right; it means that I'm currently running kernel 2.6.29.1-desktop-4mnb" correct?!).

And when I type "rpm -qa|grep kernel-source" i get "kernel-source-2.6.29.1-4mnb-1-1mnb2". is that equal to I'm running the same kernel as the kernel-source??

You seemed to have missed the part that says "For Mandriva this is the kernel-<buildname>-devel package where buildname can be determined by running uname -r".  So in your case you need to make sure that the "kernel-desktop-4mnb-devel" package is installed.  I would also recommend uninstalling the kernel-source-2.6.29.1-4mnb-1-1mnb2 package first because it is not what you want, yes I agree this is confusing.

Normally on Mandriva that is all you should need to do (you don't need to run the openSUSE steps).  However you are going to run into a another problem on Mandriva 2009.1 since it uses kernel 2.6.29.x which is no longer exports the init_mm symbol which our drivers currently need.  My advice is to use Mandriva 2009, or openSUSE.  Or, you can rebuild the Mandriva 2009.1 kernel and re-export init_mm (I can probably provide some rough instructions if you don't know how to do this).  If you choose the "recompile your kernel" option you may run into some additional problems since we haven't done any testing on that kernel/distro.

Shawn Bohrer

National Instruments

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

Thanx Shawn,

Yes, I missed the "-devel package" -part. And I don't know how to rebuild the Mandriva 2009.1 Kernel.

I'm currently downloading the 2009 release and hopes that will do the thing.

// E

0 Kudos
Message 3 of 8
(4,914 Views)

just a brief note to confirm that latest nikal and nivisa 4.5 work fine on Mandriva 2009, kernel 2.6.27.24-desktop586-2mnb.

I have a vi runnning for over a week now:)

0 Kudos
Message 4 of 8
(4,914 Views)

ShawnB. wrote:


Or, you can rebuild the Mandriva 2009.1 kernel and re-export init_mm (I can probably provide some rough instructions if you don't know how to do this). 

Shawn, can you explain how to re-export init_mm?

Thank you,

-Justin

0 Kudos
Message 5 of 8
(4,914 Views)

Hey Justin,

Completely from memory and not tested.  You would do somethine like:

# Install the full source for your kernel.  Mandriva calls this package kernel-source.

urpmi kernel-source

cd /usr/src/<kernel version>

# Open arch/x86/kernel/init_task.c in your favorite text editor

vim arch/x86/kernel/init_task.c

# Re-export init_mm, by adding the line:

EXPORT_SYMBOL(init_mm)

# Configure, compile, and install your new kernel.  I think there should already be a .config file mathing the distro kernel so:

make oldconfig

make

make install

# Reboot the machine into the new kernel

reboot

# Try to build NI-KAL

updateNIDrivers

Alternatively you can hope that the fine NI developers will release a beta NI-KAL that fixes the init_mm issue sometime soon.

Shawn Bohrer

(who no longer works for National Instruments)

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

Thanks Shawn,

I tried and got what looks like errors during the boot (see copy of dmesg below).  This appears to be a similar issue as http://decibel.ni.com/content/thread/4023. Any thoughts?

{{{

nikal: module license 'Copyright (c) 2002-2008 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/&gt;.' taints kernel.
Disabling lock debugging due to kernel taint
nidaqmx_NIWF9x 0000:0e:0b.0: PCI INT A -&gt; GSI 19 (level, low) -&gt; IRQ 19
nidaqmx_NIXS9x 0000:0e:0d.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17
nipxitrg 0000:0d:09.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<(null)>] (null)
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/class/misc/autofs/dev
Modules linked in: niorbk(P+) autofs4 nipalk(P) nikal(P) ipv6 lp pparport_pc binfmt_misc loop dm_mod cpufreq_ondemand freq_table cpufreq_conservative cpufreq_powersave nvram synclink_gt perle_serial hdlc shpchp intel_agp ppdev pci_hotplug e1000e agpgart parport_pc i2c_i801 iTCO_wdt video iTCO_vendor_support i2c_core parport pcspkr sg evdev rtc_cmos output ata_piix ahci libata sd_mod scsi_mod crc_t10dif ext3 jbd uhci_hcd ohci_hcd ehci_hcd usbhid usbcore [last unloaded: scsi_wait_scan]

Pid: 2644, comm: modprobe Tainted: P           (2.6.31.6 #2) NI PXI-8108 Embedded Controller
EIP: 0060:[<00000000&gt;] EFLAGS: 00010246 CPU: 0
EIP is at 0x0
EAX: f8305c7c EBX: 00000000 ECX: f8305b20 EDX: 00000001
ESI: f8305b20 EDI: 00000000 EBP: f622bfac ESP: f622bf8c
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process modprobe (pid: 2644, ti=f622a000 task=f62256a0 task.ti=f622a000)
Stack:
c016d577 c01d6ced f622bf98 0001a388 00000000 00000000 b75d6008 09a1c0d8
<0> f622a000 c0103c6c b75d6008 0001a388 09a1c0d8 09a1c0d8 00000000 09a1df50
<0> 00000080 0000007b 0000007b 00000000 00000000 00000080 ffffe430 00000073
Call Trace:
[<c016d577&gt;] ? sys_init_module+0x97/0x1f0
[<c01d6ced>] ? sys_read+0x3d/0x70
[<c0103c6c&gt;] ? sysenter_do_call+0x12/0x28
Code:  Bad EIP value.
EIP: [<00000000&gt;] 0x0 SS:ESP 0068:f622bf8c
CR2: 0000000000000000
---[ end trace 0bb262a729c82715 ]---

}}}

0 Kudos
Message 7 of 8
(4,914 Views)

Looks like you reproduced the issue Anshul reported.  I'm afraid I don't have any easy ideas or solutions to the problem.  Obviously something has changed in the newer kernels beyond init_mm and it will take some debugging to figure out what.

--

Shawn

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