Проблема со сборкой драйвера

В данном форуме предлагается обсуждать темы связанные с любым "железом", а также его работой под Linux
gtk
Заглянувший
Сообщения: 25
Зарегистрирован: 30 июн 2007, 23:30

Проблема со сборкой драйвера

Сообщение gtk »

Собираю драйвер для модема (вот он) согласно инструкции в README:
1. login as ROOT
2. extract the archive into a directory with "tar -zxvf <archivename>.tgz"
3. cd into the directory it created.
4. Type: make clean
5. Type: make 536
6. Type: make install
Сначала консоль после make 536 писала, что не может найти файл /boot/vmlinuz.version.h и /boot/vmlinuz.autoconf.h.
Согласно замечанию в readme для Debian скопировал файлы
/lib/modules/2.6.20-15-generic/build/include/linux/version.h и /lib/modules/2.6.20-15-generic/build/include/linux/autoconf.h соответственно в
/boot/vmlinuz.version.h и /boot/vmlinuz.autoconf.h и повторил все сначала. Вот что получилось:
root@sergey-desktop:/home/sergey/Intel-536# make clean
cd coredrv; make clean
make[1]: Entering directory `/home/sergey/Intel-536/coredrv'
rm -f *.ko *.o *~ core
make[1]: Leaving directory `/home/sergey/Intel-536/coredrv'
rm -f *.o *.ko
root@sergey-desktop:/home/sergey/Intel-536# make 536
Module precompile check
Current running kernel is: 2.6.20-15-generic
/lib/modules... autoconf.h exists
autoconf.h matches running kernel
version.h matches running kernel
uname -r|grep "2.6" && \
cd coredrv && make 536core_26 && \
cp Intel536.ko .. && cd .. && \
strip --strip-debug Intel536.ko && \
exit; \
ls Intel536.ko >/dev/null 2>&1 || uname -r | grep "2.6" && echo "Failed to build driver" && exit; \
if [ ]; then \
cd coredrv; make TARGET=TARGET_SELAH KERNEL_SOURCE_PATH= "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
else \
cd coredrv; make TARGET=TARGET_SELAH KERNEL_INCLUDES=/lib/modules/`uname -r`/build/include \
"PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
fi ; \
cp Intel536.o .. ; \
if [ -a /boot/vmlinuz.version.h ]; then \
cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h;\
fi
2.6.20-15-generic
make[1]: Entering directory `/home/sergey/Intel-536/coredrv'
make -C /lib/modules/2.6.20-15-generic/build SUBDIRS=/home/sergey/Intel-536/coredrv modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /home/sergey/Intel-536/coredrv/coredrv.o
In file included from /home/sergey/Intel-536/coredrv/hamcore.h:45,
from /home/sergey/Intel-536/coredrv/coredrv.c:33:
/home/sergey/Intel-536/coredrv/hamdefs.h:49:28: error: linux/config.h: No such file or directory
/home/sergey/Intel-536/coredrv/coredrv.c:73: warning: data definition has no type or storage class
/home/sergey/Intel-536/coredrv/coredrv.c:73: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_NOVERS’
/home/sergey/Intel-536/coredrv/coredrv.c:73: warning: parameter names (without types) in function declaration
/home/sergey/Intel-536/coredrv/coredrv.c: In function ‘open’:
/home/sergey/Intel-536/coredrv/coredrv.c:395: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
/home/sergey/Intel-536/coredrv/coredrv.c: In function ‘close’:
/home/sergey/Intel-536/coredrv/coredrv.c:439: warning: implicit declaration of function ‘pm_unregister’
/home/sergey/Intel-536/coredrv/coredrv.c: In function ‘send_data_to_user’:
/home/sergey/Intel-536/coredrv/coredrv.c:587: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c:592: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c:593: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c:595: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c:596: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c:597: error: ‘struct tty_struct’ has no member named ‘flip’
/home/sergey/Intel-536/coredrv/coredrv.c: At top level:
/home/sergey/Intel-536/coredrv/coredrv.c:665: error: expected ‘)’ before string constant
/home/sergey/Intel-536/coredrv/coredrv.c:778:39: error: macro "DECLARE_WORK" passed 3 arguments, but takes just 2
/home/sergey/Intel-536/coredrv/coredrv.c:778: warning: data definition has no type or storage class
/home/sergey/Intel-536/coredrv/coredrv.c:778: warning: type defaults to ‘int’ in declaration of ‘DECLARE_WORK’
/home/sergey/Intel-536/coredrv/coredrv.c:779:37: error: macro "DECLARE_WORK" passed 3 arguments, but takes just 2
/home/sergey/Intel-536/coredrv/coredrv.c:779: warning: data definition has no type or storage class
/home/sergey/Intel-536/coredrv/coredrv.c:779: warning: type defaults to ‘int’ in declaration of ‘DECLARE_WORK’
/home/sergey/Intel-536/coredrv/coredrv.c: In function ‘wake_up_interruptible_persistReadQ’:
/home/sergey/Intel-536/coredrv/coredrv.c:793: error: ‘wait_wq’ undeclared (first use in this function)
/home/sergey/Intel-536/coredrv/coredrv.c:793: error: (Each undeclared identifier is reported only once
/home/sergey/Intel-536/coredrv/coredrv.c:793: error: for each function it appears in.)
/home/sergey/Intel-536/coredrv/coredrv.c: In function ‘interruptible_sleep_on_timeout_persistReadQ’:
/home/sergey/Intel-536/coredrv/coredrv.c:827: error: ‘wait_wq2’ undeclared (first use in this function)
/home/sergey/Intel-536/coredrv/coredrv.c: At top level:
/home/sergey/Intel-536/coredrv/coredrv.c:880: warning: initialization makes integer from pointer without a cast
make[3]: *** [/home/sergey/Intel-536/coredrv/coredrv.o] Error 1
make[2]: *** [_module_/home/sergey/Intel-536/coredrv] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make[1]: *** [536core_26] Error 2
make[1]: Leaving directory `/home/sergey/Intel-536/coredrv'
2.6.20-15-generic
Failed to build driver
что теперь делать, не знаю. помогите собрать драйвер.
(Дистр - Ubuntu 7.04 64-bit)

Аватара пользователя
Llama
Неотъемлемая часть форума
Сообщения: 9749
Зарегистрирован: 06 фев 2002, 11:40
Откуда: Менск

Сообщение Llama »

http://forum.linux.by/viewtopic.php?t=5950
PS: а где вы встретили упоминание о том, что эотт драйвер работает для 64bit-случая?
Опыт растет прямо пропорционально выведенному из строя оборудованию

Ответить