Patching Kernel ??

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;
    /
    }

    }

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.

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

Did you tried

apt update && apt upgrade

Can you have a look what OS you are running

cat /etc/os-release

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:~#

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

MichaIng
Do you know who this could be?

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/master/drivers/hid/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).