Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Installation NIdaqmxBase on Debian squeeze

It works with two USB-6501 and one USB-6008 with a kernel: 2.6.32-5-686

Reference:

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

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

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

#Minimum dependency:

sudo aptitude install build-essential alien linux-source-2.6.32 linux-kbuild-2.6.32 gcc-4.3
#Download  but don't install linux-headers-2.6.686 to be able to get Module.symvers file from deb file
sudo aptitude -d install linux-headers-2.6.32-5-686
#directory used
NIDAQBASE=$HOME/nidaqbase
VISA_DIR=$HOME/nidaqbase/nivisa/rpms
#Extract iso file
mkdir /tmp/iso $NIDAQBASE
sudo mount -o loop $NI_PATCHS/nidaqmxbase-3.4.0.iso /tmp/iso/
cp -r /tmp/iso/* $NIDAQBASE/
sudo umount /tmp/iso
sudo rm -r /tmp/iso
#Create deb file from rpm
cd $NIDAQBASE
chmod 777 -R *
sudo alien -k --scripts *.rpm
cd $NIDAQBASE/nivisa
tar xzvf nivisa-runtime-5.0.0f1.tar.gz
cd $NIDAQBASE/nivisa/rpms
rm *.x86_64.rpm
sudo alien -k --scripts *.rpm
#Extract linux src
cd /usr/src
sudo tar xjvf linux-source-2.6.32.tar.bz2
sudo ln -vfs linux-source-2.6.32 linux
#Copy Module.symvers from linux-headers previously download
mkdir /tmp/linux-headers
dpkg-deb -x /var/cache/apt/archives/linux-headers-2.6.32-5-686_2.6.32-28_i386.deb /tmp/linux-headers
cp -v /tmp/linux-headers/usr/src/linux-headers-2.6.32-5-686/Module.symvers /usr/src/linux/Module.symvers

rm -rf /tmp/linux-headers

#must be done because it will not work with dash

sudo ln -vfs /bin/bash /bin/sh

# Define commands

CMD='dpkg'

OPTS='-i'

NIDAQMX_VERSION=3.4.0-f2_i386

LINUX_VERSION=`uname -r`

LINUX_VERSION_S=`uname -r| xargs -d "-" |awk '{print $1}'`

#kernel compiled with gcc-4.3

ln -vfs /usr/bin/gcc-4.3 /usr/bin/gcc

#Prepare linux src

cd /usr/src/linux

make oldconfig

make modules_prepare

ln -vfs /usr/src/linux-source-$LINUX_VERSION_S /usr/src/linux

ln -vfs /usr/src/linux-source-$LINUX_VERSION_S /lib/modules/$LINUX_VERSION/source

ln -vfs /usr/src/linux /lib/modules/$LINUX_VERSION/build

ln -vfs /usr/src/linux/include/asm/asm-offsets.h /usr/src/linux/include/asm/asm_offsets.h

#save original file

if [ ! -e /usr/src/linux/include/linux/utsrelease.h.SAVE ]; then

cp -v /usr/src/linux/include/linux/utsrelease.h /usr/src/linux/include/linux/utsrelease.h.SAVE

fi

#copy the patch attached (#define UTS_RELEASE from "2.6.32" to "2.6.32-5-686")

cp -v [downloaded attached file]/utsrelease.h /usr/src/linux/include/linux/utsrelease.h

$CMD $OPTS $VISA_DIR/nikali_2.0.0-f0_all.deb

. /usr/local/natinst/nikal/bin/nikaliInstallerUtility.sh

nikaliPostInstall

cp -vr /lib/modules/$LINUX_VERSION_S/kernel/natinst/nikal /lib/modules/$LINUX_VERSION/kernel/natinst/

modprobe nikal

$CMD $OPTS $NIDAQBASE/labview-2010-rte_10.0.0-1_i386.deb

$CMD $OPTS $NIDAQBASE/nidaqmxbase-board-support_$NIDAQMX_VERSION.deb

$CMD $OPTS $NIDAQBASE/nidaqmxbase-common_$NIDAQMX_VERSION.deb

$CMD $OPTS $NIDAQBASE/nidaqmxbase-cinterface_$NIDAQMX_VERSION.deb

$CMD $OPTS $NIDAQBASE/nidaqmxbase-usb-support_$NIDAQMX_VERSION.deb

$CMD $OPTS --force-overwrite $VISA_DIR/nimdnsresponder_1.1.0-f3_i386.deb

$CMD $OPTS $VISA_DIR/nipali_2.5.4-f0_i386.deb

. /usr/local/natinst/nipal/bin/nipaliInstallerUtility.sh

nipaliPostInstall

$CMD $OPTS $VISA_DIR/nipalki_2.5.4-f0_i386.deb

. /usr/local/natinst/nipal/bin/nipalkiInstallerUtility.sh

nipalkiPostInstall

$CMD $OPTS --force-overwrite $VISA_DIR/niorbi_1.9.3-f0_i386.deb

. /usr/local/natinst/.nicore/bin/niorbiInstallerUtility.sh

niorbiPostInstall

$CMD $OPTS --force-overwrite $VISA_DIR/nirpci_4.2.0-f0_i386.deb

. /usr/local/natinst/.nicore/bin/nirpciInstallerUtility.sh

nirpciPostInstall

$CMD $OPTS $VISA_DIR/nivisa_5.0.0-f0_i386.deb

. /usr/local/vxipnp/bin/nivisaInstallerUtility.sh

nivisaPostInstall

$CMD $OPTS $VISA_DIR/nivisak_5.0.0-f0_i386.deb

. /usr/local/vxipnp/bin/nivisakInstallerUtility.sh

nivisakPostInstall

#back to original gcc

ln -vfs /usr/bin/gcc-4.4 /usr/bin/gcc

cp -v /usr/src/linux/include/linux/utsrelease.h.SAVE /usr/src/linux/include/linux/utsrelease.h

cp -v $NI_PATCHS/updateNIDrivers /usr/local/bin/updateNIDrivers

updateNIDrivers

#back

sudo ln -vfs  /bin/dash /bin/sh

reboot

0 Kudos
Message 1 of 9
(10,216 Views)

Sweet!  Thanks for posting your instructions.  It is always awesome to see people share.

0 Kudos
Message 2 of 9
(4,635 Views)

Thanks!

Just did this on ubuntu 10.10 and it worked with a few modifications (I didn't write this down while I did it, so I don't remeber exactly when I did the different steps)

When it complains about not finding nipal.dir:

cp -r /etc/natinst/nipal/etc/* /etc/natinst/nipal/

Before running nipalkiPostInstall:

KERNELTARGET=`uname -r`

ln -s /usr/src/linux-headers-2.6.35-23-generic/include/generated/autoconf.h /usr/src/linux-headers-2.6.35-23-generic/include/linux/ (replace 2.6.35-23 with your kernel version)

I quickly ran into the issue described here: http://decibel.ni.com/content/docs/DOC-13862

The solution:

aptitude remove labview-2010-rte nidaqmxbase-cinterface nidaqmxbase-common

Download NI-DAQmx Base 3.3: http://joule.ni.com/nidu/cds/view/p/id/1342/lang/en

Mount the iso and convert labview82-rte-8.2.1-2.i386.rpm, nidaqmxbase-cinterface-3.3.0-f0.i386.rpm and  nidaqmxbase-common-3.3.0-f0.i386.rpm to deb and install as previously described.

0 Kudos
Message 3 of 9
(4,635 Views)

Sadly, I have not been so lucky....

I'm running Debian Squeeze on an amd64 machine so I needed to modify the script where appropriate to reflect the sources I have on the machine. It went well up to the point where the nikaliPostInstall step occurs. Tracing though this, (it at first wanted root privaledges) it gets to the updateNIDrivers step then gives the following error message:

Unloading NI-KAL (nikal): done

******************************** ERROR ****************************************
* Kernel source in /lib/modules/2.6.32-5-amd64/source does not appear to be
* configured for the 2.6.32-5-amd64 kernel.
* Configuration of kernel source is required to continue installation.        *
* Refer to the README file for the product you are installing for information *
* about configuring your kernel source.                                       *
******************************** ERROR ****************************************
Makefile:18: Makefile.in: No such file or directory
make: *** No rule to make target `Makefile.in'.  Stop.
Installing NI-KAL:
NI-KAL update failed.
Makefile:18: Makefile.in: No such file or directory
make: *** No rule to make target `Makefile.in'.  Stop.
ERROR: make of nikal kernel module failed, not installing kernel module.
   updateNIDrivers should be called again after fixing the problem.
   Logging failure...
   Include the file /tmp/niSystemReport.out.gz when contacting
   National Instruments for support.
Now I'd like to try and get NI to make a suggestion here as to how to fix this, but I doubt I will get much joy from them as I've chosen to use an unsupported version of Linux so I guess I'm on my own. Well the short answer is that NI will just go in the toilet now and we will find another way of doing our application and they will loose the sale of some equipment, which I'm sure they won't really miss.
I really find it hard to believe that this process should be so hard to get right. Clearly NI is totally Windows centric and the rest of us really don't matter. Ok, perhaps Debian is too small a community for NI to  worry about so that's just the way it is.
Unless some kind soul has encountered and overcome this problem and is willing to share their solution......
Thanks.
0 Kudos
Message 4 of 9
(4,635 Views)

I haven't followed this whole Debian thread but just off the bat, I don't know that 64-bit anything will run this software. Try an i686/32-bit kernel? Again, maybe I'm missing something here

0 Kudos
Message 5 of 9
(4,635 Views)

It's alleged that the 32bit drivers will run on 64bit machines, but as yet I can't attest to that as I can't yet get the driver installed. I've invoked some stronger medicine in the form of a more astude linux boffin, to see if he can figure out where the error is!

0 Kudos
Message 6 of 9
(4,635 Views)

Actually, the kernel I have is the amd64 kernel, the processor is actually an Intel XEON quad core...

I just need to study the scripts in more detail to try to figure out what the error actually is, maybe a misplaced file or something like that....

0 Kudos
Message 7 of 9
(4,635 Views)

From the OS point of view, 64bit kernel will need 64bit kernel drivers. 64bit kernels can run 32bit user mode process, but typically some manual steps to install the 32bit library is needed. Usually on Linux, 64bit installation doesn't come with 32bit installed by default.

0 Kudos
Message 8 of 9
(4,635 Views)

I try install NIdaqmxBase on Debian squeeze 32bit with your script.

Installation success, but when I get "lsdaq", my card PCI6010 is not detect.

When I get lspci -v, I see this card.

0 Kudos
Message 9 of 9
(4,635 Views)