recipes-connectivity: Splited bluez and btfilter support in two different init scripts

btfilter (abtfilt) and bluetoothd are two independent services. Break the
relationship between them and split the support in independent init scripts

https://jira.digi.com/browse/DEL-1933

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
Isaac Hermida 2015-11-10 13:41:47 +01:00
parent 599627f214
commit 2767f5be7c
3 changed files with 40 additions and 5 deletions

View File

@ -86,10 +86,6 @@ bt_init() {
echo "${SCRIPTNAME}: FAILED (hciattach)"
exit
fi
if ! abtfilt -b -x -s -w wlan0 1>/dev/null; then
echo "${SCRIPTNAME}: FAILED (abtfilt)"
exit
fi
if hciconfig hci0 up; then
: # No-op
else

View File

@ -0,0 +1,33 @@
#!/bin/sh
#===============================================================================
#
# btfilter
#
# Copyright (C) 2015 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
#
# !Description: Configure Bluetooth
#
#===============================================================================
set -e
if [ "${1}" != "start" ]; then
exit 0
fi
SCRIPTNAME="$(basename "${0}")"
# Check if this hardware does support Bluetooth
if [ -d "/proc/device-tree/bluetooth" ]; then
echo "Starting btfilter service."
if ! abtfilt -b -x -s -w wlan0 1>/dev/null; then
echo "${SCRIPTNAME}: FAILED (abtfilt)"
exit
fi
fi

View File

@ -6,6 +6,7 @@ LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=14;md5=8f6614b37751445a5f6a9bdc69be26b3"
inherit bluetooth
inherit update-rc.d
DEPENDS = "${BLUEZ} dbus libnl"
@ -15,6 +16,7 @@ SRC_URI = " \
file://0002-cross-compile.patch \
file://0003-abtfilt_wan-Rewrite-the-netlink-listener.patch \
file://0004-add-fgnu89-flag-for-gcc5.patch \
file://btfilter-init \
"
SRC_URI[md5sum] = "06a26d3a368c33b508d660ea84d476ee"
@ -23,6 +25,10 @@ SRC_URI[sha256sum] = "b1af73003b622189b66d51911d429d6d205ac9227ec8278c8572ca0c68
EXTRA_OEMAKE = "INCLUDES=-I${STAGING_INCDIR}/bluetooth"
do_install() {
install -d ${D}${bindir}
install -d ${D}${bindir} ${D}${sysconfdir}/init.d/
install -m 0755 abtfilt ${D}${bindir}
install -m 0755 ${WORKDIR}/btfilter-init ${D}${sysconfdir}/init.d/btfilter
}
INITSCRIPT_NAME = "btfilter"
INITSCRIPT_PARAMS = "start 11 5 ."