LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-08-2008, 03:50 PM   #1
livewire98801
Member
 
Registered: Jun 2004
Location: Seattle, WA
Distribution: Fedora 3/5, Mdk 10, FlavorOfTheWeek
Posts: 77

Rep: Reputation: 15
Megaraid 2.20 DKMS issues


I'm trying to install RAID modules on an Intel server and am having issues.

I have a driver download (ir2_rhel3-rhas2.1_v2.10.10.2-1_rhel4_v2.20.4.6-1.zip) that contains the following files:
Code:
ir2_RHEL3-RHAS2.1_v2.10.10.2-1_RHEL4_v2.20.4.6-1_readme.txt
ir2-v2.20.4.6.dkms.spec
v2.20.4.6-src.zip
ir2-v2.20.4.6-1.noarch.rpm
osd.xml
Web License.rtf
ir2-v2.20.4.6-1-rhel40-all.img
v2.20.4.6-src/
the v2.20.4.6-src folder seems to have sourcecode:
Code:
dkms.conf         mega_common.h              megaraid_mbox.h                              redhat_driver_disk
Kconfig.megaraid  megaraid.dkms.x86_64.spec  megaraid_mm.c
Makefile          megaraid_ioctl.h           megaraid_mm.h
mbox_defs.h       megaraid_mbox.c            megaraid-v2.20.4.6-kernel2.6.9-5.EL-all.tgz

and here is the default dkms.conf file:
Code:
$ cat dkms.conf
PACKAGE_VERSION="v2.20.4.6"

# Items below here should not have to change with each driver version
PACKAGE_NAME="megaraid"
MAKE[0]="make -C ${kernel_source_dir} SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules"
CLEAN="make -C ${kernel_source_dir} SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"

BUILT_MODULE_NAME[0]="megaraid_mm"
BUILT_MODULE_NAME[1]="megaraid_mbox"
DEST_MODULE_LOCATION[0]="/kernel/drivers/scsi/megaraid/"
DEST_MODULE_LOCATION[1]="/kernel/drivers/scsi/megaraid/"
MODULES_CONF_ALIAS_TYPE[0]="scsi_hostadapter"
MODULES_CONF_ALIAS_TYPE[1]="scsi_hostadapter"
MODULES_CONF_OBSOLETES[0]="megaraid"
MODULES_CONF_OBSOLETES[1]="megaraid"

REMAKE_INITRD="yes"

#
# Patch n matches is being used for 2.4.20-x, 2.4.20-y
#
And the Makefile:
Code:
$ cat Makefile
obj-$(CONFIG_MEGARAID_MM)       += megaraid_mm.o
obj-$(CONFIG_MEGARAID_MAILBOX)  += megaraid_mbox.o

O/S:
Code:
$cat /etc/issue
CentOS release 4.5 (Final)
LSPCI info on card:
Code:
02:03.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID (rev 01)
        Subsystem: Intel Corporation MegaRAID RAID Controller SRCS16
        Flags: bus master, 66Mhz, slow devsel, latency 64, IRQ 209
        Memory at fbff0000 (32-bit, prefetchable) [size=64K]
        Expansion ROM at fcef0000 [disabled] [size=64K]
uname -r
Code:
2.6.9-67.0.1.ELsmp
Originally I was trying to install the RPM. It would unpack into /usr/src/megariad-v2.20.4.6/ and try to install via DKMS. After I found and resolved a mismatch between kernel-smp and kernel-smp-devel, I can't get the RPM to work at all.

output:
Code:
$ sudo rpm -ivh ir2*.rpm
Password:
Preparing...                ########################################### [100%]
   1:megaraid               ########################################### [100%]

Error!  Unknown option: --archive=/usr/src/megaraid-v2.20.4.6-1/megaraid-v2.20.4.6-src.tgz
Usage: /usr/sbin/dkms [action] [options]
      [action]  = { add | remove | build | install | uninstall | match
                    | mkdriverdisk | mktarball | ldtarball | status }
      [options] = [-c dkms.conf-location] [-k kernel-version] [-m module]
                  [-v module-version] [-d distro] [-q] [--force] [--all]
                  [--postadd=script-location] [--postbuild=script-location]
                  [--postinstall=script-location] [--postremove=script-location]
                  [--templatekernel=kernel] [--config=kernel-.config-location]
                  [--directive='cli-directive=cli-value']

Error! DKMS tree does not contain: megaraid-v2.20.4.6
Build cannot continue without the proper tree.

Error! DKMS tree does not contain: megaraid-v2.20.4.6
Build cannot continue without the proper tree.
error: %post(megaraid-v2.20.4.6-1.noarch) scriptlet failed, exit status 2
And the files are not being copied to /usr/src/ . So, I copied the above sourcecode manually to /usr/src/megaraid-v2.20.4.6 and tried to run DKMS on it.

Code:
$ dkms add -m megaraid -v v2.20.4.6
dkms.conf: Error! No 'LOCATION' directive specified.
dkms.conf: Error! Directive 'LOCATION' does not begin with '/kernel'.

