Ubuntu pcscd libusb ccid arm-linux编译方法

1、版本

pcsc:pcsc-lite-1.6.0

libusb:libusb-0.1.12

ccid:ccid-1.3.12

硬件环境是友坚恒天的idea6410开发板,软件环境是linux-2.6.24

2、编译:

a、libusb:

./configure --host=arm-linux --prefix=/usr/ccid/ CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc CXX=/usr/local/arm/3.4.1/bin/arm-linux-g++

make

sudo make install

b、pcsc:

./configure --host=arm-linux --prefix=/usr/ccid/ CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc CXX=/usr/local/arm/3.4.1/bin/arm-linux-g++ --enable-libusb LIBUSB_LIBS="-L/usr/ccid/lib -lusb" LIBUSB_CFLAGS="-I/usr/ccid/include" --disable-libhal --enable-static

make

sudo make install

c、ccid:

./configure --host=arm-linux --prefix=/usr/ccid/ CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc CXX=/usr/local/arm/3.4.1/bin/arm-linux-g++ --enable-libusb LIBUSB_LIBS="-L/usr/ccid/lib -lusb" LIBUSB_CFLAGS="-I/usr/ccid/include" PCSC_CFLAGS="-I/usr/ccid/include/PCSC/" PCSC_LIBS=/usr/ccid/lib/libpcsclite.so --enable-usbdropdir="/usr/ccid/pcsc/drivers/"

make

sudo make install

3、运行

将编译好的/usr/ccid拷贝到目标板文件系统的/usr目录下,然后设置环境:

mount -t usbfs none /proc/bus/usb

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/ccid/lib
export LD_LIBRARY_PATH

./usr/ccid/sbin/pcscd &
下载运行。