分类: LINUX
2009-12-08 17:42:49
1.下载源码:
1)wget ;
2)wget .
2.解压:
1)tar xvf usbutils-0.86.tar.gz
2)tar xvf libusb-0.1.10.tar.gz
3.设环境变量:
export PATH=/usr/local/arm-mcs/gcc-4.2.1-glibc-2.6.1/arm-linux/bin/:$PATH
4.编译:
cd libusb-0.1.10
./configure CC=arm-linux --prefix="$PWD/../_install" --host=arm-linux
make install
cd ..
cd usbutils-0.86
./configure CC=arm-linux-gcc --host=arm-linux \
LIBUSB_CFLAGS="$PWD/../_install/include/" \
LIBUSB_LIBS="$PWD/../_install/lib/libusb.so" \
CPPFLAGS=-I"$PWD/../_install/include/" \
CFLAGS="-O2"
make
END:要用的lsusb就出来了。