Hi, all,
I just spent the better part of a day fighting with a cranky install script, so I thought I should document what I did to save other people time. Oh, and some suggestions for the NI developers, too.
I'm running Gentoo Linux with a 2.6.19 kernel. I downloaded the .iso
for NI-488.2 Version 2.5 for Linux -- 32 Bit. My first thought is that it would probably be easier for most people to just have a .tar.gz file rather than a .iso. Probably relatively few people must have cd's for installation and those who don't have the net probably know how to make a .iso, while more than a few people don't know that one can mount a .iso image.
I mounted the .iso using mount and copied the files to a working directory. INSTALL failed off the bat by complaining that my /lib/modules/souce
directory didn't match the running kernel. I spent some time reading the INSTALL, which is really quite complex. I'd like to suggest that there be
an option called --noclean which does not do cleanup on the temporary files during installations. To troubleshoot further I had to make a version of
the INSTALL script without cleanup or overwriting files.
Some people on this board suggested editing the file and setting bUseRpm to false. This was not a good suggestion. Under Gentoo, I think the script will work (partly, at least) if you emerge rpm and then use the --nodeps switch. Might I also suggest a --help switch that lists all the possible switches and the relevant environmental variables? Not all the environmental variable are even in INSTALL.
The complaining file was /tmp/NI4882-2.5.1f0.install/bin/installerUtility.sh. I tried setting KERNELHEADERS, and this produced different results but all were errors. The problem was that the script used the name of a file that didn't have the kernel version info in it any more. The correct line is:
if [ "`$GREP UTS_RELEASE $headersDir/include/linux/utsrelease.h | $GREP -c \" $kernelVersion\"`" = "0" ]; then
^^^^^^^^^^^^^
When this change is made, the installation fails elsewhere because of other kernel changes. I unrpm'd the files by hand and went looking for the problems.
in usr/local/natinst/nikal/src:
comment out config.h references in 3 files. It is no longer needed, I think.
/*#include <linux/config.h>*/
One of the references is in nikal.c. There are two other changes in that file:34c34
< /*#include <linux/config.h>*/
---
> #include <linux/config.h>
1163c1163
< vma->vm_flags |= VM_RESERVED | VM_LOCKED | VM_DONTCOPY | VM_DONTEXPAND;
---
> vma->vm_flags |= VM_RESERVED | VM_LOCKED | VM_SHM | VM_DONTCOPY | VM_DONTEXPAND;
1854c1854
< /*put_page_testzero(page);*/
---
> put_page_testzero(page);
I'm not sure if the last change causes a memory leak, but the drivers compile and load and so far seem to work. gpibtsw produces good results. I had to do a lot of the installation by hand, but I suppose if you put these changes back into the rpm files I think there's a good chance the top-level INSTALL will work.