You are not logged in.

#1 2022-10-17 18:40:33

Kernelginar
Member
Registered: 2022-08-17
Posts: 2
Website

How to compile touch driver manually in kernel version 6.0.2-zen?

Hello. This is my first time posting on a foreign forum. I hope I can open it correctly. smile

http://19.depo.pardus.org.tr/etap/pool/ … -touchdrv/

I need compile this touch driver. But according to the developers of this driver, this driver can be compiled with the 4.19 version kernel.
I noticed that the

/lib/modules/6.0.2-zen1-1-zen/build

directory contains the files needed to compile this driver. But whenever I start compiling the driver I get several error messages. (Btw, while compiling the driver, I extract the .deb file to the folder and compile the driver from the source there.)

Errors:

$ sudo make -j4

make -C /lib/modules/6.0.2-zen1-1-zen/build SUBDIRS=/usr/src/eta-touchdrv-0.2.0/touch2 modules
make[1]: Entering directory '/usr/lib/modules/6.0.2-zen1-1-zen/build'
scripts/Makefile.build:43: arch/x86/entry/syscalls/Makefile: No such file or directory
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make[1]: *** [arch/x86/Makefile:268: archheaders] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.0.2-zen1-1-zen/build'
make: *** [Makefile:19: all] Error 2

When I was in the 6.0 kernel beta version, I tried compiling the kernel manually and installing the driver (linux-mainline). The driver was compiling but no files were generated after compiling.

How can I compile this driver?
This driver is for the following device: Vestel 14MB24A.

https://www.google.com/search?q=Vestel+14MB24A&hl=tr

Offline

#2 2022-10-17 20:06:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,788

Re: How to compile touch driver manually in kernel version 6.0.2-zen?

http://19.depo.pardus.org.tr/etap/pool/ … -touchdrv/ looks to be some debian package and running make in /lib/modules/6.0.2-zen1-1-zen/build is nonsense
The debian package does seem to provide some dkms sources, though.
https://wiki.archlinux.org/title/Dynami … le_Support

Offline

#3 2022-10-17 20:17:48

Kernelginar
Member
Registered: 2022-08-17
Posts: 2
Website

Re: How to compile touch driver manually in kernel version 6.0.2-zen?

seth wrote:

http://19.depo.pardus.org.tr/etap/pool/ … -touchdrv/ looks to be some debian package and running make in /lib/modules/6.0.2-zen1-1-zen/build is nonsense
The debian package does seem to provide some dkms sources, though.
https://wiki.archlinux.org/title/Dynami … le_Support

I solved this problem.

There is an error in the Makefile file. While researching with Google, I came across one GitHub link.

Link:

https://github.com/linuxkit/linuxkit/is … -354533778

And then I fixed the problem.

Makefile with problem:

####################################################################

MODULE = OpticalDrv

GCC = gcc

INCLUDE = -I include

C_FLAGS = -Wall -O -pipe $(INCLUDE)

####################################################################

ifneq ($(KERNELRELEASE),)
	obj-m := $(MODULE).o
else
	KERNELDIR := /lib/modules/$(shell uname -r)/build
	PWD := $(shell pwd)
all:
	$(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules

new rebuild:	clean all

clean:
	rm -f *.o *.mod.o *.ko *.mod.c *.cmd *.*~ *~ Module.* modules.*
endif

Fixed Makefile:

####################################################################

MODULE = OpticalDrv

GCC = gcc

INCLUDE = -I include

C_FLAGS = -Wall -O -pipe $(INCLUDE)

####################################################################

ifneq ($(KERNELRELEASE),)
	obj-m := $(MODULE).o
else
	#KERNELDIR := /usr/src/$(shell bash -c "ls /usr/src | grep linux")
	KERNELDIR := /lib/modules/$(shell uname -r)/build
	PWD := $(shell pwd)
all:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

new rebuild:	clean all

clean:
	rm -f *.o *.mod.o *.ko *.mod.c *.cmd *.*~ *~ Module.* modules.*
endif

And now the driver is compiled! But I need to try this driver on a real device. I can't be sure it's causing problems right now. I don't think it will be a problem. It will work stable.

dmesg log:

[10450.782245] OpticalDrv: loading out-of-tree module taints kernel.
[10450.782306] OpticalDrv: module verification failed: signature and/or required key missing - tainting kernel
[10450.782752] usbcore: registered new interface driver IRTOUCH optical

But thanks anyway. If I can I will package this driver according to pacman.

Last edited by Kernelginar (2022-10-17 20:18:37)

Offline

Board footer

Powered by FluxBB