LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how to load "CONFIG_SERIO_RAW=y" module to existing kernel? (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-load-config_serio_raw%3Dy-module-to-existing-kernel-4175685577/)

mansoorbabbar 11-21-2020 03:47 AM

how to load "CONFIG_SERIO_RAW=y" module to existing kernel?
 
I am using Debian Buster 10 and picked up that "CONFIG_SERIO_RAW" module is not loaded which actually support a PS/2 Controller for Touch Screen though if check lsmod | grep serio_raw module is loaded. I need to simply add this to kernel and compile it to so that I can able to make use of touch screen device.
I installed all the utilities required libncurses, linux-headers and etc.

Kernel Version:
Code:

Linux version 4.19.0-6-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11)

==================================================================

Code:

root@s:/usr/src# ls -lah
total 24K
drwxr-xr-x  6 root root 4.0K Nov 21 10:46 .
drwxr-xr-x 13 root root 4.0K Oct  7  2019 ..
lrwxrwxrwx  1 root root  37 Nov 21 10:46 linux -> /usr/src/linux-headers-4.19.0-6-amd64
drwxr-xr-x  4 root root 4.0K Nov 20 21:07 linux-headers-4.19.0-12-amd64
drwxr-xr-x  4 root root 4.0K Nov 20 21:07 linux-headers-4.19.0-12-common
drwxr-xr-x  4 root root 4.0K Nov 20 15:40 linux-headers-4.19.0-6-amd64
drwxr-xr-x  4 root root 4.0K Nov 21 10:55 linux-headers-4.19.0-6-common
============================================================================

Code:

root@s:/lib/modules# ls -lh
total 8.0K
drwxr-xr-x 2 root root 4.0K Nov 20 21:07 4.19.0-12-amd64
drwxr-xr-x 3 root root 4.0K Nov 20 15:34 4.19.0-6-amd64
============================================================================
root@s:/lib/modules/4.19.0-6-amd64# ls -lh
total 4.4M
lrwxrwxrwx  1 root root  37 Nov 11  2019 build -> /usr/src/linux-headers-4.19.0-6-amd64
drwxr-xr-x 12 root root 4.0K Oct  7  2019 kernel
-rw-r--r--  1 root root 1.1M Nov 20 15:34 modules.alias
-rw-r--r--  1 root root 1.1M Nov 20 15:34 modules.alias.bin
-rw-r--r--  1 root root 4.8K Nov 11  2019 modules.builtin
-rw-r--r--  1 root root 6.0K Nov 20 15:34 modules.builtin.bin
-rw-r--r--  1 root root 424K Nov 20 15:34 modules.dep
-rw-r--r--  1 root root 578K Nov 20 15:34 modules.dep.bin
-rw-r--r--  1 root root  434 Nov 20 15:34 modules.devname
-rw-r--r--  1 root root 137K Nov 11  2019 modules.order
-rw-r--r--  1 root root  800 Nov 20 15:34 modules.softdep
-rw-r--r--  1 root root 494K Nov 20 15:34 modules.symbols
-rw-r--r--  1 root root 610K Nov 20 15:34 modules.symbols.bin
lrwxrwxrwx  1 root root  38 Nov 11  2019 source -> /usr/src/linux-headers-4.19.0-6-common
=================================================================

Code:

root@s:/lib/modules/4.19.0-6-amd64# cat /boot/config-4.19.0-6-amd64 | grep CONFIG_SERIO_RAW
CONFIG_SERIO_RAW=m

I just need to know how to load and compile this module in Debain and documents available on Debain is outdated.

I have also tried download latest kernel from kernel.org and ran "make menuconfig" and managed to add activate settings for CONFIG_SERIO_RAW on existing config but kernel panic error occurred and I had to revert back to previous working kernel.

Any assistance ins this regard will be highly appreciated.

bathory 11-21-2020 08:55 AM

Quote:

root@s:/lib/modules/4.19.0-6-amd64# cat /boot/config-4.19.0-6-amd64 | grep CONFIG_SERIO_RAW
CONFIG_SERIO_RAW=m
From the above grep output, you see that the driver is already compiled as a kernel module.
Run as root the following command to load it into the kernel:
Code:

modprobe serio_raw

mansoorbabbar 11-21-2020 11:41 AM

As I mentioned above in my post that module is already loaded.


root@ds:/lib/modules/4.19.0-6-amd64# lsmod | grep serio_raw
serio_raw 16384 0

Issue is that I can’t find the “/dev/serio_raw*” though module is loaded therefore I will have to load and compile kernel
with following module.

Device Driver>Input Device Support> Hardware I/O Ports>[*] raw access to serio ports

bathory 11-21-2020 12:31 PM

Quote:

Originally Posted by mansoorbabbar (Post 6187539)
As I mentioned above in my post that module is already loaded.


root@ds:/lib/modules/4.19.0-6-amd64# lsmod | grep serio_raw
serio_raw 16384 0

Issue is that I can’t find the “/dev/serio_raw*” though module is loaded therefore I will have to load and compile kernel
with following module.

Device Driver>Input Device Support> Hardware I/O Ports>[*] raw access to serio ports

According to module documentation you need something like:
Code:

echo -n "serio_raw" > /sys/bus/serio/devices/serioX/drvctl

mansoorbabbar 11-21-2020 03:15 PM

I am also baffled see below please output.

root@s:/lib/modules# cat /sys/bus/serio/devices/serio
serio0/ serio1/

I am suspecting something is wrong with path or a bug.

I made an experiment and installed Ubuntu 10.04 Lucid Lynx and able to get it to work on same device and Touch Screen detected on PS/2 Controller and works without any issue but on Debain Buster 10 with Kernel above mentioned failing.

mansoorbabbar 12-02-2020 12:31 AM

I have managed to resolve this issue.

I had to recompile debian kernel and load required modules using make menuconfig and copying existing .config.
Also I will have to create /debian/certs folder so that I dont get certificate error.

I had to download linux-image and all required libraries.

CONFIG_SERIO_RAW=y
PS/2 TOUCHKIT=y

make deb-pkg
sudo dpkg -i *.deb
sudo update-grub

I could understand that legacy device support is removed in latest kernels to make it more efficient and quicker.


All times are GMT -5. The time now is 12:40 PM.