[opensuse] Promise SATA300-4TX kernel Module Fails to Build?
Jan, List, I am trying to build the kernel module for a Promise SATA300-4TX SATA controller, but the module refuses to compile. The Makefile and sources, originally downloaded from www.promise.com for the driver are at: http://www.3111skyline.com/download/promise/ under the ut_mod directory. The README, taken from Fedora, states that the following steps are required to compile the module: cd /usr/src ln -s linux-2.6.9 linux cd linux make mrproper cp configs/kernel-2.6.9-i686.config .config vi Makefile(Modify EXTRAVERSION=-prep to =-1.667) make menuconfig make I substituted in its place: cd /usr/src/linux make mrproper make cloneconfig make modules_prepare make clean The module build is invoked by: make DRIVER_SRC_DIR=`pwd`. The error returned by the make file is: 19:47 trinity~/linux/boxes/trinity/promise/ut_mod> make DRIVER_SRC_DIR=`pwd` Makefile:96: *** Linux kernel source not configured - missing config.h. Stop. I believe the Makefile is looking in the wrong place for the needed files. I have a good kernel source, that much I know. I am usually very good a building from source and compiling kernel modules for ATI video, virtualbox, nVidia video, etc.. until something goes wrong. Then, I difficulty taking a kernel module Makefile and trying to figure out why it failed. Largely due to the fact that I am not familiar with where hardware X should be underneath the kernel source tree. Anybody have any idea what I need to adjust in the Makefile to get this thing to build? Any help is greatly appreciated. Thanks -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* David C. Rankin (drankinatty@suddenlinkmail.com) [20080509 03:37]:
cd /usr/src/linux make mrproper make cloneconfig make modules_prepare make clean
The last isn't ncessary as mrproper already includes clean.
I believe the Makefile is looking in the wrong place for the needed files.
The Makefile does indeed look in the wrong place or rather it reads the wrong header as in newer kernels UTS_RELEASE is defined in utsrelease.h, not in in version.h. With the attached patch the Makefile will do the right thing but the build will most probably fail as the source seems to not have been adapted to the changes in newer kernels (that's what you get for not integrating your driver into the mainline kernel). To apply the patch, simply save it somewhere, change to the promise sources and do 'patch -p0 -i /path/to/patch'. Ah yes, and call make as make DRIVER_SRC_DIR=$(pwd) KERNEL_SOURCE_DIR=/usr/src/linux because /usr/lib/modules/$(uname -r)/build points to the wrong directory. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Philipp Thomas wrote:
* Philipp Thomas (pth@suse.de) [20080509 14:21]:
With the attached patch
And then forgot to attach it :( Here it is.
Philipp
Thanks Philipp, we are getting there. I also changed the modversions.h location as follows: # # The following are for linux kernel 2.6.x # ## dcr changed modversions.h location to /usr/src/linux-2.6.22.17-0.1-obj/i386/default # EXTRA_CFLAGS += -I/usr/src/linux/drivers -I/usr/src/linux/drivers/scsi -I/usr/src/linux/include/config/modversions.h -D__LINUX__ -DEXPORT_SYMTAB -DMODVERSIONS -D_MMIO_ -DSSBOX -DTCQ -DNCQ -D_ATAPI_ EXTRA_CFLAGS += -I/usr/src/linux/drivers -I/usr/src/linux/drivers/scsi -I/usr/src/linux-2.6.22.17-0.1-obj/i386/default -D__LINUX__ -DEXPORT_SYMTAB -DMODVERSIONS -D_MMIO_ -DSSBOX -DTCQ -DNCQ -D_ATAPI_ Alas, we are still not able to build the module. Now it is complaining about Module.symvers which is in the /usr/src/linux-2.6.22.17-0.1-obj/i386/default directory, but I can't figure out where to change the make file or what option to pass to make the Makefile fin it there. The errors received are: 14:40 trinity~/linux/boxes/trinity/promise/ut_mod> make DRIVER_SRC_DIR=$(pwd) KERNEL_SOURCE_DIR=/usr/src/linux make -C /usr/src/linux SUBDIRS=`pwd` modules make[1]: Entering directory `/usr/src/linux-2.6.22.17-0.1' WARNING: Symbol version dump /usr/src/linux-2.6.22.17-0.1/Module.symvers is missing; modules will have no dependencies and modversions. CC [M] /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.o /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘__unmap_scsi_data’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:251: error: ‘Scsi_Cmnd’ has no member named ‘buffer’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘__map_scsi_sg_data’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:287: error: ‘Scsi_Cmnd’ has no member named ‘buffer’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_findcards’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:555: warning: ‘pci_find_device’ is deprecated (declared at include/linux/pci.h:477) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_init_cam’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1044: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘struct ulsata2_adapter_t *’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: At top level: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1195: error: expected ‘)’ before ‘*’ token /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1331: error: expected ‘)’ before ‘*’ token /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_cbk_atapi_pio’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1913: warning: unused variable ‘pada’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegByte’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2939: warning: passing argument 2 of ‘writeb’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegByte’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2943: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegWord’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2947: warning: passing argument 2 of ‘writew’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegWord’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2951: warning: passing argument 1 of ‘readw’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegDword’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2955: warning: passing argument 2 of ‘writel’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegDword’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2959: warning: passing argument 1 of ‘readl’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3187:16: warning: missing whitespace after the macro name /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: At top level: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_template’ In file included from /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3316: /usr/src/linux/drivers/scsi/scsi_module.c: In function ‘init_this_scsi_driver’: /usr/src/linux/drivers/scsi/scsi_module.c:19: error: ‘driver_template’ undeclared (first use in this function) /usr/src/linux/drivers/scsi/scsi_module.c:19: error: (Each undeclared identifier is reported only once /usr/src/linux/drivers/scsi/scsi_module.c:19: error: for each function it appears in.) /usr/src/linux/drivers/scsi/scsi_module.c: In function ‘exit_this_scsi_driver’: /usr/src/linux/drivers/scsi/scsi_module.c:54: error: ‘driver_template’ undeclared (first use in this function) make[2]: *** [/home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.o] Error 1 make[1]: *** [_module_/home/david/linux/boxes/trinity/promise/ut_mod] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.22.17-0.1' make: *** [default] Error 2 -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 09 May 2008 15:11:43 -0500, David C. Rankin wrote:
CC [M] /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.o /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘__unmap_scsi_data’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:251: error: ‘Scsi_Cmnd’ has no member named ‘buffer’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘__map_scsi_sg_data’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:287: error: ‘Scsi_Cmnd’ has no member named ‘buffer’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_findcards’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:555: warning: ‘pci_find_device’ is deprecated (declared at include/linux/pci.h:477) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_init_cam’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66) /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1043: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1044: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘struct ulsata2_adapter_t *’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: At top level: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1195: error: expected ‘)’ before ‘*’ token /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1331: error: expected ‘)’ before ‘*’ token /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘ulsata2_cbk_atapi_pio’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:1913: warning: unused variable ‘pada’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegByte’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2939: warning: passing argument 2 of ‘writeb’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegByte’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2943: warning: passing argument 1 of ‘readb’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegWord’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2947: warning: passing argument 2 of ‘writew’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegWord’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2951: warning: passing argument 1 of ‘readw’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camWriteRegDword’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2955: warning: passing argument 2 of ‘writel’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘camReadRegDword’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:2959: warning: passing argument 1 of ‘readl’ makes pointer from integer without a cast /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3187:16: warning: missing whitespace after the macro name /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: At top level: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_template’ In file included from /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:3316: /usr/src/linux/drivers/scsi/scsi_module.c: In function ‘init_this_scsi_driver’: /usr/src/linux/drivers/scsi/scsi_module.c:19: error: ‘driver_template’ undeclared (first use in this function) /usr/src/linux/drivers/scsi/scsi_module.c:19: error: (Each undeclared identifier is reported only once /usr/src/linux/drivers/scsi/scsi_module.c:19: error: for each function it appears in.) /usr/src/linux/drivers/scsi/scsi_module.c: In function ‘exit_this_scsi_driver’: /usr/src/linux/drivers/scsi/scsi_module.c:54: error: ‘driver_template’ undeclared (first use in this function)
Like I said, these errors have nothing to do with the missing modversions. Even if you'd fix all the previous problems, the code hasn't been maintained and adapted to the current kernel code. And unless you're a skilled kernel hacker, any further time spent on this junk is wasted. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Philipp Thomas wrote:
On Fri, 09 May 2008 15:11:43 -0500, David C. Rankin wrote:
CC [M] /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.o /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function ‘__unmap_scsi_data’: /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c:251: error: ‘Scsi_Cmnd’ has no member named ‘buffer’ /home/david/linux/boxes/trinity/promise/ut_mod/pdc-ulsata2.c: In function <big snip>
Like I said, these errors have nothing to do with the missing modversions. Even if you'd fix all the previous problems, the code hasn't been maintained and adapted to the current kernel code. And unless you're a skilled kernel hacker, any further time spent on this junk is wasted.
Philipp
Thanks Philipp! Looks like I'm stuck with the promise.ko and its crippling ATA performance for my shiny new 500G RAID1 array. Bummer :-( -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
David C. Rankin
-
Philipp Thomas
-
Philipp Thomas