gsl-firmware
                                
                                 gsl-firmware copied to clipboard
                                
                                    gsl-firmware copied to clipboard
                            
                            
                            
                        Can you make for Chuwi Hi 8 Air
Hi ya. i’m a big fan of your project. May you make firmware for Chuwi Hi 8 Air new release 2018, please because I want to run it on Kali Linux. Thank you. I have a windows driver for it and I will send you as soon as possible!
Did you find the Windows driver? If yes, please submit it via a PR, including a readme. We'll worry about conversion later. Thanks!
Thank you so much for the reply. And yes! I found the Chuwi Hi8 Air Driver from the forum of Chuwi: This is the Windows Driver Link: http://www.mediafire.com/file/ven2gq50mx2wxem/HI8+Air-driver.rar
Thank you so much. Please make my dream come true that I can using Kali Linux in Chuwi Air Driver Tablet! Thank you!
Vào Th 5, 8 thg 11, 2018 vào lúc 02:05 Gregor Riepl < [email protected]> đã viết:
Did you find the Windows driver? If yes, please submit it via a PR, including a readme. We'll worry about conversion later. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/onitake/gsl-firmware/issues/91#issuecomment-436740539, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6EcuIbZomIypsc4OyUe5Dr0c0PXpNMks5usy8HgaJpZM4X7MN5 .
I'm sorry for the late reply but I don't have much information about that device..This is all I have about the Chuwi-Air Tablet: Chuwi/HiBook
| Item | Description | 
|---|---|
| Manufacturer | Chuwi | 
| Device | Hi-Air | 
| Website | |
| https://www.chuwi.com/product/items/Chuwi-Hi8-Air.html | |
| Vendor driver (Windows) | https://forum.chuwi.com/thread-5785-1-1.html | 
| Extracted firmware | Unknow | 
| Firmware for gslx680-acpi | Unknow | 
| Display resolution | 1920x1200 | 
| Touch panel resolution | Unknow | 
| Touch controller | GSL3680 | 
| Multitouch support | Yes | 
| Finger tracking | Yes | 
| Mirrored horizontally | Unknow | 
| Mirrored vertically | Unknow | 
| Rotating | Yes | 
| Axes swapped | No | 
Vào Th 6, 9 thg 11, 2018 vào lúc 14:58 Gregor Riepl < [email protected]> đã viết:
Can you prepare a readme similar to this one https://raw.githubusercontent.com/onitake/gsl-firmware/master/firmware/chuwi/hibook/README.md and post it into a gist https://gist.github.com/? Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/onitake/gsl-firmware/issues/91#issuecomment-437279688, or mute the thread https://github.com/notifications/unsubscribe-auth/AY6EcuO61mQqDlIVzRi0OTsY4w7zlzZcks5utTWNgaJpZM4X7MN5 .
Thanks I'll add these to the repo. I can't help with adding kernel support however, you'll have to experiment yourself.
Hi, I just got a Chuwi Hi 8 Air.
I did try to use the Hi 8 driver, but it doesn't compile :
cc1: error: code model kernel does not support PIC mode
I've installed Xubuntu 18.04 on the tablet.
I can't find the Chuwi Hi 8 Air firmware in this repo ...
Thanks
Ps : I will try to extract it myself, and will send a sos if I don't succeed in !
I could extract the firmware with tools/untscfg, and then format it with tools/fwtool.
But I can't compile. Always the same error :
cc1: error: code model kernel does not support PIC mode
I could extract the firmware with
tools/untscfg, and then format it withtools/fwtool. But I can't compile. Always the same error :cc1: error: code model kernel does not support PIC mode
This compile error did disappear after doing this in the linux source kernel Makefile :
Add -fno-pie after KBUILD_CFLAGS
But I've now a new error :
fatal error: 'stdarg.h' file not found
I will continue to investigate ...
@Yes21 If possible, please use the silead driver that ships with the Linux kernel.
It requires some manual work if your device isn't supported yet. The README describes what you must do.
Also, you should not use fwtool with the in-kernel driver. To extract firmware from the Windows driver, please use scanwindrv.
@onitake Thanks for your answer.
I've read the README. I will use scanwindrv with .sys driver.
If I use the kernel silead driver, I need to recompile the kernel, but do I need to run make to build the .ko ?
I've still tried to make make work but impossible !!
The stdarg.h' is in /usr/lib/gcc/x86_64-linux-gnu/7/include. I did include it to the $PATH, but didn't work.
Did you ever succeed in compiling the .ko module on ubuntu 18.04 ??
Now I give up and will try to use the in-kernel driver method. But I'm afraid to have to recompile the kernel on my Hi8 Air !!
You shouldn't have to do any of that, as long as you have the kernel header package and its dependencies installed. What does this command print?
apt policy linux-headers-amd64
A special compiler is required for building the kernel and kernel modules, but it should be installed along linux-headers automatically.
# apt policy linux-headers-amd64
linux-headers-amd64:
  Installé : (aucun)
  Candidat : (aucun)
 Table de version :
