Patching Kernel ??

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Facel
Posts: 35
Joined: Thu Jan 25, 2018 2:39 pm

Patching Kernel ??

Post by Facel »

Hello
I would like to install a touch screen on my Allo/ Sparky which has a linux driver developped by EETI : eGTouch

The installation guide is telling that I need to patch the kernel => Could you explain me how to proceed:

_____________________________________________________________________________________
Kernel patch kernel 3.8~3.12 with USB resistive
If your system meets all below three condition s:
1. Interface U SB
2. Kernel version 3.8 .x to 3.12 .x
3. ControllerType Resistive or SCAP

Please comment the following RED s ection in your source code.

/SourceCode/drivers/hid/hid-core.c bool hid_ignore(struct hid_device *hdev)
{
switch (hdev -->vendor)

/*case USB_VENDOR_ID_
/* These are handled by usbtouchscreen. hdev -->type is probably
* HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
* usbtouchscreen.
/*if ((hdev -->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER
hdev-->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER)
hdev-->type != HID_TYPE _
return true;
break;*/
}

}
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Patching Kernel ??

Post by Joulinar »

Hi,

probably you would need to ask the one who created this guide. DietPi is not creating kernels. A normal kernel update is done using apt update && apt upgrade. As well kernel 3.x seems to be extrem outdated. Depending on your base image, actual Debian kernel version is 4.19 - 5.x.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Facel
Posts: 35
Joined: Thu Jan 25, 2018 2:39 pm

Re: Patching Kernel ??

Post by Facel »

On my Diepi version v6.34.3 (last version from allo) the kernel seems to be : 3.10.38 !!!

root@DietPi:~# uname -a
Linux DietPi 3.10.38 #22 SMP PREEMPT Fri Dec 22 10:45:41 IST 2017 armv7l GNU/Linux
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Patching Kernel ??

Post by Joulinar »

Did you tried

Code: Select all

apt update && apt upgrade
Can you have a look what OS you are running

Code: Select all

cat /etc/os-release
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Facel
Posts: 35
Joined: Thu Jan 25, 2018 2:39 pm

Re: Patching Kernel ??

Post by Facel »

Please find the result below

root@DietPi:~# apt update && apt upgrade
Atteint :1 https://deb.debian.org/debian buster InRelease
Atteint :2 https://deb.debian.org/debian buster-updates InRelease
Atteint :3 https://deb.debian.org/debian-security buster/updates InRelease
Atteint :4 https://deb.debian.org/debian buster-backports InRelease
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Tous les paquets sont à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@DietPi:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@DietPi:~#
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: Patching Kernel ??

Post by Joulinar »

strange, it's Debian Buster. It should have a higher kernel version

@MichaIng
Do you know who this could be?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: Patching Kernel ??

Post by MichaIng »

Sparky SBC is not supported by mainline kernel and Allo's official kernel always was and will be 3.10.38 as Allo is only doing minor patches to individual drivers (kernel modules), which we apply via dietpi-update when available.

Here are the Allo kernel sources: https://github.com/sparkysbc/Linux
I don't see which parts of the code you pasted are "RED", but the source file does not contain such part at all: https://github.com/sparkysbc/Linux/blob ... hid-core.c
And it has never been changed since initial upload to GitHub.

I guess those instructions were meant for the mainline kernel that time, in which case they do not practically apply for any Linux system anymore, I'm afraid. The question is now if it works with Allo's kernel OOTB or not. Please try to follow the userspace setup instructions, when available, which usually implies a console-to-framebuffer mapping and X.org configuration/calibration (install Xserver e.g. via dietpi-software install 6 prior to configuring it).
Post Reply