_Jackson_ thats great to hear! Don't forget to thank vpeter, his work on the tslib approach and his great support to me made it possible for me to write this tutorial, in the past in openelec forum and nowerdays at this great LibreELEC project.
Posts by Grruhn
-
-
-
Hi vpeter, I will try to describe every step from beginning:
1.) First of all install Ubuntu Desktop LTS 16.04 beside Windows 7 for Cross-Compiling LibreELEC
- Download and burn the Ubuntu Desktop LTS 16.04 Image -> download
- Start from Ubuntu Desktop LTS 16.04 DVD in Live-Mode and open 'GParted' to downsize your Windows partition. For installing Ubuntu Desktop LTS 16.04 and Cross-
Compiling LibreELEC we need ca. 50GB unused harddisk space.
- Reboot, boot from Ubuntu Desktop LTS 16.04 DVD, Install Ubuntu.
- When Ubuntu is successfully installed open a 'Terminal' to install the necessary building tools for Cross-Compiling LibreELEC:
-> Select no, to install bash as the default
-> Reboot2.) Preparing for Cross-Compiling:
- Open a 'Terminal'
Now the source code files were copied to your home folder- Move into the source code directory
- Choose the version (Branch/Tag) of LibreELEC to Cross-Compile
-> The possible versions of LibreELEC you can checkout are available on Github --> here
I chose the latest stable version 7.0.13.) Cross-Compile a clean build to check possible errors:
- The building process takes a few hours, depending on your hardware. With my hardware (quad core 4x4Ghz) ca. 2 hours.
- The following command is for building an image for Raspberry Pi 2 & 3- After this Cross-Compiling process you should have a working LibreELEC 7.0.1 Image in the target folder -> /http://LibreELEC.tv/target
- For a test you can unpack and install 'LibreELEC-RPi2.arm-7.0.1.img.gz' to your Rasberry Pi 2 or 3 SD-Card4.) In this step we intergate the 'tslib approach' from vpeter into LibreELEC to get egalax touchscreen support:
- Download tslib --> here
- Unzip the content and copy the tslib folder to http://LibreELEC.tv/packages
- Now we have to edit the package.mk in http://LibreELEC.tv/packages/linux to integrate tslib into the building process-> Open the file http://LibreELEC.tv/packages/linux/package.mk
- Change the line:
to
CodePKG_DEPENDS_TARGET="toolchain cpio:host kmod:host pciutils xz:host wireless-regdb keyutils tslib"
-> Safe the file and exit5.) Changing kernel configuration (linux.arm.conf) to enable egalax touch support.
- Open the file http://LibreELEC.tv/projects/RPi2/linux/linux.arm.conf
- To enable egalax touchscreen support to your kernel you have to uncomment and set to yes the following lines:CodeCONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_USB_COMPOSITE=y CONFIG_TOUCHSCREEN_USB_EGALAX=y CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y CONFIG_HID_MULTITOUCH=y
-> Safe the file and exit6.) Cross-Compiling LibreELEC for Raspberry PI 2/3 with tslib integration and egalax touchscreen support from kernel:
- Go to LibreELEC.tv folder and delete the 'target' folder from the test building process before.
- Open a 'Terminal'-> This second Cross-Compiling process should just take ca 10-15 minutes
-> Now you can find your image with egalax touchscreen support in the target folder --> http://LibreELEC.tv/target7.1) Configuring and calibrate LibreELEC/Kodi for egalax touchscreens (except Faytech touchscreens, this will described in 7.2)
- Unpack & install your created image to your SD-Card. I've made a bundle of the needed tools for Windows ->download
- Format your SD-Card with SDFormatter
- Install your image with Win32DiskImager
- Plug your SD-Card into your Raspberry PI
-> Don't plug in anything else than your WiFi-USB-Device/LAN-Cable, keyboard and touchscreen.
- Start your Raspberry PI and install LibreELEC, within the installation enable SSH-Support and configure your network connection
- Checkout & remember the IP-Adress from your Raspberry PI (SYSTEM-->System info)
- Shutdown your Raspberry PI and unplug the keyboard
- Start Raspberry PI again- Start in Windows with putty a SSH-Sesion to your Raspberry PI
->SSH-Login: root / SSH-Password: libreelec
- If you got a tochscreen e.g with 4:3 ratio and a resolution of 1024x768 we change first the resulution in config.txt
(a list with more hdmi_groups & hdmi_modes you can find here )- copy the following lines at the end of config.txt
-> Exit with--> Ctrl+x
-> Save with--> y
-> Confirm with--> Enter- Start a new SSH-Session and run the following commands:
Codesystemctl stop kodi cd /storage/.config/ts cp ts_env.sh-sample ts_env.sh cp ts.conf-generic ts.conf
- Checkout the input/event number your touchscreen has got with 'evtest'
-> Choose each number and touch your screen to see if there is a output. If you get an output from your touchscreen remember the input/event number.
-> Exit or cancel 'evtest' with--> Ctrl+c- Integrate the input/event number into the script 'ts_env.sh'
-> change the number from "event1" to your input/event number you have got from 'evtest'
-> for example: sed -i 's|export TSLIB_TSDEVICE=.*|export TSLIB_TSDEVICE=/dev/input/event3|' ts_env.sh- Integrate the Frame Buffer Device into the script 'ts_env.sh'
-> remember the output Frame Buffer Device, for example: /dev/fb0
Codesed -i 's|export TSLIB_FBDEVICE=.*|export TSLIB_FBDEVICE=/dev/fb0|g' /storage/.config/ts/ts_env.sh
-> change the number from "/dev/fb0" to your Frame Buffer Device you have got from 'ls /dev/fb*'
-> for example: sed -i 's|export TSLIB_FBDEVICE=.*|export TSLIB_FBDEVICE=/dev/fb3|g' /storage/.config/ts/ts_env.sh- Creating autostart.sh
copy the following lines:
--> If you have set a different resolution before in 'config.txt' (hdmi_group & hdmi_mode) you have to use it here.-> Exit with--> Ctrl+x
-> Save with--> y
-> Confirm with--> Enter- Calibration
-> If you have set a different resolution before in 'config.txt' (hdmi_group & hdmi_mode) you have to use it here.-> start with 'Putty' a second SSH-Session
- Plug in your USB-Keyboard and navigate to: Programs-->Tslib/Kodi Touch Screen Calibration
- Touch the five crosses, confirm with Enter
- Shutdown your Raspberry PI & unplug your USB-Keyboard
- Power on your Raspberry PI and your touchscreen should work7.2) Configuring and calibrate LibreELEC/Kodi for Faytech touchscreens
(to be continued...)
-
Good news everyone
I've build a community image of LibreELEC 7.0.1 for egalax touchscreens with "vpeter's" tslib approach.
I've also build a LibreELEC 7.0.1 image for Faytech touchscreens with integrated 3rd party drivers.
First of all, I'm not a developer I've just followed a few tutorials and was successfull
you can download the LibreELEC 7.0.1 image with egalax support and tslib integration here
you can download the LibreELEC 7.0.1 image with egalax support and tslib integration for Faytech touchscreens here
-> it should work out of the box, if there is a calibration problem just go to programm section and start the calibration addon and touch the five crosses (do not plug in any keybord or other USB device before Kodi is loaded, except WiFi)For installation of non Faytech touchscreens follow this tutorial after the building process at the line with the beginning "Start a ssh session with your Pi2"
-
A community build with tslib Integration and egalax / EETI support would be awsome! And a step by step tutorial to integrate 3rd party touchscreen drivers into the source files also.