# apt policy linux-headers-4.15.0-43-generic
linux-headers-4.15.0-43-generic:
  Installé : 4.15.0-43.46
  Candidat : 4.15.0-43.46
 Table de version :
 *** 4.15.0-43.46 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
Now I'm trying the silead_ts method :
$ ./scanwindrv SileadTouch.sys
Found possible candidate at offset 0x00000255
Not a firmware, ignoring
Found possible candidate at offset 0x0000d860
Writing firmware to firmware_00.fw, size = 44616 bytes
$ cp firmware_00.fw /lib/firmware/gsl1680-silead-hi8air.fw
Then I will try to modify the  drivers/platform/x86/silead_dmi.c file.
And then to recompile the kernel ...
Hm... What does apt policy linux-kbuild-4.15 say?
# apt policy linux-kbuild-4.15
N: Impossible de trouver le paquet linux-kbuild-4.15
N: Impossible de trouver de paquet correspondant à l'expression rationnelle « linux-kbuild-4.15 »
N: Impossible de trouver de paquet correspondant à l'expression rationnelle « linux-kbuild-4.15 »
Huh. I assumed the kernel build packages are similar between Debian and Ubuntu. Let me check what you need on Ubuntu.
See https://bugs.launchpad.net/ubuntu/+bug/830550 for a similar issue and workaround, but I really think this should not be necessary.
Did you install build-essential?
Did you install
build-essential?
Yes
Here is the output of make :
# make
make -C /lib/modules/4.15.0-43-generic/build ARCH=x86_64 CROSS_COMPILE= M=/home/yves/Téléchargements/gslx680-acpi modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-4.15.0-43-generic »
  CC [M]  /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o
In file included from ./include/linux/list.h:5:0,
                 from ./include/linux/module.h:9,
                 from /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.c:19:
./include/linux/types.h:17:9: error: unknown type name ‘__kernel_ino_t’
 typedef __kernel_ino_t  ino_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:18:9: error: unknown type name ‘__kernel_mode_t’
 typedef __kernel_mode_t  mode_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:21:9: error: unknown type name ‘__kernel_off_t’
 typedef __kernel_off_t  off_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:22:9: error: unknown type name ‘__kernel_pid_t’
 typedef __kernel_pid_t  pid_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:23:9: error: unknown type name ‘__kernel_daddr_t’
 typedef __kernel_daddr_t daddr_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:25:9: error: unknown type name ‘__kernel_suseconds_t’
 typedef __kernel_suseconds_t suseconds_t;
         ^~~~~~~~~~~~~~~~~~~~
./include/linux/types.h:26:9: error: unknown type name ‘__kernel_timer_t’
 typedef __kernel_timer_t timer_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:27:9: error: unknown type name ‘__kernel_clockid_t’
 typedef __kernel_clockid_t clockid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:32:9: error: unknown type name ‘__kernel_uid32_t’
 typedef __kernel_uid32_t uid_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:33:9: error: unknown type name ‘__kernel_gid32_t’
 typedef __kernel_gid32_t gid_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:34:9: error: unknown type name ‘__kernel_uid16_t’
 typedef __kernel_uid16_t        uid16_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:35:9: error: unknown type name ‘__kernel_gid16_t’
 typedef __kernel_gid16_t        gid16_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:41:9: error: unknown type name ‘__kernel_old_uid_t’
 typedef __kernel_old_uid_t old_uid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:42:9: error: unknown type name ‘__kernel_old_gid_t’
 typedef __kernel_old_gid_t old_gid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:46:9: error: unknown type name ‘__kernel_loff_t’
 typedef __kernel_loff_t  loff_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:55:9: error: unknown type name ‘__kernel_size_t’
 typedef __kernel_size_t  size_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:60:9: error: unknown type name ‘__kernel_ssize_t’
 typedef __kernel_ssize_t ssize_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:65:9: error: unknown type name ‘__kernel_ptrdiff_t’
 typedef __kernel_ptrdiff_t ptrdiff_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:70:9: error: unknown type name ‘__kernel_time_t’
 typedef __kernel_time_t  time_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:75:9: error: unknown type name ‘__kernel_clock_t’
 typedef __kernel_clock_t clock_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:80:9: error: unknown type name ‘__kernel_caddr_t’
 typedef __kernel_caddr_t caddr_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:199:2: error: unknown type name ‘__kernel_daddr_t’
  __kernel_daddr_t f_tfree;
  ^~~~~~~~~~~~~~~~
