全部博文(92)
分类: 嵌入式
2010-05-19 17:06:37
Bluez移植_ 内核及根文件系统配置
USB蓝牙内核配置:
[*] Networking support à
<*> Bluetooth subsystem support à
<*> L2CAP protocol supportà
<*> SCO supportà
<*> RFCOMM protocol supportà
<*> RFCOMM TTY protocol supportà
<*> BNEP protocol supportà
<*> Multican filter supportà
<*> Protocol filter supportà
<*> HIDP protocol supportà
Bluetooth device drivers à
<*>HCI USB driver
根文件系统配置:
通过NFS将bluez-utils-3.36生成的bin和sbin下载到开发板/usr/sbin中:
[root@TX2440A sbin]# cp -a /mnt/opt/libs/sbin/* .
[root@TX2440A sbin]# cp -a /mnt/opt/libs/bin/* .
通过NFS将bluez-libs-3.36生成的lib下载到开发板/usr/lib中:
[root@TX2440A lib]# cp /mnt/opt/libs/lib/lib* .
在/etc/init.d/目录下编写蓝牙脚本文件bluetooth:
#!/bin/sh
# bluetooth Bluetooth subsystem starting and stopping
# chkconfig: - 25 90
# description: Bluetooth subsystem
# Source function library.
#. /etc/rc.d/init.d/functions
# Source Bluetooth configuration.
#. /etc/sysconfig/bluetooth
prog="Bluetooth"
bluezbin="usr/sbin"
UART_CONF="/etc/bluetooth/uart"
USB_CONF="/etc/bluetooth/usb"
start()
{
echo -n $"Starting $prog: "
$bluezbin/hcid
if [ -x $bluezbin/sdpd ]; then
$bluezbin/sdpd
fi
if [ -x $bluezbin/hciconfig ]; then
$bluezbin/hciconfig hci0 up
echo "hciconfig up"
fi
if [ -x $bluezbin/hcitool ]; then
$bluezbin/hcitool dev
fi
echo -n "start ok!"
}
stop()
{
echo -n $"Shutting down $prog: "
killproc hcid
if [ -x $bluezbin/sdpd ]; then
killproc sdpd
fi
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0