virtual_touchscreen
virtual_touchscreen copied to clipboard
install on a raspberry pi
Hello, I just have tried to install the virtual_touchscreen on a raspberry (raspbian), but I'm stumbling still on the first step "make". (I already have done apt-get update, and I tried sudo apt-get install raspberrypi-kernel-headers)
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ make
make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: *** /lib/modules/4.9.59-v7+/build: No such file or directory. Stop.
Makefile:10: recipe for target 'default' failed
make: *** [default] Error 2
OR
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ make modules M=/path/to/virtual_touchscreen/
make: *** No rule to make target 'modules'. Stop.
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $
EDIT: I suppose "make" is for building kernel, so I simply tried to compile the file, but now I think I have to add the "mt.h" File? Is that correct? I don't want build the kernel or such thing (to complicated for me)
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ gcc -Wall -pthread -o virtual_touchscreen virtual_touchscreen.c
virtual_touchscreen.c:2:28: fatal error: linux/input/mt.h: No such file or directory
#include <linux/input/mt.h>
^
compilation terminated.
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $
if I add the mt.h, I get follow errors:
mt.h:31:10: error: ‘ABS_MT_LAST’ undeclared here (not in a function)
int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
^~~~~~~~~~~
mt.h:31:24: error: ‘ABS_MT_FIRST’ undeclared here (not in a function)
int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
^~~~~~~~~~~~
mt.h:68:15: error: unknown type name ‘bool’
static inline bool input_mt_is_active(const struct input_mt_slot *slot)
^~~~
mt.h:73:15: error: unknown type name ‘bool’
static inline bool input_mt_is_used(const struct input_mt *mt,
Yes, primary use of the supplied Makefile
is to be included by Linux kernel build system.
Try manually going to prepared Linux kernel source code directory and issuing make modules M=~/virtual_ctp/virtual_touchscreen-master
there.
I don't want build the kernel or such thing (to complicated for me)
Building the kernel is not needed, but having kernel source code (maybe not full) is required for building a kernel module, which virtual touchscreen requires.
Before trying to build and run virtual_touchscreen, you can try making and loading some other, built-in kernel module, for familiarise yourself with the process.
phuu :-( I was thinking that I can simply execute this program after compile it... but also simply compile the C-File gives error...
I don't have any expirience with load driver on linux (modprobe??) etc. For me all that driver stuff on linux looks very complicated and it will takes many time.
Maybe somebody can point me to some steps how to make virtual touchscreen work simply with raspbian.
thank you
Maybe somebody can provide a pre-built virtual_touchscreen.ko
for Raspbian. But it would stay valid only until some kernel update.
Otherwise you need to install something like linux-headers-4.9.59-arm
package which will bring in the kernel sources. What does apt-cache search linux-headers
return for you?
I already have tried apt-get install raspberrypi-kernel-headers
pi@raspberrypi:~ $ apt-cache search linux-headers aufs-dkms - DKMS files to build and install aufs linux-headers-3.10-3-all - All header files for Linux 3.10 (meta-package) linux-headers-3.10-3-all-armhf - All header files for Linux 3.10 (meta-package) linux-headers-3.10-3-common - Common header files for Linux 3.10-3 linux-headers-3.10-3-rpi - Header files for Linux 3.10-3-rpi linux-headers-3.16.0-4-all - All header files for Linux 3.16 (meta-package) linux-headers-3.16.0-4-all-armhf - All header files for Linux 3.16 (meta-package) linux-headers-3.16.0-4-common - Common header files for Linux 3.16.0-4 linux-headers-3.16.0-4-rpi - Header files for Linux 3.16.0-4-rpi linux-headers-3.18.0-trunk-all - All header files for Linux 3.18 (meta-package) linux-headers-3.18.0-trunk-all-armhf - All header files for Linux 3.18 (meta-package) linux-headers-3.18.0-trunk-common - Common header files for Linux 3.18.0-trunk linux-headers-3.18.0-trunk-rpi - Header files for Linux 3.18.0-trunk-rpi linux-headers-3.18.0-trunk-rpi2 - Header files for Linux 3.18.0-trunk-rpi2 linux-headers-3.6-trunk-all - All header files for Linux 3.6 (meta-package) linux-headers-3.6-trunk-all-armhf - All header files for Linux 3.6 (meta-package) linux-headers-3.6-trunk-common - Common header files for Linux 3.6-trunk linux-headers-3.6-trunk-rpi - Header files for Linux 3.6-trunk-rpi linux-headers-4.4.0-1-all - All header files for Linux 4.4 (meta-package) linux-headers-4.4.0-1-all-armhf - All header files for Linux 4.4 (meta-package) linux-headers-4.4.0-1-common - Common header files for Linux 4.4.0-1 linux-headers-4.4.0-1-rpi - Header files for Linux 4.4.0-1-rpi linux-headers-4.4.0-1-rpi2 - Header files for Linux 4.4.0-1-rpi2 linux-headers-4.9.0-4-all - All header files for Linux 4.9 (meta-package) linux-headers-4.9.0-4-all-armhf - All header files for Linux 4.9 (meta-package) linux-headers-4.9.0-4-common - Common header files for Linux 4.9.0-4 linux-headers-4.9.0-4-common-rt - Common header files for Linux 4.9.0-4-rt linux-headers-4.9.0-4-rpi - Header files for Linux 4.9.0-4-rpi linux-headers-4.9.0-4-rpi2 - Header files for Linux 4.9.0-4-rpi2 linux-headers-rpi - Header files for Linux rpi configuration (meta-package) linux-headers-rpi-rpfv - This metapackage will pull in the headers for the raspbian kernel for the linux-headers-rpi2 - Header files for Linux rpi2 configuration (meta-package) linux-headers-rpi2-rpfv - This metapackage will pull in the headers for the raspbian kernel for the linux-libc-dev-alpha-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-hppa-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-m68k-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-mips-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-mips64-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-mips64el-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-mipsel-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-powerpcspe-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-ppc64-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-s390x-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-sh4-cross - Linux Kernel Headers for development (for cross-compiling) linux-libc-dev-sparc64-cross - Linux Kernel Headers for development (for cross-compiling) raspberrypi-kernel-headers - Header files for the Raspberry Pi Linux kernel
Try installing raspberrypi-kernel-headers
or linux-headers-4.9.0-4-rpi2
and running "make" in virtual_touchscreen's directory again.
Already tried both headers, but make always gives follow error:
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ make
make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: *** /lib/modules/4.9.59-v7+/build: No such file or directory. Stop.
Makefile:10: recipe for target 'default' failed
make: *** [default] Error 2
Try apt-file search /lib/modules/4.9.59-v7+/build
. Does it find anything?
Note that you'll probably need to install apt-file
itself and download its database first.
in the directory I cannot find any "build" named file. after install apt-file, I get no results with apt-file search...:
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ apt-file search /lib/modules/4.9.59-v7+/build
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $
Where do you get the kernel from? Does DKMS work? For example, can you install and use something like v4l2loopback-dkms
?
Where do you get the kernel from? Does DKMS work? For example, can you install and use something like v4l2loopback-dkms?
it's orginal Raspbian Image (Kernel) from the Raspberry Homepage.
I tried to install with follow result:
pi@raspberrypi:~/virtual_ctp/virtual_touchscreen-master $ sudo apt-get install v412loopback-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package v412loopback-dkms
What about some other -dkms
package? E.g. lime-forensics-dkms
?