./include/linux/types.h:200:2: error: unknown type name ‘__kernel_ino_t’
  __kernel_ino_t  f_tinode;
  ^~~~~~~~~~~~~~
In file included from ./include/linux/list.h:9:0,
                 from ./include/linux/module.h:9,
                 from /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.c:19:
./include/linux/kernel.h:6:10: fatal error: stdarg.h: Aucun fichier ou dossier de ce type
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
scripts/Makefile.build:339: recipe for target '/home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o' failed
make[2]: *** [/home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o] Error 1
Makefile:1551: recipe for target '_module_/home/yves/Téléchargements/gslx680-acpi' failed
make[1]: *** [_module_/home/yves/Téléchargements/gslx680-acpi] Error 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-4.15.0-43-generic »
Makefile:18: recipe for target 'modules' failed
make: *** [modules] Error 2
See https://bugs.launchpad.net/ubuntu/+bug/830550 for a similar issue and workaround, but I really think this should not be necessary.
Thanks for the link. I did this :
$ cd /lib/modules/$(uname -r)/build/include
$ sudo ln -s $(gcc -print-file-name=include)/stdarg.h
And the result was :
# make
make -C /lib/modules/4.15.0-43-generic/build ARCH=x86_64 CROSS_COMPILE= M=/home/yves/Téléchargements/gslx680-acpi modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-4.15.0-43-generic »
  CC [M]  /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o
In file included from ./include/linux/list.h:5:0,
                 from ./include/linux/module.h:9,
                 from /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.c:19:
./include/linux/types.h:17:9: error: unknown type name ‘__kernel_ino_t’
 typedef __kernel_ino_t  ino_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:18:9: error: unknown type name ‘__kernel_mode_t’
 typedef __kernel_mode_t  mode_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:21:9: error: unknown type name ‘__kernel_off_t’
 typedef __kernel_off_t  off_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:22:9: error: unknown type name ‘__kernel_pid_t’
 typedef __kernel_pid_t  pid_t;
         ^~~~~~~~~~~~~~
./include/linux/types.h:23:9: error: unknown type name ‘__kernel_daddr_t’
 typedef __kernel_daddr_t daddr_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:25:9: error: unknown type name ‘__kernel_suseconds_t’
 typedef __kernel_suseconds_t suseconds_t;
         ^~~~~~~~~~~~~~~~~~~~
./include/linux/types.h:26:9: error: unknown type name ‘__kernel_timer_t’
 typedef __kernel_timer_t timer_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:27:9: error: unknown type name ‘__kernel_clockid_t’
 typedef __kernel_clockid_t clockid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:32:9: error: unknown type name ‘__kernel_uid32_t’
 typedef __kernel_uid32_t uid_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:33:9: error: unknown type name ‘__kernel_gid32_t’
 typedef __kernel_gid32_t gid_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:34:9: error: unknown type name ‘__kernel_uid16_t’
 typedef __kernel_uid16_t        uid16_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:35:9: error: unknown type name ‘__kernel_gid16_t’
 typedef __kernel_gid16_t        gid16_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:41:9: error: unknown type name ‘__kernel_old_uid_t’
 typedef __kernel_old_uid_t old_uid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:42:9: error: unknown type name ‘__kernel_old_gid_t’
 typedef __kernel_old_gid_t old_gid_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:46:9: error: unknown type name ‘__kernel_loff_t’
 typedef __kernel_loff_t  loff_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:55:9: error: unknown type name ‘__kernel_size_t’
 typedef __kernel_size_t  size_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:60:9: error: unknown type name ‘__kernel_ssize_t’
 typedef __kernel_ssize_t ssize_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:65:9: error: unknown type name ‘__kernel_ptrdiff_t’
 typedef __kernel_ptrdiff_t ptrdiff_t;
         ^~~~~~~~~~~~~~~~~~
