LinuxForum.Fans
Тема

Проблема с установкой драйвера Ubuntu 14.04

Автор: nobie 5 сообщений 946 просмотров
#382869

Здравствуйте, в связи с переходом на linux возникла проблема установки драйвера платы. Заранее прошу прощение т.к знания в области linux минимальны.
Вообщем есть плата и сайт с драйвером (http://www.elcus.ru/index.php?ID=soft) я так понял что есть скомпилированные драйвера для ядер 2.2 2.4 2.6
Для остальных нужно компилировать. Захожу в директорию с исходниками запускаю make26:

text
rm -f Makefile
ln Makefile26 Makefile
make -C /usr/src/linux SUBDIRS=$PWD modules
rm -v Makefile .*.cmd *.o *.mod.c tmk1553.ko tmklllin.ko

И он выдает ошибку:

text
ake: Entering directory `/usr/src/linux-headers-3.13.0-24'
make: *** No rule to make target `modules'.  Stop.
make: Leaving directory `/usr/src/linux-headers-3.13.0-24'

Сам makefile:

text
CFLAGS_MODULE += -DTMK1553B_NOCONFIGH
obj-m := tmk1553b.o
tmk1553b-objs := tmk1553.o tmklllin.o

Погуглив ошибку так и не понял в чем дело: толи в том что нужны исходники ядра толи мейкфайл не правильный. Т.к знаний по линуксу мало, а по драйверам еще меньше прошу помочь. Спасибо

#382876

Я уже понял, что к убунтоидам требуется особое отношение :)
Что за "плата"?
Что за "make26"?
Почему rm -f Makefile?
и т. д. Ничерта не понятно.

#382891

nobie, на чёрта он Вам сдался? Что у Вас не работает без него?

"overlayer" написал:
Почему rm -f Makefile?

Ну, rm видимо, самое разумное, что с ним надо было сделать...

#382892

ТС, а где вы взяли столь умный мануал по компилированию драйвера. Аот что пишет файл Readme

text
 There are two methods to compile the driver. The first method is more 
simple and should be tried at first and if the driver cannot be compiled or 
started then try the second method.

1. In the /source/tmk1553b folder run appropriate command: make22u for kernels 2.2; make24u or make24ut for kernels 2.4; make26uu or make26uut for kernels 2.6.

1. In the /source/tmk1553b folder run appropriate command: make22 for kernels 2.2; make24 or make24t for kernels 2.4; make26 or make26t for kernels 2.6. Linux kernel sources should be placed in the /usr/src/linux folder for successful driver compilation. If, by any reason, Linux kernel sources are placed in other folder (for example, /usr/src/linux-2.4) you need to create /usr/src/linux yourself by running command like this: link /usr/src/linux-2.4 /usr/src/linux This command is placed in linkkern24 file. You may need to run following commands in kernel 2.6 to be able to compile the driver: cd /usr/src/linux make mrproper make cloneconfig make modules_prepare

The driver is built as a kernel module. The driver can be started by running command:

insmod tmk1553b.ko <params>

and the driver can be stopped in Linux kernel 2.2/2.4 by running command:

rmmod tmk1553b.ko

or in Linux kernel 2.6 by running command:

rmmod tmk1553b

Before this, it is necessary to create appropriate device file in /dev folder by running command:

mknod /dev/tmk1553b c N 0

where N - major number, assigned to the driver. You can either choose it yourself from free numbers and then define it during mknod and insmod calls, or allow the driver to obtain it dynamically and then find the number in the /proc/devices file.

This command is placed in mkdev file (assuming N is 254).

#382893

а вы обратили внимание на то какая версия ядра поддерживается разработчиком (до 2.6) и какая у вас?

Войдите или зарегистрируйтесь, чтобы ответить.