Trouble with installing
leshchenkoEk opened this issue · 1 comments
Hi, I use Ubuntu 18.04.2 LTS, try to install with Makefile, but I changed it to the next:
`KERNEL_VERSION := $(shell uname -r)
KERNEL_MODULES := /lib/modules/$(KERNEL_VERSION)/build
hid-y := hid-magicmouse.o
obj-m += hid-magicmouse.o
all:
clean:
`
and after sudo make
command I get:
make -C /lib/modules/4.15.0-48-generic/build M=/home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid modules make[1]: Entering directory '/usr/src/linux-headers-4.15.0-48-generic' CC [M] /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.o /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c: In function ‘magicmouse_probe’: /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:629:12: error: too many arguments to function ‘hid_register_report’ report = hid_register_report(hdev, HID_INPUT_REPORT, ^~~~~~~~~~~~~~~~~~~ In file included from /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:18:0: ./include/linux/hid.h:860:20: note: declared here struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); ^~~~~~~~~~~~~~~~~~~ /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:633:13: error: too many arguments to function ‘hid_register_report’ report = hid_register_report(hdev, HID_INPUT_REPORT, ^~~~~~~~~~~~~~~~~~~ In file included from /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:18:0: ./include/linux/hid.h:860:20: note: declared here struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); ^~~~~~~~~~~~~~~~~~~ /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:636:13: error: too many arguments to function ‘hid_register_report’ report = hid_register_report(hdev, HID_INPUT_REPORT, ^~~~~~~~~~~~~~~~~~~ In file included from /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:18:0: ./include/linux/hid.h:860:20: note: declared here struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); ^~~~~~~~~~~~~~~~~~~ /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:639:12: error: too many arguments to function ‘hid_register_report’ report = hid_register_report(hdev, HID_INPUT_REPORT, ^~~~~~~~~~~~~~~~~~~ In file included from /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:18:0: ./include/linux/hid.h:860:20: note: declared here struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); ^~~~~~~~~~~~~~~~~~~ /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:641:12: error: too many arguments to function ‘hid_register_report’ report = hid_register_report(hdev, HID_INPUT_REPORT, ^~~~~~~~~~~~~~~~~~~ In file included from /home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.c:18:0: ./include/linux/hid.h:860:20: note: declared here struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); ^~~~~~~~~~~~~~~~~~~ scripts/Makefile.build:337: recipe for target '/home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.o' failed make[2]: *** [/home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid/hid-magicmouse.o] Error 1 Makefile:1552: recipe for target '_module_/home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid' failed make[1]: *** [_module_/home/rleshchenko/Documents/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-48-generic' Makefile:9: recipe for target 'all' failed make: *** [all] Error 2
Can you help me?
Installation depends on the kernel you installed. The easiest way to get the driver is updating the kernel to 4.20 or higher, where it is included. On Ubuntu 19.10 the MT2 works out of the box.