./include/linux/types.h:70:9: error: unknown type name ‘__kernel_time_t’
 typedef __kernel_time_t  time_t;
         ^~~~~~~~~~~~~~~
./include/linux/types.h:75:9: error: unknown type name ‘__kernel_clock_t’
 typedef __kernel_clock_t clock_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:80:9: error: unknown type name ‘__kernel_caddr_t’
 typedef __kernel_caddr_t caddr_t;
         ^~~~~~~~~~~~~~~~
./include/linux/types.h:199:2: error: unknown type name ‘__kernel_daddr_t’
  __kernel_daddr_t f_tfree;
  ^~~~~~~~~~~~~~~~
./include/linux/types.h:200:2: error: unknown type name ‘__kernel_ino_t’
  __kernel_ino_t  f_tinode;
  ^~~~~~~~~~~~~~
In file included from ./include/linux/kernel.h:7:0,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.c:19:
./include/linux/linkage.h:8:10: fatal error: asm/linkage.h: Aucun fichier ou dossier de ce type
 #include <asm/linkage.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:339: recipe for target '/home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o' failed
make[2]: *** [/home/yves/Téléchargements/gslx680-acpi/gslx680_ts_acpi.o] Error 1
Makefile:1551: recipe for target '_module_/home/yves/Téléchargements/gslx680-acpi' failed
make[1]: *** [_module_/home/yves/Téléchargements/gslx680-acpi] Error 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-4.15.0-43-generic »
Makefile:18: recipe for target 'modules' failed
make: *** [modules] Error 2
Now it can't find linkage.h !!
Perhaps a solution here ? https://stackoverflow.com/questions/48812053/gcc-kernel-module-compilation-errors
Then I will try to modify the
drivers/platform/x86/silead_dmi.cfile.
I can't find this file !
Where is the drivers/platform/x86/ directory ?
drivers/platform/x86/ is inside the kernel sources.
However, they changed its name to touchscreen_dmi.c in kernel 4.18 I think.
Note that you need the full kernel sources to compile the kernel, not just linux-headers.
About the compilation errors you get... It seems like you're either compiling with the wrong gcc or it's not picking up the kernel headers correctly. The Makefile has been tested with many different kernel versions since 4.0 (and probably even 3.6), so I don't think there's anything wrong with it.
drivers/platform/x86/is inside the kernel sources. However, they changed its name totouchscreen_dmi.cin kernel 4.18 I think.Note that you need the full kernel sources to compile the kernel, not just
linux-headers.
I've now installed full linux-source.
Can you help me to locate drivers/platform/x86/ from /
About the compilation errors you get... It seems like you're either compiling with the wrong gcc
I've installed it with apt-get install gcc. What could be wrong ?
or it's not picking up the kernel headers correctly.
Perhaps, but why ?
I've installed it with
apt-get install gcc. What could be wrong ?
On Debian at least, that's not the right compiler. You need linux-kbuild. But I have no idea how this is handled on Ubuntu. Sorry.
Perhaps, but why ?
Normally, you don't have to specify any kernel version or source path. It will be picked up from the running kernel automatically.
I've now installed full
linux-source. Can you help me to locatedrivers/platform/x86/from/
The linux-source package installs the compressed kernel source to /usr/src. You should unpack it somewhere in your home.
But there is a better method: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
This will give you a nice .deb, which is easier to upgrade/uninstall later.
The linux-source package installs the compressed kernel source to
/usr/src. You should unpack it somewhere in your home. But there is a better method: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel This will give you a nice .deb, which is easier to upgrade/uninstall later.
Thanks for the link. I will try it ...
Could it not be that the Chuwi Hi8 Air uses the exact same (touch)screen as the Chuwi Hi8 Pro, which is already supported by the current mainline kernel? (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/touchscreen_dmi.c?h=v5.0-rc2#n44)
Unlike the older Hi8, the Hi8 Pro and Hi8 Air have the same display size and resolution and I thought the Hi8 Air was only a very slightly modified Hi8 Pro.
sudo dmesg | grep silead on Xubuntu 18.10 with the mainline kernel 5.0-rc2 wants a file mssl1680.fw.
If I extract the firmware via scanwindrv from the Hi8 Air Windows driver package posted in a comment here, I get only one firmware file, like here. If I rename that to mssl1680.fw and put it into /lib/firmware/silead/, the touchscreen works somehow. It registers the touch somewhere, but it's all messed up.
Another user tried something similar with two different tablets and had a similar problem: https://hackaday.io/project/83212/logs
@StrongTabletMan Thanks for the information. I will try with Xubuntu and kernel 5.0-rc2. Did you succeed in calibrating the touchscreen ? It looks not so difficult with xinput_calibrator ...
@Yes21 Based on the reactions I got from the touchscreen, I think I either extracted the firmware in a wrong way from the *.rar archive provided here or the tool had problems extracting it. Maybe it's also just that the proper configuration settings that would usually be in the kernel files are missing.
At the moment, I don't really know how to continue working on this, I lack the knowledge.
I might try to restore the factory system with Android and Windows 10 and copy over all the drivers I find there that are directly on my device and then maybe try each of the firmwares the extraction tools from this repository might create for me.
Short update: Like I assumed, the messed up touchscreen registration was due to extracting the wrong firmware file.
Using scanwindrv on the file SileadTouch.sys from this archive posted on the Chuwi forums and in here extracts a corrupt firmware file. The correct way is to use untscfg on T892_64b_3676_L_DZ_OGS80B32_171215_Lq.h in the same folder. This will produce a slightly bigger firmware file that can be renamed to mssl1680.fw and placed into /lib/firmware/silead (sudo mkdir /lib/firmware/sileadif it doesn't exist) for testing purposes. The touchscreen will not be calibrated, but the touch should register properly after a reboot.
By the way: while the slight jittering of the mouse pointer does not happen in Windows 10, it does also happen in the touch BIOS of the Chuwi Hi8 Air and not only in Linux, so I think this could be solved by adjusting certain software parameters. I think @onitake already mentioned this in another issue.
I'll now try to find the proper values to calibrate the touchscreen.
If anyone else wants to try this, I found a post of Hans de Goede on how to find the coordinates: https://bugzilla.redhat.com/show_bug.cgi?id=1526312#c3
I uploaded the extracted firmware I just tested: https://www.mediafire.com/file/es7nuehhdqkylk2/mssl1680.fw/file or https://github.com/onitake/gsl-firmware/files/2780463/mssl1680.zip
The maximum coordinates I received via evemu-record seem to match the ones for the Chuwi Hi8 Pro in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/touchscreen_dmi.c?h=v5.0-rc2#n44
I created a picture to show the values in the corners: https://i.imgur.com/EegRqJu.png
Tablet in portrait mode: TL (0,0) TR (0, 1148) BL (1728, 0) BR (1728, 1148)
(The actual lowest value for x and y that showed up during my tests was actually 1 for both, not 0.)
The scanwindrv script only applies a simple heuristic to find firmware in the Windows driver. It's should be able to extract a complete firmware image, but it won't be able to separate them if several are side-by-side. Also, if the vendor has added a separate firmware, the Windows driver will use that instead.
Glad that you could find one that works! Could you prepare a pull request so I can add it to the repo?
Concerning jitter correction: The Linux input driver framework supports many additional options that you can pass to the driver via DMI or DeviceTree. See https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt for an overview.
I added entries for the tablet and successfully compiled a kernel, but silead_ts still asks for a mssl1680.fw file. I don't know what to do really, I did everything as described.
The driver defaults to mssl1680.fw if no matching stanza in silead_dmi.c is found [...] find out what DMI strings your device matches and add a new stanza to silead_dmi.c
https://github.com/onitake/gsl-firmware/issues/69#issuecomment-370166371
sudo dmidecode output and what I used: https://gist.github.com/StrongTabletMan/f778cbcf23b90c11d3fec94a4b160722#file-dmidecode-log-L36
My changes to touchscreen_dmi.c: https://gist.github.com/StrongTabletMan/6977a5f9893ce860020875a42c297c30/revisions#diff-1064f240ffeec5dc85f662e1513283bd
Kernel I modified and compiled successfully: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/
OS: Xubuntu 18.10 Desktop AMD64
Is there anything I did wrong? Could it be the parentheses in one of my added DMI strings? Should I try to pick another kernel and modify it? I'm a bit clueless.
I want to report back that the whole touchscreen suddenly started working after a reboot. I have the feeling that my additions worked and maybe something blocked the driver from loading the proper firmware. I'll try to investigate this further, but so far it looks promising.
@StrongTabletMan Hi, and thanks for your help.
I have now Xubuntu 18.10 on my Hi8 Air. I've downloaded this file https://www.mediafire.com/file/es7nuehhdqkylk2/mssl1680.fw/file, and did copy it into /lib/firmware/silead. And now what are the next steps ?
Kernel I modified and compiled successfully: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/
How to install v5.0-rc2 kernel on Xubuntu ? What should be modified before compiling this kernel ?
My changes to touchscreen_dmi.c
What to do with this file ?
Thanks for your help.
I've another question :
Do one knows how to decrease the resolution of the screen from 1920x1200 to 1280x800. It works with windows, but not with linux.
Sorry to post this question here ...
I answer to me ! I could install the v5.0-rc2 kernel. After that the touchscreen is working, but calibration is totally bad (what I was waiting for !). I tried to use xinput_calibrator to do the calibration, but it did nothing.
I guess I have to copy touchscreen_dmi.c somewhere in the linux-headers, and then compile a new kernel ?
I will try it ...
The touchscreen will respond with the firmware being placed into the corresponding folder, but there is currently no configuration for the Chuwi Hi8 Air in touchscreen_dmi.c.
You have to add those blocks to your touchscreen_dmi.c file and compile the whole kernel after that.
The touchscreen will respond with the firmware being placed into the corresponding folder, but there is currently no configuration for the Chuwi Hi8 Air in
touchscreen_dmi.c.You have to add those blocks to your
touchscreen_dmi.cfile and compile the whole kernel after that.
Ok, Thanks. I will do it.
Did you change something in menuconfig before compiling ?
I only downloaded the kernel sources, applied the Ubuntu patches and then followed the instructions here: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel#Building_the_kernel
For me it threw out a few errors during the initial compilation steps. If it does the same for you, it's because some packages are missing that are needed to successfully compile the kernel. I can't remember which ones exactly, but you should get error messages telling you what to search for.
Thanks :) I'm downloading the kernel sources. It's very long !!
Here are all the steps I did to compile the v5.0-rc2 kernel on the Chuwi Hi8 Air :
git clone https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v5.0-rc2
cd v5.0-rc2/
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/0001-base-packaging.patch
patch -p0 < 0001-base-packaging.patch
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
patch -p0 < 0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
patch -p0 < 0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/0004-debian-changelog.patch
patch -p0 < 0004-debian-changelog.patch
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/0005-configs-based-on-Ubuntu-5.0.0-0.1.patch
patch -p0 < 0005-configs-based-on-Ubuntu-5.0.0-0.1.patch
Then edit b/debian.master/changelog to add a label to identify your kernel ("Hi8-Air")
Then edit drivers/platform/x86/touchscreen_dmi.c to add these lines to the file.
For the kernel compilation, I did use the classical method, because I couldn't reproduce the "fakeroot" method :
cp -v /boot/config-$(uname -r) .config
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
make -j 4
I only downloaded the kernel sources, applied the Ubuntu patches and then followed the instructions here: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel#Building_the_kernel
For me it threw out a few errors during the initial compilation steps. If it does the same for you, it's because some packages are missing that are needed to successfully compile the kernel. I can't remember which ones exactly, but you should get error messages telling you what to search for.
@StrongTabletMan I'm following the instructions from the link you did send. I see we have to add lines to "sources.list"
The above command requires your system to have the correct deb-src lines in /etc/apt/sources.list. For example, on Xenial you should have: deb-src http://archive.ubuntu.com/ubuntu xenial main deb-src http://archive.ubuntu.com/ubuntu xenial-updates main
If I'm trying with "cosmic" instead of "xenial", it does not work. Which lines did you add in your "sources.list" ??
I couldn't go to the end of the compiling process after 5 hours !! My 25 Gb "/" partition is now full !! It's really the HELL to compile the kernel on a small tablet ... I don't know what to try now ?
Any help is welcome.
Don't compile the custom kernel on the Tablet itself, that's suicide. The folder grows from around 2.9 GB to 23.1 GB and the tablet's hardware is slow enough to make the process take many hours.
Take the most powerful system you own, set up VirtualBox (or any other solution you prefer), assign it as many resources as possible (I gave mine 4 GB RAM, all 4 cores on my quad-core CPU and set the disk to 100 GB with dynamic expansion), download Xubuntu 18.10 64-bit and install it, then start it and edit your sources.list (mine (DE mirrors since I'm from Germany)).
Then get the sources from the git repository and follow the mentioned steps. This is roughly what I did.
Like some of the other contributors with pull requests here, I also submitted a patch to add the Chuwi Hi8 Air data for the silead driver into the Linux kernel, so hopefully there won't be the necessity to compile a custom kernel in many situations anymore someday.
To be honest, I wouldn't do this in a VM (and particularly not VBox...) If you really don't want to pollute your host box, just launch a container with a base Debian or Ubuntu system and mount a host path so you get better I/O performance. Make sure the container image matches what you installed on the tablet, so you get the right compilers etc.
FWIW, I did compile a kernel on a Baytrail tablet once. Just kept it running overnight. But I moved to a faster machine after the first time...
@StrongTabletMan Many many Thanks for your help !! That's very nice to you ...
So I did create a vm with Xubuntu 18.10-64. Then git clone the v5.0-rc2 sources and apply patches. Then modify my sources.list and the touchscreen_dmi.c file.
But I can't go further :
yves@yves-VirtualBox:~/v5.0-rc2$ chmod a+x debian/rules
chmod: impossible d'accéder à 'debian/rules': Aucun fichier ou dossier de ce type
yves@yves-VirtualBox:~/v5.0-rc2$ chmod a+x debian/scripts/*
chmod: impossible d'accéder à 'debian/scripts/*': Aucun fichier ou dossier de ce type
yves@yves-VirtualBox:~/v5.0-rc2$ chmod a+x debian/scripts/misc/*
chmod: impossible d'accéder à 'debian/scripts/misc/*': Aucun fichier ou dossier de ce type
yves@yves-VirtualBox:~/v5.0-rc2$ fakeroot debian/rules clean
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: debian/rules: not found
yves@yves-VirtualBox:~/v5.0-rc2$ fakeroot debian/rules do_mainline_build=true binary-headers binary-generic
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: debian/rules: not found
(sorry that's in french)
Did I miss something ?
My first thought would be that you didn't apply the Ubuntu patches correctly, because you seem to be missing files and folders that are created by those patches.
Make sure you properly download all the patches, put them into the main folder (the one with arch, block, certs, crypto, etc. folders) and then apply them with patch -p1 <0001-base-packaging.patch, then patch -p1 <0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch, then the next patch and so on. Make sure you are in the main folder, in this case v5.0-rc2 while running the patch commands.
After applying the first patch, you should already see the debian folder and other files and folders being created there. If not, something probably went wrong.
You can also just download the patches with a browser from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0-rc2/ etc.
I'm probably as new to compiling a kernel as you are, but I hope it works for you!
@StrongTabletMan Thanks again for your help. I've finally succeed in compiling the kernel. My error was that I used the patch command with -p0 option instead of -p1. Then I've copied and installed the deb files on the tablet. But after many reboots it didn't change anything and the touchscreen is still not calibrated.
Perhaps should I rename the firmware gsl3676-chuwi-hi8-air.fw instead of mssl1680.fw ?
Perhaps should I rename the firmware
gsl3676-chuwi-hi8-air.fwinstead ofmssl1680.fw?
No it doesn't change nothing ...
Make sure that
- the additions are in your touchscreen_dmi.cfile,
- you installed all five *.deb packages on the tablet and
- you booted with the new kernel you installed (uname -ashould show this).
Perhaps should I rename the firmware
gsl3676-chuwi-hi8-air.fwinstead ofmssl1680.fw?
No it doesn't change nothing ...
Make sure that
* the additions are in your `touchscreen_dmi.c` file, * you installed all five *.deb packages on the tablet and * you booted with the new kernel you installed (`uname -a` should show this).
I did double check all these things ! I will try to redo all from zero ...
Please, could you share you five .deb files ?
The changes are now in the current mainline kernel v5.1-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/touchscreen_dmi.c?h=v5.1-rc1#n44
The firmware file that goes into /lib/firmware/silead/ can be found here: https://github.com/onitake/gsl-firmware/blob/b0492c1137d91b8025b3b3227786704d624e9da4/firmware/linux/silead/gsl3676-chuwi-hi8-air.fw
I updated to that kernel version on Xubuntu 18.10 and it works, but the jitter makes it very hard to double-click and therefore navigate properly.