LINUX.ORG.RU
ФорумAdmin

помогите с дровами


0

0

есть сетевой контроллер promise sata300 tx4, операционка fedora core 5 определяется контроллер криво, диски не в том порядке в котором подключены к устройству а как то произвольно. нашел на сайте исходники http://www.promise.com/support/download/download2_eng.asp?productId=139&c... скачал, сделал все как написано в README архива

Prerequisties =============

A develop environment is required to compile SATAII150/300 Linux driver. The easiest way is to choose develop toolkit when installing linux.

1. kernel source code (PS: Please make sure you have linux kernel source code at ("/usr/src/linux"). For Linux Kernel 2.6 like FedoraCore, it may be installed by rpm command with packaged source. And we recommend the user to refer the Linux's USERGUIDE that you have, if you have any questions about kernel source code.) ex: Under the OS of Fedora Core 3 #rpm -i kernel-2.6.9-1.667.src.rpm #rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.9.spec #mv /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src #rpmbuild --rmsource --rmspec /usr/src/redhat/SPECS/kernel-2.6.9.spec #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 2. gcc compiler

Building and Installation ========================= You can easily build/install driver according to the following steps:

Step 1. Set the proper ulsata2 binary

make clean

Step 2. Build driver binary file.

make DRIVER_SRC_DIR=`pwd`

Step 3. Install the driver module.

#cp -f ulsata2.ko /lib/modules/<kernel_version>/kernel/drivers/scsi/ulsata2.ko

Step 4. Remove the module of sata_promise.ko(if it is necessary)

#rmmod sata_promise.ko

Step 5. Load the driver module.

#insmod ulsata2.ko

все проходит до второго шага компиляции дров.

# make DRIVER_SRC_DIR=`pwd` make -C /usr/src/linux SUBDIRS=`pwd` modules make[1]: Entering directory `/usr/src/linux-2.6.16.i686' CC [M] /root/ut_mod/pdc-ulsata2.o /root/ut_mod/pdc-ulsata2.c: In function &#8216;ulsata2_init_cam&#8217;: /root/ut_mod/pdc-ulsata2.c:1044: warning: format &#8216;%d&#8217; expects type &#8216;int&#8217;, but argument 3 has type &#8216;struct ulsata2_adapter_t *&#8217; /root/ut_mod/pdc-ulsata2.c: At top level: /root/ut_mod/pdc-ulsata2.c:1195: error: expected &#8216;)&#8217; before &#8216;*&#8217; token /root/ut_mod/pdc-ulsata2.c:1331: error: expected &#8216;)&#8217; before &#8216;*&#8217; token /root/ut_mod/pdc-ulsata2.c: In function &#8216;ulsata2_cbk_atapi_pio&#8217;: /root/ut_mod/pdc-ulsata2.c:1913: warning: unused variable &#8216;pada&#8217; /root/ut_mod/pdc-ulsata2.c: In function &#8216;camWriteRegByte&#8217;: /root/ut_mod/pdc-ulsata2.c:2939: warning: passing argument 2 of &#8216;writeb&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c: In function &#8216;camReadRegByte&#8217;: /root/ut_mod/pdc-ulsata2.c:2943: warning: passing argument 1 of &#8216;readb&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c: In function &#8216;camWriteRegWord&#8217;: /root/ut_mod/pdc-ulsata2.c:2947: warning: passing argument 2 of &#8216;writew&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c: In function &#8216;camReadRegWord&#8217;: /root/ut_mod/pdc-ulsata2.c:2951: warning: passing argument 1 of &#8216;readw&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c: In function &#8216;camWriteRegDword&#8217;: /root/ut_mod/pdc-ulsata2.c:2955: warning: passing argument 2 of &#8216;writel&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c: In function &#8216;camReadRegDword&#8217;: /root/ut_mod/pdc-ulsata2.c:2959: warning: passing argument 1 of &#8216;readl&#8217; makes pointer from integer without a cast /root/ut_mod/pdc-ulsata2.c:3187:16: warning: missing whitespace after the macro name /root/ut_mod/pdc-ulsata2.c: At top level: /root/ut_mod/pdc-ulsata2.c:3302: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;driver_template&#8217; In file included from /root/ut_mod/pdc-ulsata2.c:3316: /usr/src/linux/drivers/scsi/scsi_module.c: In function &#8216;init_this_scsi_driver&#8217;: /usr/src/linux/drivers/scsi/scsi_module.c:19: error: &#8216;driver_template&#8217; 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 &#8216;exit_this_scsi_driver&#8217;: /usr/src/linux/drivers/scsi/scsi_module.c:54: error: &#8216;driver_template&#8217; undeclared (first use in this function) make[2]: *** [/root/ut_mod/pdc-ulsata2.o] Error 1 make[1]: *** [_module_/root/ut_mod] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.16.i686' make: *** [default] Error 2

подскажите вчем тут дело?


Ответ на: комментарий от kostil

какого размеру у тебя pdc-ulsata2.c и pdc-ulsata2.h?

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.