BlueZ移植

C库:libuClibc-0.9.30
工具链:$(CROSS)
移植的软件版本:bluez-libs-3.36  bluez-utils-3.36  dbus-1.3.0 libxml2-2.6.32 libusb-0.1.12 glib-2.16.5 libiconv-1.12
依赖关系:
                                                          blueZ-libs--\
                         libxml2->dbus--\                         》BlueZ
                            libusb----------》blueZ-utils-/
   iconv->glib(裁剪后可不用)----/
1.blueZ-libs编译:
./configure --prefix=/nfs/blueZ_root --host=$(CROSS)
make;make install
2.libxml2编译:
./configure --prefix=/nfs/blueZ_root --host=$(CROSS)
make;make install
3.dbus编译:
./configure --prefix=/nfs/blueZ_root --host=$(CROSS) --disable-inotify --disable-test --with-xml=libxml --enable-dnotify --with-x=no CFLAGS="-L/nfs/blueZ_root/lib -I/nfs/blueZ_root/include"
注意要修改config.h中的全局定义
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS: unix:path=/var/run/dbus/system_bus_socket
DBUS_SYSTEM_SOCKET:/var/run/dbus/system_bus_socket
4.libusb编译:
./configure --prefix=/nfs/blueZ_root --host=$(CROSS) --disable-debug
make;make install
5.iconv编译(裁剪后可以不编译):
./configure --prefix=/nfs/blueZ_root --host=$(CROSS)
6.glib编译(裁剪后可不编译):
echo ac_cv_type_long_long=yes>$(CROSS).cache
echo glib_cv_stack_grows=no>>$(CROSS).cache
echo glib_cv_uscore=no>>$(CROSS).cache
echo c_cv_func_posix_getpwuid_r=yes>>$(CROSS).cache
echo ac_cv_func_posix_getgrgid_r=yes>>$(CROSS).cache
echo ac_cv_func_posix_getpwuid_r=yes>>$(CROSS).cache
./configure --prefix=/nfs/blueZ_root --host=$(CROSS)  CFLAGS="-I/nfs/blueZ_root/include -L/nfs/blueZ_root/lib" --cache-file=$(CROSS).cache --disable-debug
7.blueZ-utils编译:
export  PKG_CONFIG_PATH="/nfs/blueZ_root/lib/pkgconfig"
./configure --prefix=/nfs/blueZ_root --host=$(CROSS)  CFLAGS="-I/nfs/blueZ_root/include -L/nfs/blueZ_root/lib" --disable-glib --enable-usb --enable-hidd --enable-initscripts --enable-hid2hci --disable-audio --disable-alsa --disable-gstreamer
修改config.h中的全局定义:                                                                                                                                        
CONFIGDIR "/etc/bluetooth"
SERVICEDIR "/usr/local/lib/bluetooth"
STORAGEDIR "/var/lib/bluetooth"
make; make install

 

你可能感兴趣的:(c,socket,unix,System,Path,工具)