Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Mandriva 2009.1(Cooker) and Opensuse 11.1- KAL Breaks

An FYI...I've been tinkering with the latest Mandriva 2009.1 Cooker (2.6.27.x) & Opensuse 11.1 (2.6.27.x), KAL installation breaks in these distro versions. I'll try to post some logs for interested users _

-Anshul

0 Kudos
Message 1 of 14
(10,885 Views)

Thanks for the heads up.  I've been working on openSUSE 11.1 and the main problem is that the kernel has CONFIG_MODVERSIONS=y which in kernels >= 2.6.26 will refuse to load kernel modules if they were not built with modversion support.  Previous kernels would load the modules but taint the kernel.  Building our modules with modversions support requires some installer changes, and unfortunately they are not something you can easily do on your system.  There are some other problems on openSUSE 11.1 if  you use the -pae kernel instead of the -default kernel but I haven't spent too much time investigating them yet.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 14
(6,357 Views)

Shawn,

Great to hear you're on top of things I do hope you can come up with some solution for 2.6.26+ kernels. Would the CONFIG_MODVERSIONS be the case with Mandriva kernels too? I believe in someone had success with NIKAL 1.9 on Fedora 10 in one of the earlier posts...Fedora 10 has a 2.6.27 kernel. Is the CONFIG_MODVERSIONS a thing with Opensuse and Mandriva kernels only?

-Anshul

0 Kudos
Message 3 of 14
(6,357 Views)

I have a Fedora 9 machine with 2.6.27.x and it does not have CONFIG_MODVERSIONS enabled I would guess that Fedora 10 is the same if someone reported it worked.  Mandriva 2009 has a 2.6.27.x kernel and I know it works so I'm guessing it doesn't have CONFIG_MODVERSIONS enabled though I didn't check.  I'm not sure why the Mandriva 2009.1(Cooker) machine is failing, but it it could be because they enabled modversions support or it could be something else.  If you want to post a niSystemReport log from that machine I could take a look.

Shawn Bohrer

National Instruments

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

I'll post the log once I re-install Cooker... had blown away the Cooker install for a 2009.0 one just yesterday In a day or so I'll have some data for you.

-Anshul

0 Kudos
Message 5 of 14
(6,357 Views)

