LINUX.ORG.RU

Сообщения megashchik

 

Не удается установить драйвер

Здравствуйте! Есть камера Levenhuk C310 и пока что desktop Raspbian.

В системе видно как:

[15258.909687] perf: interrupt took too long (2503 > 2500), lowering kernel.perf_event_max_sample_rate to 79750

[15654.941576] usb 1-1: new high-speed USB device number 18 using xhci_hcd

[15655.574087] usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7

[15655.574619] usb 1-1: New USB device found, idVendor=0547, idProduct=4d33

[15655.574624] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[15655.574626] usb 1-1: Product: DCM310

[15655.574629] usb 1-1: Manufacturer: ScopeTek
Когда вставляю камеру, она не монтируется автоматически поискав драйвера нашел это: https://github.com/torvalds/linux/blob/master/drivers/media/usb/gspca/touptek.c

Скачал и скачал еще gspca.h

uname -a выдает следующее:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
Сделал:
sudo apt-get install linux-headers-4.9.0-4
Написал Makefile:
obj-m += touptek.o

all:

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
И он выдает:
root@raspberrypi:/home/pi# make

make -C /lib/modules/4.9.0-4-amd64/build M=/home/pi modules

make[1]: вход в каталог «/usr/src/linux-headers-4.9.0-4-amd64»

CC [M] /home/pi/touptek.o

/home/pi/touptek.c: In function ‘val_reply’:

/home/pi/touptek.c:198:3: error: implicit declaration of function ‘gspca_err’ [-Werror=implicit-function-declaration]

gspca_err(gspca_dev, "reply has error %d\n", rc);

^~~~~~~~~

/home/pi/touptek.c: In function ‘reg_w’:

/home/pi/touptek.c:217:2: error: implicit declaration of function ‘gspca_dbg’ [-Werror=implicit-function-declaration]

gspca_dbg(gspca_dev, D_USBO,

^~~~~~~~~

/home/pi/touptek.c: In function ‘setexposure’:

/home/pi/touptek.c:248:36: error: request for member ‘width’ in something not a structure or union

unsigned int w = gspca_dev->pixfmt.width;

                                  ^
/home/pi/touptek.c: In function ‘configure_wh’:

/home/pi/touptek.c:337:36: error: request for member ‘width’ in something not a structure or union

unsigned int w = gspca_dev->pixfmt.width;

                                  ^

/home/pi/touptek.c:383:36: error: request for member ‘height’ in something not a structure or union

reg_w(gspca_dev, gspca_dev->pixfmt.height, REG_Y_OUTPUT_SIZE);

                                  ^

/home/pi/touptek.c: In function ‘configure_encrypted’:

/home/pi/touptek.c:429:22: error: request for member ‘width’ in something not a structure or union

gspca_dev->pixfmt.width);

                 ^

/home/pi/touptek.c: In function ‘sd_pkt_scan’:

/home/pi/touptek.c:569:44: error: request for member ‘sizeimage’ in something not a structure or union

if (sd->this_f + len == gspca_dev->pixfmt.sizeimage) {

                                         ^

/home/pi/touptek.c:572:36: error: request for member ‘sizeimage’ in something not a structure or union

sd->this_f, gspca_dev->pixfmt.sizeimage, len);

                             ^

/home/pi/touptek.c:577:36: error: request for member ‘sizeimage’ in something not a structure or union

sd->this_f, gspca_dev->pixfmt.sizeimage, len);

                             ^

cc1: some warnings being treated as errors

/usr/src/linux-headers-4.9.0-4-common/scripts/Makefile.build:304: ошибка выполнения рецепта для цели «/home/pi/touptek.o»

make[4]: *** [/home/pi/touptek.o] Ошибка 1

/usr/src/linux-headers-4.9.0-4-common/Makefile:1510: ошибка выполнения рецепта для цели «_module_/home/pi»

make[3]: *** [_module_/home/pi] Ошибка 2

Makefile:150: ошибка выполнения рецепта для цели «sub-make»

make[2]: *** [sub-make] Ошибка 2

Makefile:8: ошибка выполнения рецепта для цели «all»

make[1]: *** [all] Ошибка 2

make[1]: выход из каталога «/usr/src/linux-headers-4.9.0-4-amd64»

Makefile:3: ошибка выполнения рецепта для цели «all»

make: *** [all] Ошибка 2

Можете подсказать где я ошибся? Спасибо за внимание!

 ,

megashchik
()

RSS подписка на новые темы