Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PCIe 7852R on Debian

Solved!
Go to solution

Hi,

 

although I know that NI driver for PCIe 78xx cards does not support Debian OS, is there any unofficial support? Or does anybody has an experience with porting that driver for Debian or apt-based system?

 

Thank you,

 

czMN

0 Kudos
Message 1 of 2
(2,230 Views)
Solution
Accepted by topic author czMN

how to install NI on Debian 9.4 with linux-rt kernel

 

prereqs:

  • NI PCIe 7852R
  • downloaded NI-RIO-17.0.0-Linux.iso from NI support

1] install support for RPM packages (yes, I know ...) 

$ sudo apt install rpm

 

2]  install x86 version of libc, libc++

 

$ sudo apt install gcc-multilib g++-multilib

 

3] prepare kernel sources

 

$ sudo apt install linux-source
$ cd /usr/src
$ sudo tar xJf linux-source-4.9.txz
$ sudo unxz linux-patch-4.9-rt.patch.xz
$ sudo mv linux-source-4.9 linux-`uname -r`
$ cd linux-`uname -r`
$ sudo patch -p 1 < ../linux-patch-4.9-rt.patch
$ sudo cp /boot/config-4.9.0-6-rt-amd64 .config

 

 4] get Module.symvers

 

$ sudo cp /lib/modules/4.9.0-6-rt-amd64/build/Module.symvers ./

  

5] set version in kernel sources

 

$ sudo echo -n > localversion-rt
$ sudo <your favorite editor> Makefile

set version variables to match the kernel name e.g.:

VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 0
EXTRAVERSION = -6-rt-amd64

 

6] run kernel build

$ sudo make

(we can break the process using [ctrl]+[c] after few secs because the only thing we need is to create include/generated/utsrelease.h, which is one of the first files written by the process)

 

7] change /bin/sh target to bash (because "[[" operator is not supported in dash)

$ sudo ln -s -f /bin/bash /bin/sh

 

8] create fake /sbin/chkconfig which log for us what configuration instructions was requested

$ sudo <your favorite editor> /sbin/chkconfig
#!/bin/bash
echo $0 $* >> /tmp/chkconfig.txt

save the file and quit the editor

$ sudo chmod a+x /sbin/chkconfig

 

9] mount installation media and copy the content into temporary location (we will need to modify the installation script)

$ cd <NI-driver location>
$ sudo mount NI-RIO-17.0.0-Linux.iso /mnt
$ mkdir ni
$ cp /mnt/* ni/

 

10] modify the installation script

$ cd ni
$ chmod u+w INSTALL
$ <your favorite editor> INSTALL

find an expression "HAS_32BIT_LIBSTDC=" and modify the line:

HAS_32BIT_LIBSTDC="true"

write changes and quit the editor

 

11] run the installation

$ sudo ./INSTALL --nodeps

 

0 Kudos
Message 2 of 2
(2,193 Views)