tedboudros / tplink-ub500-linux-patch-guide

A guide on how to get the UB500 bluetooth dongle working on <5.16 linux kernels!
51 stars 3 forks source link

Error while compiling the kernel module #4

Open hellkaim opened 1 year ago

hellkaim commented 1 year ago

Need your help... I am trying to compile this patch for the kernel version 5.4-132 in Ubuntu.... and after making all proposed changes I got the following erro.

Could you please help me what is wrong and how to fix it.

Thanks in advance.

`Step 4: Compile modules.

make: entering directory «/usr/src/linux-headers-5.4.0-132-generic» make: entering directory «/usr/src/linux-headers-5.4.0-132-generic» Make 1 done.

make: entering directory «/usr/src/linux-headers-5.4.0-132-generic» CC [M] /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth/hci_vhci.o CC [M] /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth/hci_ldisc.o /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth/hci_ldisc.c: In function ‘hci_uart_init’: /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth/hci_ldisc.c:836:23: error: assignment to ‘ssize_t ()(struct tty_struct , struct file , unsigned char , size_t)’ {aka ‘long int ()(struct tty_struct , struct file , unsigned char , long unsigned int)’} from incompatible pointer type ‘ssize_t ()(struct tty_struct , struct file , unsigned char , size_t, void , long unsigned int)’ {aka ‘long int ()(struct tty_struct , struct file , unsigned char , long unsigned int, void , long unsigned int)’} [-Werror=incompatible-pointer-types] 836 | hci_uart_ldisc.read = hci_uart_tty_read; | ^ cc1: some warnings being treated as errors make[1]: [scripts/Makefile.build:270: /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth/hci_ldisc.o] Error 1 make: [Makefile:1765: /home/yuri/Downloads/FIX_UB_500_BT_Stick/linux-5.4.132/drivers/bluetooth] Ошибка 2 make: leaving directory «/usr/src/linux-headers-5.4.0-132-generic» Make 2 done.`

YunusKaratepe commented 1 year ago

I had the same error as well.

Just don't do that step: "Depending on the kernel version you're using, you also might need to change the following inside hci_ldisc.c:"

Leave as it is and continue the other steps. It works just fine.

Note: I have secure boot disabled and didn't do those secure boot steps as well.

Kernel: 5.4.0-150-generic Ubuntu 18.04.6