Where is evdev.c on linux? - linux

I want to install a patch to get my touchscreen working, but can't seem to find this one file.
Running ubuntu netbook edition 10.10, with no custom kernel.

There's linux/drivers/input/evdev.c (apt-get install linux-source) and xf86-input-evdev/src/evdev.c (apt-get source xserver-xorg-input-evdev). The former is how the kernel exports input events to userspace through the /dev/input/eventX device nodes; the latter is how the X server translates those into X events. It's not obvious from the question which you mean.

Related

Surface book keyboard won't work in scientific Linux

I installed scientific linux 7.4(based on redhat 7.4) in my surface book. My touch pad is working correctly but the problem is the keyboard won't work in this OS. I also found that an external usb keyboard works correctly with it. I have Ubuntu and Windows beside this OS, but I don't have any problem with them. How can I fix this problem?
According to https://www.reddit.com/r/linux/comments/6ca920/ms_surface_keyboard_does_it_play_nice_with_linux/
you would need at least 4.10 kernel for the surface to work properly.
The kernel version in your system can be obtained by uname -rv in the terminal.
The easiest solution is to update the kernel / linux-firmware package from your distro package manager.
If this does not work, probably you would need to reconfigure or update and reconfigure the kernel (e.g. to the latest stable mainline from https://www.kernel.org/)
A nice guide for configuration can be found here https://www.dotslashlinux.com/2017/09/11/the-linux-kernel-configuration-guide-part-11/

How to build and run Ubuntu 16.04 kernel with a specific module?

I installed Ubuntu 16.04 on Nvidia Tegra TK board (arm architecture).
Then I connected touchscreen from STMicroelectronics STMPE to it.
But generic kernel does not include the module for this touchscreen.
So, I guess I need to rebuild the kernel.
What is the recommended way to do this?
Should I do it with make menuconfig or fakeroot debian/rules?
Please describe it in details, step by step.
Thanks!

How can I write a driver for an asus trackpad on linux?

I bought a laptop and installed Linux on it and the trackpad is now not working but it was on Windows. There is no linux driver for it and I thought this could be a good project to write one.
I have read and implemented tutorials on device drivers for simple things (turning on an led on a pandaboard) but I have no idea where to start here. Related questions pointed to commands like modprobe -r psmouse and it seems the trackpad is not seen at all.
Any idea ? the laptop is : Asus R409C.
A temporary fix is to boot with "psmouse.proto=bare" on the kernel cmdline.
$ sudoedit /etc/default/grub
Change GRUB_CMDLINE_LINUX_DEFAULT to add psmouse.proto=bare at the end, and save your modifications.
Then:
$ sudo update-grub
And finally reboot.
i think linux input subsystem can be used to write driver for touchpad. Exact details need to be considered. But most of the input devices can be integrated using input subsystem.

Install 2.4.33 kernel in Debian Wheezy

I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.

About compiling Linux kernel in Debian Live

This is my first time compiling Linux kernel. I am using Debian Live. I used kernel-package to compile and I also added a new system call to return an arbitrary integer value greater than zero.
Everything went fine and I got both headers and image .deb files. When I tried to install them with dpkg, there was a warning that said I needed to configure LILO. I then aborted the installation and looked for LILO to find out that Debian Live got neither LILO nor GRUB. I installed GRUB, but it was not installed on my sda1 (USB disk running Debain Live), it said that it was not a proper block device. Debian Live uses squashfs (a file system).
Then, I ignored bootloader and installed the custom kernel. After I rebooted my computer, I was directly booted to the old Debain Live and my system call returns -1.
Please provide some solutions guys.
Thanks,
Debian Live is not a suitable base for you do to your own kernel development on. As you've found, it doesn't contain the tools needed to rebuild itself (that's not what its designed to do).
Install the regular Debian distribution (perhaps inside a virtualisation environment like VMWare Server or VirtualBox). Do your kernel development there.

Resources