Disable btwilink by default on m3ulcb 63/19063/3
authorScott Murray <scott.murray@konsulko.com>
Tue, 18 Dec 2018 21:22:10 +0000 (16:22 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 20 Dec 2018 21:10:18 +0000 (21:10 +0000)
Testing for CES has found the wilink BT on the M3+Kingfisher somewhat
unreliable.  To disable it by default for now, add a demo platform
configuration hook to packagegroup-agl-demo-platform and use it to
pick up a modprobe configuration file to prevent btwilink from loading.
This addition is specific to the m3ulcb platform, and the variable
DEMO_ENABLE_BTWILINK can be used to over-ride the behavior by setting
it to "true" in local.conf or site.conf.

Change-Id: Ia645d9329594547f83601526e3f3fd5da5845b24
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb [new file with mode: 0644]
recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf [new file with mode: 0644]
recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb

diff --git a/recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb b/recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb
new file mode 100644 (file)
index 0000000..9170a84
--- /dev/null
@@ -0,0 +1,14 @@
+SUMMARY = "btwilink module disabling modprobe configuration"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://btwilink-disable.conf"
+
+COMPATIBLE_MACHINE = "m3ulcb"
+
+do_compile[noexec] = "1"
+
+do_install() {
+    install -d ${D}${sysconfdir}/modprobe.d
+    install -m 0644 ${WORKDIR}/btwilink-disable.conf ${D}${sysconfdir}/modprobe.d
+}
diff --git a/recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf b/recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf
new file mode 100644 (file)
index 0000000..8d28f62
--- /dev/null
@@ -0,0 +1 @@
+install btwilink /bin/false
index 40e4d3c..d7dddb7 100755 (executable)
@@ -65,6 +65,13 @@ MAPVIEWER = "${@bb.utils.contains("DISTRO_FEATURES", "agl-cluster-demo-support",
 DEMO_MAPS_LOCALE ?= "uk"
 DEMO_PRELOAD = "${@bb.utils.contains("DISTRO_FEATURES", "agl-demo-preload", " navigation-maps-${DEMO_MAPS_LOCALE} poiapp-api-key", "",d)}"
 
+# Hook for demo platform configuration
+# ATM, only used to disable btwilink module on M3ULCB + Kingfisher by default,
+# setting DEMO_ENABLE_BTWILINK to "true" in local.conf / site.conf re-enables.
+DEMO_ENABLE_BTWILINK ?= ""
+DEMO_PLATFORM_CONF = ""
+DEMO_PLATFORM_CONF_append_m3ulcb = "${@bb.utils.contains("DEMO_ENABLE_BTWILINK", "true", "", " btwilink-disable-conf", d)}"
+
 RDEPENDS_${PN}_append = " \
     qtquickcontrols2-agl \
     qtquickcontrols2-agl-style \
@@ -75,6 +82,5 @@ RDEPENDS_${PN}_append = " \
     ${QTAGLEXTRAS} \
     ${MAPVIEWER} \
     ${DEMO_PRELOAD} \
+    ${DEMO_PLATFORM_CONF} \
     "
-
-