You are not logged in.

#1 2018-02-25 12:50:29

satriani
Member
Registered: 2015-06-26
Posts: 26

Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Hello,

I found a driver for Fingerprint sensor Goodix GF3208 here: https://github.com/yangyangnau/android_ … int/goodix
Can someone here port it to the desktop / laptop linux?

Thanks in advance.

Offline

#2 2018-02-25 15:40:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,209

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Moving to AUR issues, Discussions, and PKGBUILD requests.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2018-02-25 22:53:28

progandy
Member
Registered: 2012-05-17
Posts: 5,263

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

This should at least build manually and I can insmod/rmmod without error. I don't have the hardware, so more tests are not possible. Feel free to create a (dkms) package.
https://www.kernel.org/doc/Documentatio … efiles.txt

This is /tmp/build/gf-external.patch

diff --git a/Makefile b/Makefile
index c820d0b..a657221 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
-obj-$(CONFIG_FINGERPRINT_GOODIX_GF3208) += gf_spi.o platform.o netlink.o
+obj-m = gf.o
+gf-y = gf_spi.o platform.o netlink.o
 
 
diff --git a/gf_spi.c b/gf_spi.c
index 619322f..751f7d5 100644
--- a/gf_spi.c
+++ b/gf_spi.c
@@ -43,6 +43,7 @@
 #include <linux/fb.h>
 #include <linux/pm_qos.h>
 #include <linux/cpufreq.h>
+#include <linux/uaccess.h>
 
 #include "gf_spi.h"
 
@@ -788,9 +789,10 @@ static int gf_remove(struct platform_device *pdev)
 	if (gf_dev->irq)
 		free_irq(gf_dev->irq, gf_dev);
 
-	if (gf_dev->input != NULL)
+	if (gf_dev->input != NULL) {
 		input_unregister_device(gf_dev->input);
 		input_free_device(gf_dev->input);
+	}
 
 	/* prevent new opens */
 	mutex_lock(&device_list_lock);
cd /tmp/build
svn export https://github.com/yangyangnau/android_kernel_xiaomi_msm8937/branches/cm-13.0/drivers/fingerprint/goodix goodix
cd goodix
patch -p1 <../gf-external.patch
make -C /lib/modules/`uname -r`/build M=$PWD  
# gf.ko should be the module
# my modinfo srcversion:     3BEADD48F7C8BE05AFB00E3

Last edited by progandy (2018-02-25 22:54:43)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2018-02-26 08:28:27

satriani
Member
Registered: 2015-06-26
Posts: 26

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Thank you.
Unfortunately, I get an error

$ make -C /lib/modules/`uname -r`/build M=$PWD
make: Entering directory '/usr/lib/modules/4.15.5-1-ARCH/build'
make: *** No targets specified and no makefile found.  Stop.
make: Leaving directory '/usr/lib/modules/4.15.5-1-ARCH/build'

Offline

#5 2018-02-26 08:56:15

progandy
Member
Registered: 2012-05-17
Posts: 5,263

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

You need the linux-headers package to build kernel modules.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2018-02-26 18:15:55

satriani
Member
Registered: 2015-06-26
Posts: 26

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Does not look good

Error! Bad return status for module build on kernel: 4.15.5-1-ARCH (x86_64)
$ cat /var/lib/dkms/goodix-gf3208/0.1/build/make.log
DKMS make.log for goodix-gf3208-0.1 for kernel 4.15.5-1-ARCH (x86_64)
Mo 26. Feb 18:27:17 CET 2018
make: Unbekannte Option »--uname_r=4.15.5-1-ARCH«

dkms.conf

...
MAKE[0]="make --uname_r=$kernelver"
...

Last edited by satriani (2018-02-26 18:21:52)

Offline

#7 2018-02-26 18:59:07

progandy
Member
Registered: 2012-05-17
Posts: 5,263

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Your dkms.conf doesn't look right. Did it work with a manual build and insmod? You can manually copy the gf.ko to e.g. /usr/lib/modules/extramodules-4.15-ARCH if you need to test it e.g. during a boot.

Edit: By the way, that seems to be a usermode driver that only enables communication from the fingerprint reader to a user process. The driver alone should not help you, you'd also need an application to tell it what to do.

Last edited by progandy (2018-02-26 19:54:37)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2018-02-26 20:13:10

satriani
Member
Registered: 2015-06-26
Posts: 26

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Please take a look to my repo here

progandy wrote:

Edit: By the way, that seems to be a usermode driver that only enables communication from the fingerprint reader to a user process.

As far as I know, this task is handled by GNOME user settings.

Offline

#9 2018-02-26 20:53:32

progandy
Member
Registered: 2012-05-17
Posts: 5,263

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

I'm not sure if $PWD is guaranteed to work in a dkms file, but I made you a pull request that compiles for me. (I used the first two steps from ubuntu)

As far as I know, this task is handled by GNOME user settings.

That only works if gnome knows how to talk to this fingerprint reader, and that is doubtful since the driver doesn't seem to provide a well-known fingerprint api.

Last edited by progandy (2018-02-26 21:01:50)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#10 2018-02-26 21:26:25

satriani
Member
Registered: 2015-06-26
Posts: 26

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Thank you, you are right. I received the answer from freedesktop.org, with the following content.

Vasily wrote:

Hi,

It's just a thin kernel shim for SPI device (and I doubt that this
interface is used to connect fingerprint sensor in laptops, USB is
more common).

This device still requires userspace blob (which is actual driver).

Regards,
Vasily

Well, then I keep looking for the driver.

Offline

#11 2018-03-14 12:25:57

ExoDroiD
Member
Registered: 2018-01-01
Posts: 23

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Hey @satriani, would you mind updating here in case you make any progress or find the driver? Thanks!

Offline

#12 2018-03-14 18:56:15

satriani
Member
Registered: 2015-06-26
Posts: 26

Re: Fingerprint sensor Goodix GF3208 (27c6:5301) driver for Linux

Of course, I will post it here. Unfortunately, there is no solution so far.

Offline

Board footer

Powered by FluxBB