[fprint] [PATCH 0/8] [RFC] Build drivers as shared objects

Kunal Gangakhedkar kunal.gangakhedkar at gmail.com
Mon Oct 8 07:39:24 PDT 2012


This is a set of patches that tries to build the drivers as shared object
modules and provides API to load/unload them on the fly.

The design is inspired by the way linux kernel implements modules -
albeit, with a lot less complexity :).

I don't know if anyone is interested in this kind of support.
Hopefully, people find it useful.

Ideally, the way to use this feature would be to have fprintd/pam module
maintain the configuration of drivers the system needs.
This configuration can be generated by a post-installation script.

fprintd/pam then runs through such a list of drivers loading them one by one
by calling load_module().

In case of PAM, we can add option like "drivers=drv_abc.so drv_xyz.so .."
directly. However, IIRC the new fprintd code implements a PAM module that
talks to fprintd instead of talking to h/w directly - in which case, this
configuration can be handled only in fprintd.

I'll try to implement this support in fprintd whenever I find some spare
time to burn.

This patchset is also available in the following git repo
	git://github.com/kunalg/libfprint.git
in the branch dl-drivers.

Please review it and let me know if it can be merged.

Also, if possible, please see if it can be compiled/used on other
supported platforms like *BSD.
Unfortunately, I couldn't test it in my FreeBSD VM - it seems to have
gotten corrupted and isn't booting. :(
I'll try it myself once I get the VM to boot.

Please note that, right now, I haven't added any doxygen comments
for the newly introduced functions. Once it passes the review, I'll
add the related comments in a future commit.

Thanks,
Kunal

Kunal Gangakhedkar (8):
  lib: Add support for dynamically loading drivers.
  build: define new visibility class for internal API.
  lib: Add test program to test dynamic driver loading.
  lib: Mark internal API functions with API_INTERNAL.
  build: add build support for dynamic loadable drivers.
  lib: Skip extern refs. to driver data structures.
  drivers: prep the drivers for building as shared objects.
  lib: disable fprint-list-udev-rules logic - for now.

 configure.ac                       |   18 ++++-
 examples/Makefile.am               |    6 ++
 examples/test_driver.c             |   32 ++++++++
 libfprint/Makefile.am              |   19 ++++-
 libfprint/async.c                  |   26 +++----
 libfprint/core.c                   |   18 ++++-
 libfprint/data.c                   |   10 ++-
 libfprint/drivers/Makefile.am      |  119 +++++++++++++++++++++++++++++
 libfprint/drivers/aes1610.c        |   22 +++++-
 libfprint/drivers/aes2501.c        |   18 +++++
 libfprint/drivers/aes4000.c        |   18 +++++
 libfprint/drivers/fdu2000.c        |   19 +++++
 libfprint/drivers/upeke2.c         |   17 +++++
 libfprint/drivers/upeksonly.c      |   18 +++++
 libfprint/drivers/upekts.c         |   16 ++++
 libfprint/drivers/uru4000.c        |   18 +++++
 libfprint/drivers/vcom5s.c         |   17 +++++
 libfprint/drivers/vfs101.c         |   19 +++++
 libfprint/drivers/vfs301.c         |   18 +++++
 libfprint/drv.c                    |   19 ++---
 libfprint/fp_internal.h            |    6 ++
 libfprint/fprint-list-udev-rules.c |    2 +
 libfprint/gdkpixbuf.c              |    3 +-
 libfprint/imagemagick.c            |    3 +-
 libfprint/img.c                    |   18 ++---
 libfprint/imgdev.c                 |   23 +++---
 libfprint/module.c                 |  148 ++++++++++++++++++++++++++++++++++++
 libfprint/module.h                 |   57 ++++++++++++++
 libfprint/poll.c                   |   10 +--
 29 files changed, 678 insertions(+), 59 deletions(-)
 create mode 100644 examples/test_driver.c
 create mode 100644 libfprint/drivers/Makefile.am
 create mode 100644 libfprint/module.c
 create mode 100644 libfprint/module.h

-- 
1.7.9.5



More information about the fprint mailing list