* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package
@ 2012-09-19 12:52 Waldemar Rymarkiewicz
2012-09-19 12:52 ` [Buildroot] [PATCH v2 2/2] ccid: " Waldemar Rymarkiewicz
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Waldemar Rymarkiewicz @ 2012-09-19 12:52 UTC (permalink / raw)
To: buildroot
Middleware to access a smart card using SCard API (PC/SC).
http://pcsclite.alioth.debian.org/
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
---
package/Config.in | 1 +
package/pcsc-lite/Config.in | 24 ++++++++++++++++++++++++
package/pcsc-lite/pcsc-lite.mk | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+)
create mode 100644 package/pcsc-lite/Config.in
create mode 100644 package/pcsc-lite/pcsc-lite.mk
diff --git a/package/Config.in b/package/Config.in
index a4e0b2c..dcc84b6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -395,6 +395,7 @@ source "package/libusb/Config.in"
source "package/libusb-compat/Config.in"
source "package/libv4l/Config.in"
source "package/mtdev/Config.in"
+source "package/pcsc-lite/Config.in"
endmenu
menu "Javascript"
diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in
new file mode 100644
index 0000000..94d37c5
--- /dev/null
+++ b/package/pcsc-lite/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_PCSC_LITE
+ bool "pcsc-lite"
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ help
+ Middleware to accesss smart card using SCard API (PC/SC).
+
+ http://pcsclite.alioth.debian.org/
+
+if BR2_PACKAGE_PCSC_LITE
+
+config BR2_PACKAGE_PCSC_LITE_DEBUGART
+ bool "enable ATR debug messages"
+ help
+ enable ATR debug messages from pcscd
+
+config BR2_PACKAGE_PCSC_LITE_EMBEDDED
+ bool "enable embedded mode"
+ help
+ limit RAM and CPU ressources by disabling features (log)
+
+endif
+
+comment "pcsc-lite needs a toolchain with thread support"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk
new file mode 100644
index 0000000..2a031e4
--- /dev/null
+++ b/package/pcsc-lite/pcsc-lite.mk
@@ -0,0 +1,34 @@
+##########################################################
+#
+# PCSC-Lite
+#
+# ########################################################
+PCSC_LITE_VERSION = 1.8.6
+PCSC_LITE_SOURCE = pcsc-lite-$(PCSC_LITE_VERSION).tar.bz2
+PCSC_LITE_SITE = https://alioth.debian.org/frs/download.php/3757
+PCSC_LITE_INSTALL_STAGING = YES
+PCSC_LITE_DEPENDENCIES = host-pkg-config
+
+# libudev has a priority over libusb
+ifneq ($(BR2_PACKAGE_UDEV),y)
+PCSC_LITE_CONF_OPT += --disable-libudev
+
+ifeq ($(BR2_PACKAGE_LIBUSB),y)
+PCSC_LITE_CONF_OPT += --enable-libusb
+PCSC_LITE_DEPENDENCIES += libusb
+else
+PCSC_LITE_CONF_OPT += --disable-libusb
+endif
+
+endif
+
+ifeq ($(PACKAGE_PCSC_LITE_DEBUGART),y)
+PCSC_LITE_CONF_OPT += --enable-debugatr
+endif
+
+ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y)
+PCSC_LITE_CONF_OPT += --enable-embedded
+endif
+
+
+$(eval $(call autotools-package))
--
1.7.10
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCH v2 2/2] ccid: new package 2012-09-19 12:52 [Buildroot] [PATCH v2 1/2] pcsc-lite: new package Waldemar Rymarkiewicz @ 2012-09-19 12:52 ` Waldemar Rymarkiewicz 2012-09-19 20:56 ` Arnout Vandecappelle 2012-09-19 14:47 ` [Buildroot] [PATCH v2 1/2] pcsc-lite: " Thomas Petazzoni 2012-09-19 20:41 ` Arnout Vandecappelle 2 siblings, 1 reply; 12+ messages in thread From: Waldemar Rymarkiewicz @ 2012-09-19 12:52 UTC (permalink / raw) To: buildroot PC/SC driver for USB CCID smart card readers. http://pcsclite.alioth.debian.org/ccid.html Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> --- package/Config.in | 1 + package/ccid/Config.in | 11 +++++++++++ package/ccid/ccid.mk | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 package/ccid/Config.in create mode 100644 package/ccid/ccid.mk diff --git a/package/Config.in b/package/Config.in index dcc84b6..a0fb593 100644 --- a/package/Config.in +++ b/package/Config.in @@ -382,6 +382,7 @@ source "package/zxing/Config.in" endmenu menu "Hardware handling" +source "package/ccid/Config.in" source "package/libaio/Config.in" source "package/libraw1394/Config.in" source "package/tslib/Config.in" diff --git a/package/ccid/Config.in b/package/ccid/Config.in new file mode 100644 index 0000000..d67bc0e --- /dev/null +++ b/package/ccid/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_CCID + bool "ccid" + select BR2_PACKAGE_PCSC_LITE + depends on BR2_TOOLCHAIN_HAS_THREADS + help + PC/SC driver for USB CCID smart card readers + + http://pcsclite.alioth.debian.org/ccid.html + +comment "ccid needs a toolchain with thread support" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ccid/ccid.mk b/package/ccid/ccid.mk new file mode 100644 index 0000000..cb59451 --- /dev/null +++ b/package/ccid/ccid.mk @@ -0,0 +1,19 @@ +########################################################## +# +# CCID +# +# ######################################################## +CCID_VERSION = 1.4.7 +CCID_SOURCE = ccid-$(CCID_VERSION).tar.bz2 +CCID_SITE = https://alioth.debian.org/frs/download.php/3730 +CCID_INSTALL_STAGING = YES +CCID_DEPENDENCIES = pcsc-lite host-pkg-config + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +CCID_CONF_OPT += --enable-libusb +CCID_DEPENDENCIES += libusb +else +CCID_CONF_OPT += --disable-libusb +endif + +$(eval $(call autotools-package)) -- 1.7.10 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/2] ccid: new package 2012-09-19 12:52 ` [Buildroot] [PATCH v2 2/2] ccid: " Waldemar Rymarkiewicz @ 2012-09-19 20:56 ` Arnout Vandecappelle 2012-09-20 6:31 ` Waldemar.Rymarkiewicz at tieto.com 0 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2012-09-19 20:56 UTC (permalink / raw) To: buildroot On 09/19/12 14:52, Waldemar Rymarkiewicz wrote: > PC/SC driver for USB CCID smart card readers. [snip] > +ifeq ($(BR2_PACKAGE_LIBUSB),y) > +CCID_CONF_OPT += --enable-libusb > +CCID_DEPENDENCIES += libusb > +else > +CCID_CONF_OPT += --disable-libusb > +endif > + > +$(eval $(call autotools-package)) I just build-tested on a config without libusb, and it doesn't seem to install anything. The examples are compiled (not installed), but I doubt they're useful for anything without the ccid plugin. So maybe it's better to select libusb after all. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 2/2] ccid: new package 2012-09-19 20:56 ` Arnout Vandecappelle @ 2012-09-20 6:31 ` Waldemar.Rymarkiewicz at tieto.com 0 siblings, 0 replies; 12+ messages in thread From: Waldemar.Rymarkiewicz at tieto.com @ 2012-09-20 6:31 UTC (permalink / raw) To: buildroot Arnout, >[snip] >> +ifeq ($(BR2_PACKAGE_LIBUSB),y) >> +CCID_CONF_OPT += --enable-libusb >> +CCID_DEPENDENCIES += libusb >> +else >> +CCID_CONF_OPT += --disable-libusb >> +endif >> + >> +$(eval $(call autotools-package)) > > I just build-tested on a config without libusb, and it doesn't seem >to install anything. The examples are compiled (not installed), but >I doubt they're useful for anything without the ccid plugin. > > So maybe it's better to select libusb after all. You are right. I missed that. It seems that ccid itself is broken and this option does not work as supposed so I will require libusb then. Thanks, /Waldek ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-19 12:52 [Buildroot] [PATCH v2 1/2] pcsc-lite: new package Waldemar Rymarkiewicz 2012-09-19 12:52 ` [Buildroot] [PATCH v2 2/2] ccid: " Waldemar Rymarkiewicz @ 2012-09-19 14:47 ` Thomas Petazzoni 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-19 20:41 ` Arnout Vandecappelle 2 siblings, 1 reply; 12+ messages in thread From: Thomas Petazzoni @ 2012-09-19 14:47 UTC (permalink / raw) To: buildroot Dear Waldemar Rymarkiewicz, On Wed, 19 Sep 2012 14:52:29 +0200, Waldemar Rymarkiewicz wrote: > +# libudev has a priority over libusb > +ifneq ($(BR2_PACKAGE_UDEV),y) > +PCSC_LITE_CONF_OPT += --disable-libudev > + > +ifeq ($(BR2_PACKAGE_LIBUSB),y) > +PCSC_LITE_CONF_OPT += --enable-libusb > +PCSC_LITE_DEPENDENCIES += libusb > +else > +PCSC_LITE_CONF_OPT += --disable-libusb > +endif > + > +endif Can you detail this? I haven't looked at pcsc-lite itself, but this looks strange. So if it is correct, it anyway needs a more detailed comment. Why when udev is available you don't do need libusb? Also, if udev is available, you need to add it to the list of dependencies. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-19 14:47 ` [Buildroot] [PATCH v2 1/2] pcsc-lite: " Thomas Petazzoni @ 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 7:36 ` Samuel Martin ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Waldemar.Rymarkiewicz at tieto.com @ 2012-09-20 6:10 UTC (permalink / raw) To: buildroot Hi Thomas, >> +# libudev has a priority over libusb >> +ifneq ($(BR2_PACKAGE_UDEV),y) >> +PCSC_LITE_CONF_OPT += --disable-libudev >> + >> +ifeq ($(BR2_PACKAGE_LIBUSB),y) >> +PCSC_LITE_CONF_OPT += --enable-libusb >> +PCSC_LITE_DEPENDENCIES += libusb >> +else >> +PCSC_LITE_CONF_OPT += --disable-libusb >> +endif >> + >> +endif > >Can you detail this? I haven't looked at pcsc-lite itself, but this >looks strange. So if it is correct, it anyway needs a more detailed >comment. > >Why when udev is available you don't do need libusb? Also, if udev is >available, you need to add it to the list of dependencies. This is how pcsc-lite ./configure works. Firstly, libudev and libusb can't be used together. That means if you --enable-libusb you have to --disable-libudev (by default is enabled) explicitly. Secondly, ./configure gives priority to libudev to be used if found, otherwise it searches for libusb. Finally, Neither libusb nor libudev can be found then no usb devices are used (serial only). Then --disable-libudev --disable-libusb will still compile. The only concern I have now it that user has to know this dependencies and select libusb or libudev explicitly. So wandering if not to require libusb or libudev in this package. What's your opinion? Thanks, /Waldek ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com @ 2012-09-20 7:36 ` Samuel Martin 2012-09-20 8:01 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 9:27 ` Arnout Vandecappelle 2012-09-20 10:22 ` Thomas Petazzoni 2 siblings, 1 reply; 12+ messages in thread From: Samuel Martin @ 2012-09-20 7:36 UTC (permalink / raw) To: buildroot Hi Waldemar, 2012/9/20 <Waldemar.Rymarkiewicz@tieto.com>: [...] > Firstly, libudev and libusb can't be used together. That means if you --enable-libusb you have to --disable-libudev (by default is enabled) explicitly. > > Secondly, ./configure gives priority to libudev to be used if found, otherwise it searches for libusb. > > Finally, Neither libusb nor libudev can be found then no usb devices are used (serial only). Then --disable-libudev --disable-libusb will still compile. > > The only concern I have now it that user has to know this dependencies and select libusb or libudev explicitly. So wandering if not to require libusb or libudev in this package. What's your opinion? If i don't misunderstand, here, the dependency can be explicitly express as a choice in the menuconfig: choice BR2_PACKAGE_PCSC_LITE_HWLIBS prompt "hardware access/detection" # or whatever more suitable default BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUDEV config BR2_PACKAGE_PCSC_LITE_HWLIBS_NONE bool "none" config BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUSB bool "libusb" select BR2_PACKAGE_LIBUSB config BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUDEV bool "libudev" select BR2_PACKAGE_UDEV endchoice Then, it is easy to know in the *.mk file which support should be enabled. Note: While writing this, I'm also wondering if the dependency on udev may be conditioned by the device management chosen. Regards, -- Sam ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-20 7:36 ` Samuel Martin @ 2012-09-20 8:01 ` Waldemar.Rymarkiewicz at tieto.com 0 siblings, 0 replies; 12+ messages in thread From: Waldemar.Rymarkiewicz at tieto.com @ 2012-09-20 8:01 UTC (permalink / raw) To: buildroot Hi Sam, >choice BR2_PACKAGE_PCSC_LITE_HWLIBS > prompt "hardware access/detection" # or whatever more suitable > default BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUDEV >config BR2_PACKAGE_PCSC_LITE_HWLIBS_NONE > bool "none" >config BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUSB > bool "libusb" > select BR2_PACKAGE_LIBUSB >config BR2_PACKAGE_PCSC_LITE_HWLIBS_LIBUDEV > bool "libudev" > select BR2_PACKAGE_UDEV >endchoice That's the option. Thx. Thanks, /Waldek ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 7:36 ` Samuel Martin @ 2012-09-20 9:27 ` Arnout Vandecappelle 2012-09-20 10:22 ` Thomas Petazzoni 2 siblings, 0 replies; 12+ messages in thread From: Arnout Vandecappelle @ 2012-09-20 9:27 UTC (permalink / raw) To: buildroot On 09/20/12 08:10, Waldemar.Rymarkiewicz at tieto.com wrote: >> >Why when udev is available you don't do need libusb? Also, if udev is >> >available, you need to add it to the list of dependencies. > This is how pcsc-lite ./configure works. > > Firstly, libudev and libusb can't be used together. That means if you --enable-libusb you have to --disable-libudev (by default is enabled) explicitly. > > Secondly, ./configure gives priority to libudev to be used if found, otherwise it searches for libusb. > > Finally, Neither libusb nor libudev can be found then no usb devices are used (serial only). Then --disable-libudev --disable-libusb will still compile. In that case, it should be: if UDEV=y --enable-libudev --disable-libusb DEPS += udev else if LIBUSB=y --enable-libusb --disable-libudev DEPS += libusb else --disable-libusb --disable-libudev endif endif This gives buildroot complete control over the process. We generally want explicit --enable and --disable options, to avoid accidents with forgotten dependencies (they would mean that the compilation result is dependent on the order in which things are compiled, and we want to avoid that at all cost). > The only concern I have now it that user has to know this dependencies and select libusb or libudev explicitly. So wandering if not to require libusb or libudev in this package. What's your opinion? udev _has_ to be selected explicitly - it's consequences are too far-reaching to allow selecting it behind the scenes, IMHO. For libusb, you could add a config option in PCSC to force enabling of libusb. Make that option 'depends on !BR2_PACKAGE_UDEV' because it isn't needed if udev exists. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 7:36 ` Samuel Martin 2012-09-20 9:27 ` Arnout Vandecappelle @ 2012-09-20 10:22 ` Thomas Petazzoni 2 siblings, 0 replies; 12+ messages in thread From: Thomas Petazzoni @ 2012-09-20 10:22 UTC (permalink / raw) To: buildroot Dear Waldemar Rymarkiewicz, On Thu, 20 Sep 2012 09:10:26 +0300, Waldemar.Rymarkiewicz at tieto.com wrote: > >Why when udev is available you don't do need libusb? Also, if udev is > >available, you need to add it to the list of dependencies. > > This is how pcsc-lite ./configure works. > > Firstly, libudev and libusb can't be used together. That means if you --enable-libusb you have to --disable-libudev (by default is enabled) explicitly. > > Secondly, ./configure gives priority to libudev to be used if found, otherwise it searches for libusb. > > Finally, Neither libusb nor libudev can be found then no usb devices are used (serial only). Then --disable-libudev --disable-libusb will still compile. > > The only concern I have now it that user has to know this dependencies and select libusb or libudev explicitly. So wandering if not to require libusb or libudev in this package. What's your opinion? Samuel and Arnout have replied on the ways to make it possible. On my side, I'm still surprised that either udev or libusb are needed. They do really two different things, and I don't see how having udev can replace what libusb is doing, except if libusb is only used for USB device enumeration, and not access to the USB devices themselves. But I haven't looked at the code. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-19 12:52 [Buildroot] [PATCH v2 1/2] pcsc-lite: new package Waldemar Rymarkiewicz 2012-09-19 12:52 ` [Buildroot] [PATCH v2 2/2] ccid: " Waldemar Rymarkiewicz 2012-09-19 14:47 ` [Buildroot] [PATCH v2 1/2] pcsc-lite: " Thomas Petazzoni @ 2012-09-19 20:41 ` Arnout Vandecappelle 2012-09-20 6:12 ` Waldemar.Rymarkiewicz at tieto.com 2 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2012-09-19 20:41 UTC (permalink / raw) To: buildroot On 09/19/12 14:52, Waldemar Rymarkiewicz wrote: [snip] > +config BR2_PACKAGE_PCSC_LITE_DEBUGART _DEBUGATR, not ART > + bool "enable ATR debug messages" > + help > + enable ATR debug messages from pcscd > + > +config BR2_PACKAGE_PCSC_LITE_EMBEDDED > + bool "enable embedded mode" > + help > + limit RAM and CPU ressources by disabling features (log) resources (one s) Regards, Arnout [snip] -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/2] pcsc-lite: new package 2012-09-19 20:41 ` Arnout Vandecappelle @ 2012-09-20 6:12 ` Waldemar.Rymarkiewicz at tieto.com 0 siblings, 0 replies; 12+ messages in thread From: Waldemar.Rymarkiewicz at tieto.com @ 2012-09-20 6:12 UTC (permalink / raw) To: buildroot Hi Arnout, > _DEBUGATR, not ART Right!. Fixed. >> + limit RAM and CPU ressources by disabling features (log) > resources (one s) Fixed as well. Thanks, /Waldek ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-09-20 10:22 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-19 12:52 [Buildroot] [PATCH v2 1/2] pcsc-lite: new package Waldemar Rymarkiewicz 2012-09-19 12:52 ` [Buildroot] [PATCH v2 2/2] ccid: " Waldemar Rymarkiewicz 2012-09-19 20:56 ` Arnout Vandecappelle 2012-09-20 6:31 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-19 14:47 ` [Buildroot] [PATCH v2 1/2] pcsc-lite: " Thomas Petazzoni 2012-09-20 6:10 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 7:36 ` Samuel Martin 2012-09-20 8:01 ` Waldemar.Rymarkiewicz at tieto.com 2012-09-20 9:27 ` Arnout Vandecappelle 2012-09-20 10:22 ` Thomas Petazzoni 2012-09-19 20:41 ` Arnout Vandecappelle 2012-09-20 6:12 ` Waldemar.Rymarkiewicz at tieto.com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox