summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-core/recipes-connectivity/connman/connman
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-profile-core/recipes-connectivity/connman/connman')
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch362
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch29
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch35
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch85
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/connman83
-rw-r--r--meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch27
6 files changed, 621 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch
new file mode 100644
index 000000000..f344fea10
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch
@@ -0,0 +1,362 @@
+From 181ff3439783c6920f5211730672685a210c318f Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 8 Oct 2018 22:12:56 +0200
+Subject: [PATCH] Fix various issues which cause problems under musl
+
+Instead of using #define _GNU_SOURCE in some source files which causes
+problems when building with musl as more files need the define, simply
+use AC_USE_SYSTEM_EXTENSIONS in configure.ac to get it defined globally.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Backport [bd1326ba7d68df38c5ccaafd2403a5fb30bd452b]
+---
+ configure.ac | 3 +++
+ gdhcp/client.c | 1 -
+ gdhcp/common.h | 5 +++--
+ gweb/gresolv.c | 1 +
+ plugins/tist.c | 1 -
+ plugins/wifi.c | 3 +--
+ src/backtrace.c | 1 -
+ src/inet.c | 1 -
+ src/ippool.c | 1 -
+ src/iptables.c | 2 +-
+ src/log.c | 1 -
+ src/ntp.c | 1 -
+ src/resolver.c | 1 -
+ src/rfkill.c | 1 -
+ src/stats.c | 1 -
+ src/tethering.c | 2 --
+ src/timezone.c | 1 -
+ tools/dhcp-test.c | 1 -
+ tools/dnsproxy-test.c | 1 +
+ tools/private-network-test.c | 2 +-
+ tools/stats-tool.c | 1 -
+ tools/tap-test.c | 3 +--
+ tools/wispr.c | 1 -
+ vpn/plugins/vpn.c | 1 -
+ 24 files changed, 12 insertions(+), 25 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 39745f76..984126c2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir)
+ AC_SUBST(abs_top_builddir)
+
+ AC_LANG_C
++AC_USE_SYSTEM_EXTENSIONS
+
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+@@ -185,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+ AC_CHECK_HEADERS([execinfo.h])
+ AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"])
+
++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
++
+ AC_CHECK_FUNC(signalfd, dummy=yes,
+ AC_MSG_ERROR(signalfd support is required))
+
+diff --git a/gdhcp/client.c b/gdhcp/client.c
+index 67357782..c7db76f0 100644
+--- a/gdhcp/client.c
++++ b/gdhcp/client.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+diff --git a/gdhcp/common.h b/gdhcp/common.h
+index 75abc183..6899499e 100644
+--- a/gdhcp/common.h
++++ b/gdhcp/common.h
+@@ -19,6 +19,7 @@
+ *
+ */
+
++#include <config.h>
+ #include <netinet/udp.h>
+ #include <netinet/ip.h>
+
+@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = {
+ [OPTION_U32] = 4,
+ };
+
+-/* already defined within netinet/in.h if using GNU compiler */
+-#ifndef __USE_GNU
++/* already defined within netinet/in.h if using glibc or musl */
++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
+ struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv interface index */
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 81c79b6c..b06f8932 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -29,6 +29,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <resolv.h>
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+diff --git a/plugins/tist.c b/plugins/tist.c
+index ad5ef79e..cc2800a1 100644
+--- a/plugins/tist.c
++++ b/plugins/tist.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdbool.h>
+ #include <stdlib.h>
+diff --git a/plugins/wifi.c b/plugins/wifi.c
+index dc08c6af..46e4cca4 100644
+--- a/plugins/wifi.c
++++ b/plugins/wifi.c
+@@ -30,9 +30,8 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+-#include <linux/wireless.h>
+ #include <net/ethernet.h>
++#include <linux/wireless.h>
+
+ #ifndef IFF_LOWER_UP
+ #define IFF_LOWER_UP 0x10000
+diff --git a/src/backtrace.c b/src/backtrace.c
+index e8d7f432..bede6698 100644
+--- a/src/backtrace.c
++++ b/src/backtrace.c
+@@ -24,7 +24,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+diff --git a/src/inet.c b/src/inet.c
+index a31372b5..a58ce7c1 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -25,7 +25,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+diff --git a/src/ippool.c b/src/ippool.c
+index cea1dccd..8a645da2 100644
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -28,7 +28,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
+ #include <sys/socket.h>
+
+ #include "connman.h"
+diff --git a/src/iptables.c b/src/iptables.c
+index f3670e77..469effed 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+ #include <xtables.h>
+ #include <inttypes.h>
+diff --git a/src/log.c b/src/log.c
+index 9bae4a3d..f7e82e5d 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+diff --git a/src/ntp.c b/src/ntp.c
+index 51ba9aac..724ca188 100644
+--- a/src/ntp.c
++++ b/src/ntp.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+diff --git a/src/resolver.c b/src/resolver.c
+index 76f0a8e1..10121aa5 100644
+--- a/src/resolver.c
++++ b/src/resolver.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/rfkill.c b/src/rfkill.c
+index d9bed4d2..b2514c41 100644
+--- a/src/rfkill.c
++++ b/src/rfkill.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/stats.c b/src/stats.c
+index 663bc382..c9ddc2e8 100644
+--- a/src/stats.c
++++ b/src/stats.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <sys/mman.h>
+ #include <sys/types.h>
+diff --git a/src/tethering.c b/src/tethering.c
+index 4b202369..f3cb36f4 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -34,8 +34,6 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+-#include <linux/sockios.h>
+-#include <linux/if_tun.h>
+ #include <linux/if_bridge.h>
+
+ #include "connman.h"
+diff --git a/src/timezone.c b/src/timezone.c
+index e346b11a..8e912670 100644
+--- a/src/timezone.c
++++ b/src/timezone.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
+index c34e10a8..eae66fc2 100644
+--- a/tools/dhcp-test.c
++++ b/tools/dhcp-test.c
+@@ -33,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <net/route.h>
+ #include <net/ethernet.h>
+-#include <linux/if_arp.h>
+
+ #include <gdhcp/gdhcp.h>
+
+diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
+index 551cae91..371e2e23 100644
+--- a/tools/dnsproxy-test.c
++++ b/tools/dnsproxy-test.c
+@@ -24,6 +24,7 @@
+ #endif
+
+ #include <errno.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+diff --git a/tools/private-network-test.c b/tools/private-network-test.c
+index 3dd115ba..2828bb30 100644
+--- a/tools/private-network-test.c
++++ b/tools/private-network-test.c
+@@ -32,7 +32,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/signalfd.h>
+ #include <unistd.h>
+
+diff --git a/tools/stats-tool.c b/tools/stats-tool.c
+index efa39de2..5695048f 100644
+--- a/tools/stats-tool.c
++++ b/tools/stats-tool.c
+@@ -22,7 +22,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <sys/mman.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff --git a/tools/tap-test.c b/tools/tap-test.c
+index fdc098aa..cb3ee622 100644
+--- a/tools/tap-test.c
++++ b/tools/tap-test.c
+@@ -23,13 +23,12 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+
+ #include <netinet/in.h>
+diff --git a/tools/wispr.c b/tools/wispr.c
+index d5f9341f..e56dfc16 100644
+--- a/tools/wispr.c
++++ b/tools/wispr.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
+index 10548aaf..6e3f640c 100644
+--- a/vpn/plugins/vpn.c
++++ b/vpn/plugins/vpn.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <string.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--
+2.17.1
+
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch
new file mode 100644
index 000000000..8e2e0bd02
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch
@@ -0,0 +1,29 @@
+From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Mon, 12 Jun 2017 16:52:39 +0300
+Subject: [PATCH] connman.service: stop systemd-resolved when we use connman
+
+Stop systemd-resolved service when we use connman as network manager.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/connman.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/connman.service.in b/src/connman.service.in
+index 9f5c10f..dab48bc 100644
+--- a/src/connman.service.in
++++ b/src/connman.service.in
+@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman
+ After=dbus.service network-pre.target systemd-sysusers.service
+ Before=network.target multi-user.target shutdown.target
+ Wants=network.target
++Conflicts=systemd-resolved.service
+
+ [Service]
+ Type=dbus
+--
+2.4.0
+
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch
new file mode 100644
index 000000000..e6f03e632
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch
@@ -0,0 +1,35 @@
+From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 7 Apr 2012 18:52:12 -0700
+Subject: [PATCH] plugin.h: Change visibility to default for debug symbols
+
+gold refuses to link in undefined weak symbols which
+have hidden visibility
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+Upstream-Status: Pending
+---
+ include/plugin.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/plugin.h b/include/plugin.h
+index 692a4e5..a9361c3 100644
+--- a/include/plugin.h
++++ b/include/plugin.h
+@@ -89,9 +89,9 @@ struct connman_plugin_desc {
+ #else
+ #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
+ extern struct connman_debug_desc __start___debug[] \
+- __attribute__ ((weak, visibility("hidden"))); \
++ __attribute__ ((weak, visibility("default"))); \
+ extern struct connman_debug_desc __stop___debug[] \
+- __attribute__ ((weak, visibility("hidden"))); \
++ __attribute__ ((weak, visibility("default"))); \
+ extern struct connman_plugin_desc connman_plugin_desc \
+ __attribute__ ((visibility("default"))); \
+ struct connman_plugin_desc connman_plugin_desc = { \
+--
+1.7.5.4
+
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
new file mode 100644
index 000000000..639ccfa2a
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
@@ -0,0 +1,85 @@
+From 10b0d16d04b811b1ccd1f9b0cfe757bce8d876a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:02:21 -0700
+Subject: [PATCH 2/3] resolve: musl does not implement res_ninit
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gweb/gresolv.c | 33 ++++++++++++---------------------
+ 1 file changed, 12 insertions(+), 21 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 5cf7a9a..3ad8e70 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -36,6 +36,7 @@
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+ #include <net/if.h>
++#include <ctype.h>
+
+ #include "gresolv.h"
+
+@@ -875,8 +875,6 @@ GResolv *g_resolv_new(int index)
+ resolv->index = index;
+ resolv->nameserver_list = NULL;
+
+- res_ninit(&resolv->res);
+-
+ return resolv;
+ }
+
+@@ -916,8 +914,6 @@ void g_resolv_unref(GResolv *resolv)
+
+ flush_nameservers(resolv);
+
+- res_nclose(&resolv->res);
+-
+ g_free(resolv);
+ }
+
+@@ -1020,24 +1016,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
+ debug(resolv, "hostname %s", hostname);
+
+ if (!resolv->nameserver_list) {
+- int i;
+-
+- for (i = 0; i < resolv->res.nscount; i++) {
+- char buf[100];
+- int family = resolv->res.nsaddr_list[i].sin_family;
+- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
+-
+- if (family != AF_INET &&
+- resolv->res._u._ext.nsaddrs[i]) {
+- family = AF_INET6;
+- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
++ FILE *f = fopen("/etc/resolv.conf", "r");
++ if (f) {
++ char line[256], *s;
++ int i;
++ while (fgets(line, sizeof(line), f)) {
++ if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
++ continue;
++ for (s = &line[11]; isspace(s[0]); s++);
++ for (i = 0; s[i] && !isspace(s[i]); i++);
++ s[i] = 0;
++ g_resolv_add_nameserver(resolv, s, 53, 0);
+ }
+-
+- if (family != AF_INET && family != AF_INET6)
+- continue;
+-
+- if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
+- g_resolv_add_nameserver(resolv, buf, 53, 0);
++ fclose(f);
+ }
+
+ if (!resolv->nameserver_list)
+--
+2.5.1
+
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/connman b/meta-agl-profile-core/recipes-connectivity/connman/connman/connman
new file mode 100644
index 000000000..c64fa0d71
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/connman
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+DAEMON=/usr/sbin/connmand
+PIDFILE=/var/run/connmand.pid
+DESC="Connection Manager"
+
+if [ -f /etc/default/connman ] ; then
+ . /etc/default/connman
+fi
+
+set -e
+
+nfsroot=0
+
+exec 9<&0 < /proc/mounts
+while read dev mtpt fstype rest; do
+ if test $mtpt = "/" ; then
+ case $fstype in
+ nfs | nfs4)
+ nfsroot=1
+ break
+ ;;
+ *)
+ ;;
+ esac
+ fi
+done
+
+do_start() {
+ EXTRA_PARAM=""
+ if test $nfsroot -eq 1 ; then
+ NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'`
+ NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'`
+
+ if [ ! -z "$NET_ADDR" ]; then
+ if [ "$NET_ADDR" = dhcp ]; then
+ ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
+ if [ ! -z "$ethn" ]; then
+ EXTRA_PARAM="-I $ethn"
+ fi
+ else
+ for i in $NET_DEVS; do
+ ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'`
+ if [ "$NET_ADDR" = "$ADDR" ]; then
+ EXTRA_PARAM="-I $i"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if [ -f @DATADIR@/connman/wired-setup ] ; then
+ . @DATADIR@/connman/wired-setup
+ fi
+ $DAEMON $EXTRA_PARAM
+}
+
+do_stop() {
+ start-stop-daemon --stop --name connmand --quiet
+}
+
+case "$1" in
+ start)
+ echo "Starting $DESC"
+ do_start
+ ;;
+ stop)
+ echo "Stopping $DESC"
+ do_stop
+ ;;
+ restart|force-reload)
+ echo "Restarting $DESC"
+ do_stop
+ sleep 1
+ do_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch b/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch
new file mode 100644
index 000000000..e96e38bcf
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch
@@ -0,0 +1,27 @@
+With binutils 2.27 on at least MIPS, connmand will crash on startup. This
+appears to be due to the symbol visibilty scripts hiding symbols that stdio
+looks up at runtime, resulting in it segfaulting.
+
+This certainly appears to be a bug in binutils 2.27 although the problem has
+been known about for some time:
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=17908
+
+As the version scripts are only used to hide symbols from plugins we can safely
+remove the scripts to work around the problem until binutils is fixed.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index d70725c..76ae432 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
+-src_connmand_LDFLAGS = -Wl,--export-dynamic \
+- -Wl,--version-script=$(srcdir)/src/connman.ver
++src_connmand_LDFLAGS = -Wl,--export-dynamic
+@@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
+-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
+- -Wl,--version-script=$(srcdir)/vpn/vpn.ver
++vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic