Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: ubuntu 13.04 server and rocketraid rr2680

  1. #1
    Join Date
    Sep 2005
    Beans
    32

    ubuntu 13.04 server and rocketraid rr2680

    I have looked all over the net for help on this and no luck so far. I have a rocketraid rr2680 in my home server and it was working fine under 12.10. When I upgraded to 13.04 the driver is no longer compatible, I knew this would happen. I have tried to recompile the driver for 13.04 and no luck, the few webpages that I found are either not clear on their fixes or they are for other rocketraid cards. Any ideas on this? I have 6 1TB hdd connected through this card and would like to not lose the info on them. If necessary I will move to a rocketraid rr2720 card, but want to try to get this working first.

  2. #2
    Join Date
    Nov 2007
    Beans
    13

    Re: ubuntu 13.04 server and rocketraid rr2680

    I have just been through this same issue and finally have it resolved. I will try to outline all the steps required, but if I miss one I apologize.

    To start off all of the answers can be found by following the errors in the make.log, but for a novice (like myself) the log is quite confusing. I started by following this guide which worked on previous versions of Ubuntu Server. The first thing that must be corrected is the location of version.h. This is found in this error:
    Code:
    grep: /lib/modules/3.8.0-25-generic/build/include/linux/version.h: No such file or directory
    This issue is referred to here. To correct this change the following in /usr/src/rr2680-1.9/inc/linux_32mpa/Makefile.def
    Change this:
    Code:
    MAJOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/linux/version.h | cut -d\  -f3` / 65536 % 65536)
    MINOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/linux/version.h | cut -d\  -f3` / 256 % 256)
    To this:
    Code:
    MAJOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/generated/uapi/linux/version.h | cut -d\  -f3` / 65536 % 65536)
    MINOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/generated/uapi/linux/version.h | cut -d\  -f3` / 256 % 256)
    Next we get these errors:
    Code:
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c: In function ‘scsicmd_buf_get’:
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: error: ‘KM_BIO_SRC_IRQ’ undeclared (first use in this function)
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: note: each undeclared identifier is reported only once for each function it appears in
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:2: error: too many arguments to function ‘kmap_atomic’
    I found an indirect solution on a website that I have forgotten, that refereed to a different card. In this case the main issue is with 'kmap_atomic' which is a kernel function that has changed the number of parameters that it takes. It used to take two now it takes one, hence the error. The solution is remove the second parameter from all instances of this function. Luckily this seems to be unneeded as all occurrences have the constant 'HPT_KMAP_TYPE' as the second parameter. Here are the changes:

    In /usr/src/rr2680-1.9/osm/linux/osm_linux.c change these lines:
    Code:
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
    	struct scatterlist *sg;
    	sg = scsi_sglist(cmd);
    	kunmap_atomic((char *)buf - sg->offset, HPT_KMAP_TYPE);
    #else 
    
    	if (cmd->use_sg) {
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
    		kunmap_atomic((char *)buf - ((struct scatterlist *)cmd->request_buffer)->offset, HPT_KMAP_TYPE);
    #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
    		struct scatterlist *sg = (struct scatterlist *) cmd->request_buffer;
    		if (sg->page)
    			kunmap_atomic((char *)buf - sg->offset, HPT_KMAP_TYPE);
    To this:
    Code:
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
    	struct scatterlist *sg;
    	sg = scsi_sglist(cmd);
    	kunmap_atomic((char *)buf - sg->offset);
    #else 
    
    	if (cmd->use_sg) {
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
    		kunmap_atomic((char *)buf - ((struct scatterlist *)cmd->request_buffer)->offset);
    #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
    		struct scatterlist *sg = (struct scatterlist *) cmd->request_buffer;
    		if (sg->page)
    			kunmap_atomic((char *)buf - sg->offset);
    Then in /usr/src/rr2680-1.9/osm/linux/os_linux.c
    Code:
    		kunmap_atomic(ptr, HPT_KMAP_TYPE);
    To this:
    Code:
    		kunmap_atomic(ptr);
    Finally just for good measure I removed this line from /usr/src/rr2680-1.9/osm/linux/osm_linux.h
    Code:
    #define HPT_KMAP_TYPE KM_BIO_SRC_IRQ
    After that just build and install and you are all set. Like I said at the beginning I may have missed a step, but I believe this is all that must be changed. Once you have it all sorted out, make sure you keep a copy of all the files in /usr/src/rr2680-1.9 so you won't have to go through this the next time you upgrade.

  3. #3
    Join Date
    Sep 2011
    Beans
    4

    Re: ubuntu 13.04 server and rocketraid rr2680

    Hey loganfre,

    I followed your steps but I still get an error when building the module, do you have any ideas?

    Code:
    dkms build rr2680/1.9 -k 3.8.0-27-generic
    Code:
    DKMS make.log for rr2680-1.9 for kernel 3.8.0-27-generic (x86_64)Thu Aug  8 11:06:01 CST 2013
    make: Entering directory `/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux'
    make[1]: Entering directory `/usr/src/linux-headers-3.8.0-27-generic'
      CC [M]  /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/os_linux.o
      CC [M]  /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.o
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c: In function ‘scsicmd_buf_get’:
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: error: ‘HPT_KMAP_TYPE’ undeclared (first use in this function)
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: note: each undeclared identifier is reported only once for each function it appears in
    /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:2: error: too many arguments to function ‘kmap_atomic’
    In file included from include/linux/pagemap.h:10:0,
                     from include/linux/blkdev.h:13,
                     from /var/lib/dkms/rr2680/1.9/build/osm/linux/osm_linux.h:61,
                     from /var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:6:
    include/linux/highmem.h:66:21: note: declared here
    make[2]: *** [/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.o] Error 1
    make[1]: *** [_module_/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-27-generic'
    make: *** [rr2680.ko] Error 2
    make: Leaving directory `/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux'
    Thanks
    Sam

  4. #4
    Join Date
    Nov 2007
    Beans
    13

    Re: ubuntu 13.04 server and rocketraid rr2680

    Sam,

    Which files did you modify? The files at /var/lib/dkms (as listed in the error) are overwritten each time you build. All the files you are changing should be at /usr/src/.

    Logan

  5. #5
    Join Date
    Sep 2011
    Beans
    4

    Re: ubuntu 13.04 server and rocketraid rr2680

    Hi Logan,

    I thought it would be easier to wack up the changes on github so you can see better - https://github.com/samhamilton/rr268...0cc6efe36c90d5

    The files are saved into /usr/src/rr2680-1.9 and it just occured to me that you might be using the 1.8 version of the driver and I am trying to change the 1.9 version, I upgraded a while back as the 1.8 was a bit buggy for me.

    Thanks
    Sam

  6. #6
    Join Date
    Nov 2007
    Beans
    13

    Re: ubuntu 13.04 server and rocketraid rr2680

    I commented at github. Based on the error (and I confirmed by reviewing the file) there is another occurrence of 'kmap_atomic' in line 452. It looks like this:

    Code:
    	*pbuf = kmap_atomic(HPT_SG_PAGE(sg), HPT_KMAP_TYPE) + sg->offset;

    Logan
    Last edited by loganfre; August 8th, 2013 at 11:16 PM.

  7. #7
    Join Date
    Sep 2011
    Beans
    4

    Re: ubuntu 13.04 server and rocketraid rr2680

    Hi Logan,

    Yep that did it, I can now build the module. I only have some errors about cleaning up the build area, not sure if thats anything to worry about.

    Here is the final list of changes

    Code:
    root@nas:/usr/src/rr2680-1.9# dkms build rr2680/1.9 -k 3.8.0-27-generic
    
    Kernel preparation unnecessary for this kernel.  Skipping...
    
    
    Building module:
    cleaning build area....(bad exit status: 2)
    make KERNELRELEASE=3.8.0-27-generic -C product/rr2680/linux/ KERNELDIR=/lib/modules/3.8.0-27-generic/build......
    cleaning build area....(bad exit status: 2)
    
    
    DKMS: build completed.
    root@nas:/usr/src/rr2680-1.9# dkms install rr2680/1.9 -k 3.8.0-27-generic
    
    
    rr2680:
    Running module version sanity check.
     - Original module
       - No original module exists within this kernel
     - Installation
       - Installing to /lib/modules/3.8.0-27-generic/updates/dkms/
    
    
    depmod.......
    
    
    Backing up initrd.img-3.8.0-27-generic to /boot/initrd.img-3.8.0-27-generic.old-dkms
    Making new initrd.img-3.8.0-27-generic
    (If next boot fails, revert to initrd.img-3.8.0-27-generic.old-dkms image)
    update-initramfs.........................
    
    
    DKMS: install completed.

  8. #8
    Join Date
    Nov 2007
    Beans
    13

    Re: ubuntu 13.04 server and rocketraid rr2680

    Looks good Sam. I am sure rocketraid owners around the globe appreciate you putting all the changes into one easy to find place!

    Logan

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: ubuntu 13.04 server and rocketraid rr2680

    I think all the rocketraid drivers have this problem with kernel higher than 3.0.

    Glad you got it sorted out.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #10
    Join Date
    Aug 2013
    Beans
    2

    Re: ubuntu 13.04 server and rocketraid rr2680

    Quote Originally Posted by loganfre View Post
    Looks good Sam. I am sure rocketraid owners around the globe appreciate you putting all the changes into one easy to find place!

    Logan
    As a RR2680 user, who gave up 2 weeks ago trying to do this, I do appreciate this.... Now to get it working for an amateur like me

    Just documenting some steps that probably seem basic to everyone except me... If i got it wrong, or didn't write it out neatly, or was confusing.. please correct me

    Code:
    sudo apt-get install git
    sudo apt-get install dkms
    git clone https://github.com/samhamilton/rr268...src-v1-1.9.git
    cd rr268x-linux-src-v1-1.9/
    sudo cp -R . /usr/src/rr2680-1.9
    sudo dkms add -m rr2680 -v 1.9
    sudo dkms build -m rr2680 -v 1.9
    sudo dkms install -m rr2680 -v 1.9
    It appears i did get it wrong because i am not seeing the disks. But i did not see any errors when i did the steps above. Any suggestions?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •