Andrew Huang 转载请注明作者和联络方式
一 内核修改
------------------------------------------------------------
将内核的蓝牙做成模块形式。
并配置如下,
Bluetooth subsystem support ---> L2CAP protocol support SCO links support RFCOMM protocol support [*] RFCOMM TTY support < > BNEP protocol support HIDP protocol support (NEW) Bluetooth device drivers --->
HCI USB driver |
用make modules编译模块。
编译成功后,与bluetooth相关的模块有如下.
drivers/bluetooth/btusb.ko
net/bluetooth/bluetooth.ko
net/bluetooth/hidp/hidp.ko
net/bluetooth/l2cap.ko
net/bluetooth/rfcomm/rfcomm.ko
net/bluetooth/sco.ko
二.嵌入式蓝牙工具
-------------------------------------------------------------------------------
2.1 bluez-libs 移植
tar xvzf bluez-utils-3.36.tar.gz
cd bluez-utils-3.36
./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
make
make install
bluez-utils 需要依赖几种库dbus(它需要expat)
2.1 expat 库移植
tar xvzf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
make
make install
2.2 dbus库移植
用最新的dbus-1.4.0.tar.gz,在头文件上会产生多不同头文件,似乎与bluez-utils的工具配合很差,为了保险,使用dbus-1.2.16来移植
tar xvzf dbus-1.2.16.tar.gz
cd dbus-1.2.16
./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux -
-with-x=no --with-xml CPPFLAGS="-I$PWD/../../output/arm-
linux/include" LDFLAGS="-L$PWD/../../output/arm-linux/lib -lexpat"
make
make install
把 dbus-arch-deps.h拷贝到发布目录里
cp ../../output/arm-linux/lib/dbus-1.0/include/dbus/* ../../output/arm-linux/include/dbus-1.0/dbus
2.3 glib库移植
tar xvjf glib-2.22.0.tar.bz2
2.2 bluez-utils 移植
tar xvzf bluez-utils-3.36.tar.gz
cd bluez-utils-3.36
./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux DBUS_CFLAGS="-I$PWD/../../output/arm-linux/include/dbus-1.0 -I$PWD/../../output/arm-linux/include/" DBUS_LIBS="-L$PWD/../../output/arm-linux/lib -ldbus-1" --disable-glib BLUEZ_CFLAGS="-I$PWD/../../output/arm-linux/include" BLUEZ_LIBS="-L$PWD/../../output/arm-linux/lib -lbluetooth" --enable-alsa=no
make
make install
阅读(3747) | 评论(0) | 转发(1) |