Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Zlika on January 17, 2017, 10:16:17 AM
-
Hi all,
I have an official Raspberry Pi touchscreen. The screen works correctly on piCore 8.1.3 + TC.tcz but the touch function is not.
I browsed the forum for help and find some topics related to touchscreen support but the answers seem to be unclear and/or outdated.
Could someone help me get my touchscreen fully working?
Thanks
-
Maybe you need additional modules?
http://tinycorelinux.net/8.x/armv6/releases/RPi/src/kernel/4.4.39-piCore%2B_modules.tar.xz
Or for the RPi3:
http://tinycorelinux.net/8.x/armv7/releases/RPi/src/kernel/4.4.39-piCore_v7%2B_modules.tar.xz
-
Thank you for your hint.
Enabling the touch screen is in fact very simple:
* Copy the rpi_ft5406.ko driver from http://tinycorelinux.net/8.x/armv7/releases/RPi/src/kernel/4.4.39-piCore_v7%2B_modules.tar.xz (armv7 works for both RPi 2 and 3) on the µSD card
* Boot piCore and cd to the folder containing the ko file
* Type "sudo insmod ./ft5406.ko"
* Shazaam! The touchscreen is working!
Now I have to figure out what is the clean way to install a driver file in piCore: any advice on that?
-
You could either create an extension
http://wiki.tinycorelinux.net/wiki:creating_extensions
(for an example on directory structure, check other extensions containing the kernel name in the file name. e.g. alsa-modules-4.4.39-picore_v7+.tcz)
Or remaster the initrd
http://wiki.tinycorelinux.net/wiki:remastering
-
I created an extension and proposed it for inclusion in the piCore repository.
I also tried to remaster the initrd but without success.
The following procedure does not even work:
* copy 8.1.3v7.gz on my HDD and extract it
* execute the following commands to re-pack it:
sudo find | sudo cpio -o -H newc | gzip -2 > ../8.1.3v7.gz
advdef -z4 ../8.1.3v7.gz
* copy back the regenerated 8.1.3v7.gz file to the microSD card
There is then an error during the boot.
Is there a documentation on remastering piCore? I only found documentation on remastering TinyCore, and piCore is a little bit different on this point.
-
Try without advdef . Works here.
-
I learn to do it this way, and think it's little "simpler", "clean way to install" :)
Just when the tce-load command remove the w if you get this error message.
tce-load -wil squashfs-tools.tcz
squashfs-tools is already downloaded.
cd
wget http://tinycorelinux.net/8.x/armv6/releases/RPi/src/kernel/4.4.39-piCore%2B_modules.tar.xz -O - | tar -xvJf -
mkdir -p /tmp/package/usr/local/lib/modules/4.4.39-piCore\+/kernel/drivers/input/touchscreen/
cp /home/tc/modules/4.4.39-piCore\+/kernel/drivers/input/touchscreen/rpi-ft5406.ko $_
tce-load -wil squashfs-tools.tcz
mksquashfs package /etc/sysconfig/tcedir/optional/rpi_touchscreen.tcz
echo rpi_touchscreen.tcz >> /etc/sysconfig/tcedir/onboot.lst
sync
sudo reboot