Error! Bad conf file.
File: /usr/src/megaraid-v2.20.4.6/dkms.conf does not represent a valid dkms.conf file
I've tried two dkms.conf files. The first is above, here is my modified one:

Code:
$ cat dkms.conf
# Items below here should not have to change with each driver version
PACKAGE_NAME=megaraid
PACKAGE_VERSION=v2.20.4.6
MAKE[0]="make -C ${kernel_source_dir} SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules"
CLEAN="make -C ${kernel_source_dir} SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"

BUILT_MODULE_NAME[0]=megaraid_mm
BUILT_MODULE_NAME[1]=megaraid_mbox
BUILT_MODULE_LOCATION[0]=build/
BUILT_MODULE_LOCATION[1]=build/
DEST_MODULE_NAME[0]=megaraid_mm
DEST_MODULE_NAME[1]=megaraid_mbox
DEST_MODULE_LOCATION[0]=/kernel/drivers/scsi/megaraid/
DEST_MODULE_LOCATION[1]=/kernel/drivers/scsi/megaraid/
#LOCATION[0]=/kernel/drivers/scsi/megaraid/
#LOCATION[1]=/kernel/drivers/scsi/megaraid/
MODULES_CONF_ALIAS_TYPE[0]=scsi_hostadapter
MODULES_CONF_ALIAS_TYPE[1]=scsi_hostadapter
MODULES_CONF_OBSOLETES[0]=megaraid
MODULES_CONF_OBSOLETES[1]=megaraid

REMAKE_INITRD=yes
AUTOINSTALL=yes

#
# Patch n matches is being used for 2.4.20-x, 2.4.20-y
#
I tried modifying the code (you can see the commented out lines above) to include "LOCATION[x]" instead of DEST_MODULE_LOCATION[x] at one time. It will add into DKMS but will not build:

Code:
$ sudo dkms add -m megaraid -v v2.20.4.6
Copying /usr/src/megaraid-v2.20.4.6/dkms.conf to: /var/dkms/megaraid/v2.20.4.6/dkms.conf

Add Completed.
Code:
$ sudo dkms build -m megaraid -v v2.20.4.6

Preparing kernel 2.6.9-67.0.1.ELsmp for module build:
(This is not compiling a kernel, only just preparing kernel symbols)
Storing current .config to be restored when complete
Warning! DKMS does not recognize how to prepare your kernel.
Currently, only Red Hat and UnitedLinux prep routines are implemented.
/usr/src/megaraid-v2.20.4.6

Building module:
cleaning build area....
make -C /lib/modules/2.6.9-67.0.1.ELsmp/build SUBDIRS=/var/dkms/megaraid/v2.20.4.6/build modules.....

Error!  Module build failed for kernel: 2.6.9-67.0.1.ELsmp
Consult the make.log in the build directory
/var/dkms/megaraid/v2.20.4.6/build/ for more information.
What's weird is I don't see any actual error here. . .
Code:
$ cat /var/dkms/megaraid/v2.20.4.6/build/make.log
DKMS make.log for megaraid-v2.20.4.6 for kernel 2.6.9-67.0.1.ELsmp
Tue Jan  8 13:40:19 PST 2008
make: Entering directory `/usr/src/kernels/2.6.9-67.0.1.EL-smp-i686'
  CC [M]  /var/dkms/megaraid/v2.20.4.6/build/megaraid_mm.o
  CC [M]  /var/dkms/megaraid/v2.20.4.6/build/megaraid_mbox.o
  Building modules, stage 2.
  MODPOST
  CC      /var/dkms/megaraid/v2.20.4.6/build/megaraid_mbox.mod.o
  LD [M]  /var/dkms/megaraid/v2.20.4.6/build/megaraid_mbox.ko
  CC      /var/dkms/megaraid/v2.20.4.6/build/megaraid_mm.mod.o
  LD [M]  /var/dkms/megaraid/v2.20.4.6/build/megaraid_mm.ko
make: Leaving directory `/usr/src/kernels/2.6.9-67.0.1.EL-smp-i686'
Also, I modified that dkms.conf file to include LOCATION directives, but I don't see that as being valid in any of the documentation. According to the DKMS documentation Dell's DKMS documentation, there are directives for DEST_MODULE_LOCATION[#]= and BUILT_MODULE_LOCATION[#]=, but not LOCATION by itself.

I've been hitting my head on this for a couple of days here, and I can't seem to find any helpful information on the internet. Any suggestions that seem helpful in the slightest would be much appreciated.

Thanks,

Tim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DKMS Problem with 2.6.20.1 lebabyg Linux - Kernel 1 02-26-2007 05:11 PM
2007 dkms question davidleroux1 Mandriva 3 10-01-2006 02:24 AM
DKMS and Dependencies runnerpaul Linux - Newbie 4 03-20-2006 03:19 PM
mandriva 2005 - dkms ati High-gain Mandriva 2 01-21-2006 01:50 AM
DKMS in Slackware laboyae Linux - Hardware 2 03-31-2005 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration