I'm not using 2.6.32-34, I'm using Ubuntu 10.04, which at the time of
writing was 2.6.32-40.  I had to do the following to get it to work:

dkms.conf: <code>

MAKE="make -C src/ KERNELDIR=/lib/modules/$(uname -r)/build"
##MAKE="make -C src/ KERNELDIR=/lib/modules/$(kernelver)/build "
CLEAN="make -C src/ clean"
BUILT_MODULE_NAME="3w-sas"
BUILT_MODULE_LOCATION=src/
DEST_MODULE_LOCATION=/kernel/drivers/scsi
INCLUDEDIR=/lib/modules/${kernelver}/build/include
PACKAGE_NAME="3w-sas"
## VERSION 3.26.00.028-2.6.32
PACKAGE_VERSION="2.6.32"
REMAKE_INITRD=yes
TARGET="3w-sas.ko"

</code>

In the Makefile (/usr/src/3w-sas/src/Makefile) I had to change it
to:<code>

## original config: this doesn't work at all, frakit!
##SRC :=$(shell if ls /usr/src/linux >/dev/null 2>&1; then echo /usr/src/linux; 
elif ls /usr/src/linux-2.6 >/dev/null 2>&1; then echo /usr/src/linux-2.6; else 
echo /lib/modules/`uname -r`/source; fi)

##we're in ubuntu, bitches! not redshmat!
BUILD_KERNEL :=$(shell uname -r)
SRC :=/lib/modules/$(BUILD_KERNEL)/build

INCLUDE_DIR := $(SRC)/include

## Version File
VERSION_FILE := $(SRC)/include/linux/version.h

##Config file search path
CONFIG_FILE := $(SRC)/include/linux/autoconf.h

TARGET="3w-sas.ko"

CPPFLAGS += -I$(SRC)/drivers/scsi

## use the current working directory when building manually
#SUBDS := $(PWD)

##use the src directory when using dkms, don't know why dmks is borken...damn
SUBDS := $(PWD)/src

obj-m  := 3w-sas.o

default:
        make V=1 $(CPPFLAGS) -C $(SRC) SUBDIRS=$(SUBDS) modules

clean:
        rm -fr .3w-sas.* 3w-sas.mod.* 3w-sas.ko 3w-sas.o .tmp_versions *~

</code>

Finally, in the /usr/src/3w-sas/src directory, I need to make a symlink
to src called src (yes, a symlink to the current directory, a loop).
DKMS was breaking all it's relative paths and needed the symlink to find
the files.

AFTER that I was able to follow the instrcutions in #3:

You then add the source with:
   dkms add -m 3w-sas -v 2.6.32

You can then build it with:
   dkms build -m 3w-sas -v 2.6.32 -k 2.6.32-24-server

Check the build status with:
   dkms status

Install it with:
   dkms install -m 3w-sas -v 2.6.32 -k 2.6.32-24-server

Works happy like that, but not at all from the other directions here, or
on the lsi website.  Hrummph.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/607838

Title:
  3w-sas driver

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/607838/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to