mandriva 2009 is ok if you install the i686 kernel from the MIB repository (it's also faster!), hardware drivers too.

Mandriva it's a good distro but it destroy 2 of mine DVDRW drivers, so be carefull if U have an LG dvdrw!

Why NI don't switch to debian? I'm shure that will improve their quality on GnuLinux products.

0 Kudos
Message 6 of 14
(6,357 Views)

Shawn,

I have some results for you (apologies for being late....), I tried to compile NI KAL 1.9 with 2.6.29 rc8 kernel for Mandriva Cooker, and it failed as it did last time too. The log during the installation is:-

Would you like to continue? [Yn] Y

Installing NI-KAL version 1.9.0f0...
Pre Installation .                 
Post Installation .                
Pre Installation ..                
Preparing...                ########################################### [100%]
   1:nikali                 ########################################### [100%]
Post Installation .                                                          
Warning: nikali post installation failed! /tmp/nikaliPostInstall.log follows:
                                                                             
Configuring for linux kernel version 2.6.29-desktop-0.rc8.1mnb.              
                                                                             
********************************* NOTE *********************************     
Using kernel headers found in /lib/modules/2.6.29-desktop-0.rc8.1mnb/source. 
If this does not correspond to the location of the 2.6.29-desktop-0.rc8.1mnb headers,
then define KERNELHEADERS in your environment to point to the location              
of the kernel headers, define KERNELTARGET as the version of the                    
kernel for which to compile, and then rerun ./configure.                            
********************************* NOTE *********************************            
                                                                                    
Kernel has reparent_to_init(): no                                                   
Number of arguments for do_munmap(): 3                                              
pte_offset function: pte_offset()                                                   
Levels in page table: 4                                                             
Kernel has remap_pfn_range: yes                                                     
USB altsetting name: cur_altsetting                                                 
Kernel has usb_get_intf(): yes                                                      
Kernel has intf_cache member in usb_host_config: yes                                
Kernel has ep[] members in usb_device: yes                                          
Kernel exports usb_set_configuration(): no                                          
Units of USB_CTRL_GET_TIMEOUT: msec                                                 
Kernel has owner member in usb_driver: no                                           
Kernel has put_page_testzero(): yes                                                 
Kernel has mutex method: yes                                                        
Kernel has kthread: yes                                                             
Kernel has config.h: no                                                             
Kernel has ioctl32.h: no                                                            
IRQ handlers have pt_regs: no                                                       
Kernel has work_struct and delayed_work: yes                                        
Kernel supports fault method in vm_operations_struct: yes                           
                                                                                    
Storing configuration in Makefile.in                                                
If the values stored are incorrect they can be changed before running make.         
                                                                                    
Uninstalling NI-KAL (nikal): done                                                   
/bin/rm -rf objects                                                                 
Updating NI-KAL:                                                                    
NI-KAL update failed.                                                              
                                                                                    
/bin/cp nikal.c objects/nikal.c                                                     
/bin/cp nikal.h objects/nikal.h                                                     
make -C /lib/modules/2.6.29-desktop-0.rc8.1mnb/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.29-desktop-0.rc8.1mnb'                                   
  CC   /usr/local/natinst/nikal/src/objects/nikal.o                                                   
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_getKernelPageTableEntry’:           
/usr/local/natinst/nikal/src/objects/nikal.c:1795: error: implicit declaration of function ‘pte_offset’  
/usr/local/natinst/nikal/src/objects/nikal.c:1795: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_mapUserPageTableEntry’:                   
/usr/local/natinst/nikal/src/objects/nikal.c:1808: warning: return makes pointer from integer without a cast   
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_getPhysicalAddress’:                      
/usr/local/natinst/nikal/src/objects/nikal.c:1996: warning: assignment makes pointer from integer without a cast
make[2]: *** [/usr/local/natinst/nikal/src/objects/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/objects] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.29-desktop-0.rc8.1mnb'
make: *** [objects/nikal.ko] Error 2

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.

.

FOR PATENTS COVERING NATIONAL INSTRUMENTS PRODUCTS, REFER TO
THE PATENTS.txt FILE ON /home/anshul/KAL AND/OR
www.ni.com/patents

NI-KAL Installation completed with errors.

0 Kudos
Message 7 of 14
(6,357 Views)

Hi Anshul,

No need to apologize for being late.  After seeing the error you posted I realized this is something I have already fixed for the next version of NI-KAL (1.10).  Of course after fixing these compile errors there is at least one remaining issue that will prevent NI-KAL from working on 2.6.29 (I currently do not have a solution for the remaining issue). For those interested here is a quick run through of diagnosing this compile error.  If you aren't interested in the details you can stop reading here and simply wait for NI-KAL 1.10.

/bin/cp nikal.c objects/nikal.c                                                    
/bin/cp nikal.h objects/nikal.h                                                    
make -C /lib/modules/2.6.29-desktop-0.rc8.1mnb/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.29-desktop-0.rc8.1mnb'                                  
  CC   /usr/local/natinst/nikal/src/objects/nikal.o                                                   
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_getKernelPageTableEntry’:          
/usr/local/natinst/nikal/src/objects/nikal.c:1795: error: implicit declaration of function ‘pte_offset’ 
/usr/local/natinst/nikal/src/objects/nikal.c:1795: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_mapUserPageTableEntry’:                  
/usr/local/natinst/nikal/src/objects/nikal.c:1808: warning: return makes pointer from integer without a cast  
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_getPhysicalAddress’:                     
/usr/local/natinst/nikal/src/objects/nikal.c:1996: warning: assignment makes pointer from integer without a cast

OK we have an error and some warnings.  Since errors are fatal and warnings aren't we should probably look at the error first.  The first place to look is the line that is causing the error:

/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_getKernelPageTableEntry’:

/usr/local/natinst/nikal/src/objects/nikal.c:1795: error: implicit declaration of function ‘pte_offset’

This seems to imply that we are using a function 'pte_offset' that does not exist.  If we open up /usr/local/natinst/nikal/src/objects/nikal.c and look at the region in question we see:

#ifdef nNIKAL100_kPTEOffsetKernel
   pte = pte_offset_kernel(pmd, (nNIKAL100_tUPtr)address);
   return pte;
#else
   pte = pte_offset(pmd, (nNIKAL100_tUPtr)address);
   return pte;
#endif

Interesting... If you are familiar with C, then you can see that we either use pte_offset_kernel() or pte_offset() depending on if nNIKAL100_kPTEOffsetKernel is defined.  This define is clearly a NI-KAL define because it starts with the nNIKAL100_ namespace.  Perhaps the problem is that we are using pte_offset() when we should be using pte_offset_kernel().  To answer that question lets take a look at where NI-KAL defines nNIKAL100_kPTEOffsetKernel.  A quick grep through the NI-KAL source in /usr/local/natinst/nikal/src shows us:

$ grep -n nNIKAL100_kPTEOffsetKernel *

configure:91:   OFFSET_VARIANT="-DnNIKAL100_kPTEOffsetKernel"
Makefile.in:31:KERNEL_VARIANTS="-DnNIKAL100_kReparentToInit -DnNIKAL100_kPTEOffsetKernel -DnNIKAL100_kCurrentAlternateSetting -DnNIKAL100_kUSBReferenceCountFunctions -DnNIKAL100_kUSBInterfaceCacheMember -DnNIKAL100_kRemapPFNRange -DnNIKAL100_kUSBDeviceEndpointArray -DnNIKAL100_kFourLevelPageTable -DnNIKAL100_kUSBmsecTimeout -DnNIKAL130_kUSBOwnerMember -DnNIKAL100_kPutPageTestzero -DnNIKAL150_kKthread -DnNIKAL160_kConfig -DnNIKAL160_kIRQRegs -DnNIKAL170_kIoctl32"
nikal.c:1791:#ifdef nNIKAL100_kPTEOffsetKernel
nikal.c:1805:#ifdef nNIKAL100_kPTEOffsetKernel
nikal.c:1815:#ifdef nNIKAL100_kPTEOffsetKernel
nikal.c:1990:#ifdef nNIKAL100_kPTEOffsetKernel
nikal.c:2001:#ifdef nNIKAL100_kPTEOffsetKernel

If we look at the configure script we see:

echo -n "pte_offset function: "
OFFSET_VARIANT=""
pte_offset_kernel=`$GREP -d skip pte_offset_kernel $headersDir/include/asm/* | $GREP -wc pte_offset_kernel`
if [ $pte_offset_kernel -ne 0 ]; then
   echo "pte_offset_kernel()"
   OFFSET_VARIANT="-DnNIKAL100_kPTEOffsetKernel"
else
   echo "pte_offset()"
fi

OK so we do a search for pte_offset_kernel in the files found in $headersDir/include/asm/*  If we don't find it then we assume pte_offset if the function we should use.  This makes me think that one of two things happened:

a) This kernel has introduced a new function besides pte_offset or pte_offset_kernel.

b) The definition of pte_offset_kernel is no longer in include/asm/*

First I would investigate option b) since it is the quickest.  Let's see what is returned from "grep -r pte_offset_kernel /usr/src/linux".  Really if we got anything then the function probably still exists and we just need to figure out where it is defined.  After some sifting through the results it looks like it is defined in "arch/x86/include/asm/*".  So you could modify the configure script to look in $headersDir/arch/x86/include/asm/*, but that would break older kernels so we probably need to look in both $headersDir/include/asm/* and $headersDir/arch/x86/include/asm/* if either of those directories exist.

If you read this far and have fixed the compile error then the next problem you will probably run into is that nikal.ko won't load because the init_mm symbol is no longer exported to kernel modules.  This problem is harder to fix and I currently don't have a solution.

Shawn Bohrer

National Instruments

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

Shawn,

I'm not much of a C guy More of a Labview guy ...but yes I could understand a little of what you meant out there. I guess I'll wait it out till NIKAL 1.10 to support Mandriva 2009.1 and (presumably) Opensuse 11.1. I do hope they will be supported too, just as the current ones are, right?

Any idea on when we'll be able to get our hands on the latest NIKAL?

-Anshul

0 Kudos
Message 9 of 14
(6,357 Views)

anshuljain wrote:

I guess I'll wait it out till NIKAL 1.10 to support Mandriva 2009.1 and (presumably) Opensuse 11.1. I do hope they will be supported too, just as the current ones are, right?

Any idea on when we'll be able to get our hands on the latest NIKAL?

With the economy in a down turn we are focusing our engineering efforts in the areas that provide the greatest return.  With Linux, one of the biggest costs is testing each distribution.  To reduce that testing burden future releases of NI products for Linux will likely not officially support Mandriva.  Over time we have seen less and less customers requesting support for Mandriva but we still have a number of customers using openSUSE and Red Hat Enterprise Linux.  Of course when the economy picks back up we can re-evaluate our supported Linux distributions and we may choose to add another officially supported distribution when it makes business sense.

Keep in mind that this really only affects the amount of testing we have to do at NI, so it is quite possible that Mandriva users can keep using NI products and they will still work.  If something doesn't work for some reason users can post their questions to this Linux Users group.

So about NI-KAL 1.10...  I guess I should start by saying that I am the only developer for NI-KAL and that is only one of the things that I work on.  As I mentioned above we do not plan on officially supporting Mandriva 2009.1 with NI-KAL 1.10.  I also know that since Mandriva 2009 will have a kernel based off of 2.6.29 that it is unlikely that NI-KAL 1.10 will work "unofficially" with Mandriva 2009.1.  I would like to officially support openSUSE 11.1, and so far I have it partially working.  Partially meaning that currently if you install NI-KAL 1.10, then other NI drivers, and finally run "updateNIDrivers" it works.  Getting it to work without having to run updateNIDrivers would be nice, but I can't guarantee that I'll have the time to implement that for NI-KAL 1.10.

So when can you get your hands on NI-KAL 1.10?  Honestly I have no idea.  I've been working on a system to make Beta versions of NI-KAL available since often times you guys run into bugs that I've already fixed.  Of course that involves getting approval from management etc. and always takes time.  In either case I'll be sure to announce NI-KAL 1.10 to this group when it is ready.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 10 of 14
(6,357 Views)