summaryrefslogtreecommitdiff
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadopenembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.bz2
openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.xz
openembedded-core-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.zip
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch84
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch10
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch20
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp3.inc53
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp4.inc57
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb7
-rw-r--r--meta/recipes-connectivity/dhcp/files/default-relay12
-rw-r--r--meta/recipes-connectivity/dhcp/files/default-server7
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhclient.conf50
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcpd.conf108
-rw-r--r--meta/recipes-connectivity/dhcp/files/init-relay44
-rw-r--r--meta/recipes-connectivity/dhcp/files/init-server44
-rw-r--r--meta/recipes-connectivity/farsight/farsight2_0.0.9.bb24
-rw-r--r--meta/recipes-connectivity/farsight/libnice_0.0.6.bb23
-rw-r--r--meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch710
-rw-r--r--meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch74
-rw-r--r--meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch77
-rw-r--r--meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch176
-rw-r--r--meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch130
-rw-r--r--meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch70
-rw-r--r--meta/recipes-connectivity/gsm/files/025_sms-status-report.patch133
-rw-r--r--meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch423
-rw-r--r--meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch264
-rw-r--r--meta/recipes-connectivity/gsm/files/default59
-rw-r--r--meta/recipes-connectivity/gsm/files/fix_machine_init.patch23
-rw-r--r--meta/recipes-connectivity/gsm/files/gsmd47
-rw-r--r--meta/recipes-connectivity/gsm/files/install-ts-headers.patch11
-rw-r--r--meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch11
-rw-r--r--meta/recipes-connectivity/gsm/gsmd.inc93
-rw-r--r--meta/recipes-connectivity/gsm/libgsmd_svn.bb5
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch61
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2.inc27
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb6
-rw-r--r--meta/recipes-connectivity/libetpan/files/cxx-is-here.patch18
-rw-r--r--meta/recipes-connectivity/libetpan/libetpan_0.54.bb19
-rw-r--r--meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch11
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb36
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch165
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch22
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc24
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb17
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb22
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown26
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet16
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb13
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch18
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver161
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb51
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch24
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch20
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch54
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch47
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch32
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff760
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch301
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch34
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch14
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch33
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch60
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series20
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch14
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch12
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch33
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch48
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc100
-rw-r--r--meta/recipes-connectivity/openssl/openssl_0.9.8o.bb28
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch13
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch26
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch377
-rw-r--r--meta/recipes-connectivity/openswan/openswan_2.4.7.bb36
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch18
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch17
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch16
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch23
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb7
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb1
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb1
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb3
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch13
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb7
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb3
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc9
-rw-r--r--meta/recipes-connectivity/opensync/libopensync_0.37.bb25
-rw-r--r--meta/recipes-connectivity/opensync/libsync_svn.bb19
-rw-r--r--meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch19
-rw-r--r--meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb17
-rw-r--r--meta/recipes-connectivity/opensync/msynctool_0.37.bb7
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch44
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch28
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc31
-rwxr-xr-xmeta/recipes-connectivity/portmap/portmap/portmap.init59
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb20
-rw-r--r--meta/recipes-connectivity/ppp-dialin/files/host-peer11
-rw-r--r--meta/recipes-connectivity/ppp-dialin/files/ppp-dialin3
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb35
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns12
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns5
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch290
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch13
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/init50
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/ip-down43
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/ip-up44
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch93
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/poff26
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/pon9
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch43
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.5.bb77
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb30
-rw-r--r--meta/recipes-connectivity/wbxml/files/no-doc-install.patch15
-rw-r--r--meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb20
120 files changed, 7010 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
new file mode 100644
index 000000000..579d72f48
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
@@ -0,0 +1,84 @@
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -57,6 +57,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -69,6 +69,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
new file mode 100644
index 000000000..f6a7be1d8
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
@@ -0,0 +1,21 @@
+CLIENT_PATH is the only environment when executing dhclient-script,
+without this patch, dhclient-script won't run properly because it
+invokes ifconfig and route
+
+7/28/2010 - qhe
+
+diff -ru dhcp-4.1.1-P1.orig//client/Makefile.am dhcp-4.1.1-P1/client/Makefile.am
+--- dhcp-4.1.1-P1.orig//client/Makefile.am 2010-07-29 13:20:05.000000000 +0800
++++ dhcp-4.1.1-P1/client/Makefile.am 2010-07-29 13:28:14.000000000 +0800
+@@ -10,9 +10,9 @@
+ EXTRA_DIST = $(man_MANS)
+
+ dhclient.o: dhclient.c
+- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
++ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
+ -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
+
+ dhc6.o: dhc6.c
+- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
++ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
+ -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch
new file mode 100644
index 000000000..91d99cce2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch
@@ -0,0 +1,10 @@
+--- dhcp-3.0.2/common/tr.c~compile 2005-10-13 14:23:37.000000000 +0200
++++ dhcp-3.0.2/common/tr.c 2005-10-13 14:23:45.000000000 +0200
+@@ -39,6 +39,7 @@
+ #include "includes/netinet/udp.h"
+ #include "includes/netinet/if_ether.h"
+ #include "netinet/if_tr.h"
++#include <asm/types.h>
+ #include <sys/time.h>
+
+ /*
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch
new file mode 100644
index 000000000..5c766d6c0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch
@@ -0,0 +1,20 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- dhcp-3.0.1/includes/dhcpd.h~compile
++++ dhcp-3.0.1/includes/dhcpd.h
+@@ -306,9 +306,9 @@
+ # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
+ UNICAST_BROADCAST_HACK)
+
+- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
+- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
+- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
++ binding_state_t binding_state;
++ binding_state_t next_binding_state;
++ binding_state_t desired_binding_state;
+
+ struct lease_state *state;
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h
new file mode 100644
index 000000000..2289554ef
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h
@@ -0,0 +1,21 @@
+/*
+ * define config file location in ${S}/includes/site.h
+ * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
+ *
+ * 7/22/2010 - qhe
+ */
+
+/* Define this if you want DNS update functionality to be available. */
+
+#define NSUPDATE
+
+/* Define this if you aren't debugging and you want to save memory
+ (potentially a _lot_ of memory) by allocating leases in chunks rather
+ than one at a time. */
+
+#define COMPACT_LEASES
+
+
+/* local */
+#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
+#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp3.inc b/meta/recipes-connectivity/dhcp/dhcp3.inc
new file mode 100644
index 000000000..3f68f452d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp3.inc
@@ -0,0 +1,53 @@
+SECTION = "console/network"
+DESCRIPTION = "Internet Software Consortium DHCP package"
+HOMEPAGE = "http://www.isc.org/"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
+
+SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
+ file://init-relay file://default-relay \
+ file://init-server file://default-server \
+ file://dhclient.conf file://dhcpd.conf"
+
+inherit autotools
+
+TARGET_CFLAGS += "-D_GNU_SOURCE"
+
+do_compile() {
+ make RANLIB=${RANLIB} PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
+ -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\" \
+ -D_PATH_DHCLIENT_SCRIPT=\"/sbin/dhclient-script\" \
+ -D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
+ -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
+}
+
+do_install() {
+ make -e DESTDIR=${D} USRMANDIR=${mandir}/man1 ADMMANDIR=${mandir}/man8 FFMANDIR=${mandir}/man5 LIBMANDIR=${mandir}/man3 LIBDIR=${libdir} INCDIR=${includedir} install
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/dhcp
+ install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
+ install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
+ install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
+ install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
+ install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
+ install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
+ install -d ${D}${base_sbindir}/
+ mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
+ install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+}
+
+PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
+FILES_${PN} = ""
+FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
+FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
+
+FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
+RDEPENDS_dhcp-client = "bash"
+
+FILES_dhcp-omshell = "${bindir}/omshell"
+
+CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
+CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
+CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp4.inc b/meta/recipes-connectivity/dhcp/dhcp4.inc
new file mode 100644
index 000000000..7652b948f
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp4.inc
@@ -0,0 +1,57 @@
+SECTION = "console/network"
+DESCRIPTION = "Internet Software Consortium DHCP package"
+HOMEPAGE = "http://www.isc.org/"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
+
+SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
+ file://site.h \
+ file://init-relay file://default-relay \
+ file://init-server file://default-server \
+ file://dhclient.conf file://dhcpd.conf"
+
+inherit autotools
+
+TARGET_CFLAGS += "-D_GNU_SOURCE"
+EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
+ --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
+ --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases"
+
+do_compile_prepend () {
+ cp -f ${WORKDIR}/site.h ${S}/includes
+}
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/dhcp
+ install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
+ install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
+ install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
+ install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
+
+ rm -f ${D}${sysconfdir}/dhclient.conf
+ rm -f ${D}${sysconfdir}/dhcpd.conf
+ install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
+ install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
+
+ install -d ${D}${base_sbindir}/
+ mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
+ install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+}
+
+PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
+FILES_${PN} = ""
+FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
+FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
+
+FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
+RDEPENDS_dhcp-client = "bash"
+
+FILES_dhcp-omshell = "${bindir}/omshell"
+
+CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
+CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
+CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb b/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb
new file mode 100644
index 000000000..e9759de56
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb
@@ -0,0 +1,7 @@
+require dhcp4.inc
+
+PR = "r1"
+
+SRC_URI += "file://fixincludes.patch \
+ file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
+ file://fix-client-path.patch"
diff --git a/meta/recipes-connectivity/dhcp/files/default-relay b/meta/recipes-connectivity/dhcp/files/default-relay
new file mode 100644
index 000000000..59249db28
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-relay
@@ -0,0 +1,12 @@
+# Defaults for dhcp-relay initscript
+# sourced by /etc/init.d/dhcp-relay
+
+# What servers should the DHCP relay forward requests to?
+# e.g: SERVERS="192.168.0.1"
+SERVERS=""
+
+# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
+INTERFACES=""
+
+# Additional options that are passed to the DHCP relay daemon?
+OPTIONS="" \ No newline at end of file
diff --git a/meta/recipes-connectivity/dhcp/files/default-server b/meta/recipes-connectivity/dhcp/files/default-server
new file mode 100644
index 000000000..0385d1699
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-server
@@ -0,0 +1,7 @@
+# Defaults for dhcp initscript
+# sourced by /etc/init.d/dhcp-server
+# installed at /etc/default/dhcp-server by the maintainer scripts
+
+# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
+# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
+INTERFACES=""
diff --git a/meta/recipes-connectivity/dhcp/files/dhclient.conf b/meta/recipes-connectivity/dhcp/files/dhclient.conf
new file mode 100644
index 000000000..0e6dcf96c
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhclient.conf
@@ -0,0 +1,50 @@
+# Configuration file for /sbin/dhclient, which is included in Debian's
+# dhcp3-client package.
+#
+# This is a sample configuration file for dhclient. See dhclient.conf's
+# man page for more information about the syntax of this file
+# and a more comprehensive list of the parameters understood by
+# dhclient.
+#
+# Normally, if the DHCP server provides reasonable information and does
+# not leave anything out (like the domain name, for example), then
+# few changes must be made to this file, if any.
+#
+
+#send host-name "andare.fugue.com";
+#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
+#send dhcp-lease-time 3600;
+#supersede domain-name "fugue.com home.vix.com";
+#prepend domain-name-servers 127.0.0.1;
+request subnet-mask, broadcast-address, time-offset, routers,
+ domain-name, domain-name-servers, host-name,
+ netbios-name-servers, netbios-scope;
+#require subnet-mask, domain-name-servers;
+#timeout 60;
+#retry 60;
+#reboot 10;
+#select-timeout 5;
+#initial-interval 2;
+#script "/etc/dhcp3/dhclient-script";
+#media "-link0 -link1 -link2", "link0 link1";
+#reject 192.33.137.209;
+
+#alias {
+# interface "eth0";
+# fixed-address 192.5.5.213;
+# option subnet-mask 255.255.255.255;
+#}
+
+#lease {
+# interface "eth0";
+# fixed-address 192.33.137.200;
+# medium "link0 link1";
+# option host-name "andare.swiftmedia.com";
+# option subnet-mask 255.255.255.0;
+# option broadcast-address 192.33.137.255;
+# option routers 192.33.137.250;
+# option domain-name-servers 127.0.0.1;
+# renew 2 2000/1/12 00:00:01;
+# rebind 2 2000/1/12 00:00:01;
+# expire 2 2000/1/12 00:00:01;
+#}
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.conf b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
new file mode 100644
index 000000000..0001c0f00
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
@@ -0,0 +1,108 @@
+#
+# Sample configuration file for ISC dhcpd for Debian
+#
+# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
+#
+
+# The ddns-updates-style parameter controls whether or not the server will
+# attempt to do a DNS update when a lease is confirmed. We default to the
+# behavior of the version 2 packages ('none', since DHCP v2 didn't
+# have support for DDNS.)
+ddns-update-style none;
+
+# option definitions common to all supported networks...
+option domain-name "example.org";
+option domain-name-servers ns1.example.org, ns2.example.org;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+# If this DHCP server is the official DHCP server for the local
+# network, the authoritative directive should be uncommented.
+#authoritative;
+
+# Use this to send dhcp log messages to a different log file (you also
+# have to hack syslog.conf to complete the redirection).
+log-facility local7;
+
+# No service will be given on this subnet, but declaring it helps the
+# DHCP server to understand the network topology.
+
+#subnet 10.152.187.0 netmask 255.255.255.0 {
+#}
+
+# This is a very basic subnet declaration.
+
+#subnet 10.254.239.0 netmask 255.255.255.224 {
+# range 10.254.239.10 10.254.239.20;
+# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
+#}
+
+# This declaration allows BOOTP clients to get dynamic addresses,
+# which we don't really recommend.
+
+#subnet 10.254.239.32 netmask 255.255.255.224 {
+# range dynamic-bootp 10.254.239.40 10.254.239.60;
+# option broadcast-address 10.254.239.31;
+# option routers rtr-239-32-1.example.org;
+#}
+
+# A slightly different configuration for an internal subnet.
+#subnet 10.5.5.0 netmask 255.255.255.224 {
+# range 10.5.5.26 10.5.5.30;
+# option domain-name-servers ns1.internal.example.org;
+# option domain-name "internal.example.org";
+# option routers 10.5.5.1;
+# option broadcast-address 10.5.5.31;
+# default-lease-time 600;
+# max-lease-time 7200;
+#}
+
+# Hosts which require special configuration options can be listed in
+# host statements. If no address is specified, the address will be
+# allocated dynamically (if possible), but the host-specific information
+# will still come from the host declaration.
+
+#host passacaglia {
+# hardware ethernet 0:0:c0:5d:bd:95;
+# filename "vmunix.passacaglia";
+# server-name "toccata.fugue.com";
+#}
+
+# Fixed IP addresses can also be specified for hosts. These addresses
+# should not also be listed as being available for dynamic assignment.
+# Hosts for which fixed IP addresses have been specified can boot using
+# BOOTP or DHCP. Hosts for which no fixed address is specified can only
+# be booted with DHCP, unless there is an address range on the subnet
+# to which a BOOTP client is connected which has the dynamic-bootp flag
+# set.
+#host fantasia {
+# hardware ethernet 08:00:07:26:c0:a5;
+# fixed-address fantasia.fugue.com;
+#}
+
+# You can declare a class of clients and then do address allocation
+# based on that. The example below shows a case where all clients
+# in a certain class get addresses on the 10.17.224/24 subnet, and all
+# other clients get addresses on the 10.0.29/24 subnet.
+
+#class "foo" {
+# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
+#}
+
+#shared-network 224-29 {
+# subnet 10.17.224.0 netmask 255.255.255.0 {
+# option routers rtr-224.example.org;
+# }
+# subnet 10.0.29.0 netmask 255.255.255.0 {
+# option routers rtr-29.example.org;
+# }
+# pool {
+# allow members of "foo";
+# range 10.17.224.10 10.17.224.250;
+# }
+# pool {
+# deny members of "foo";
+# range 10.0.29.10 10.0.29.230;
+# }
+#}
diff --git a/meta/recipes-connectivity/dhcp/files/init-relay b/meta/recipes-connectivity/dhcp/files/init-relay
new file mode 100644
index 000000000..019a7e84c
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-relay
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
+#
+
+# It is not safe to start if we don't have a default configuration...
+if [ ! -f /etc/default/dhcp-relay ]; then
+ echo "/etc/default/dhcp-relay does not exist! - Aborting..."
+ echo "create this file to fix the problem."
+ exit 1
+fi
+
+# Read init script configuration (interfaces the daemon should listen on
+# and the DHCP server we should forward requests to.)
+. /etc/default/dhcp-relay
+
+# Build command line for interfaces (will be passed to dhrelay below.)
+IFCMD=""
+if test "$INTERFACES" != ""; then
+ for I in $INTERFACES; do
+ IFCMD=${IFCMD}"-i "${I}" "
+ done
+fi
+
+DHCRELAYPID=/var/run/dhcrelay.pid
+
+case "$1" in
+ start)
+ start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
+ ;;
+ stop)
+ start-stop-daemon -K -x /usr/sbin/dhcrelay
+ ;;
+ restart | force-reload)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/dhcp/files/init-server b/meta/recipes-connectivity/dhcp/files/init-server
new file mode 100644
index 000000000..34c20852b
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-server
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
+#
+
+test -f /usr/sbin/dhcpd || exit 0
+
+# It is not safe to start if we don't have a default configuration...
+if [ ! -f /etc/default/dhcp-server ]; then
+ echo "/etc/default/dhcp-server does not exist! - Aborting..."
+ exit 0
+fi
+
+# Read init script configuration (so far only interfaces the daemon
+# should listen on.)
+. /etc/default/dhcp-server
+
+case "$1" in
+ start)
+ echo -n "Starting DHCP server: "
+ test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
+ test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
+ start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping DHCP server: dhcpd3"
+ start-stop-daemon -K -x /usr/sbin/dhcpd
+ echo "."
+ ;;
+ restart | force-reload)
+ $0 stop
+ sleep 2
+ $0 start
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb b/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb
new file mode 100644
index 000000000..06c85f1cf
--- /dev/null
+++ b/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
+HOMEPAGE = "http://farsight.sf.net"
+SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${P}.tar.gz"
+
+DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
+
+inherit autotools
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+PR = "r1"
+
+EXTRA_OECONF = " \
+ --disable-debug \
+ --disable-gtk-doc \
+ --disable-python \
+"
+
+FILES_${PN} += "${libdir}/*/*.so"
+FILES_${PN}-dev += "${libdir}/f*/*a ${libdir}/g*/*a"
+FILES_${PN}-dbg += "${libdir}/*/.debug"
+
+
+
+
diff --git a/meta/recipes-connectivity/farsight/libnice_0.0.6.bb b/meta/recipes-connectivity/farsight/libnice_0.0.6.bb
new file mode 100644
index 000000000..809b691af
--- /dev/null
+++ b/meta/recipes-connectivity/farsight/libnice_0.0.6.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "Libnice is an implementation of the IETF's draft Interactice Connectivity Establishment standard (ICE)."
+HOMEPAGE = "http://nice.freedesktop.org/wiki/"
+SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz"
+
+LICENSE = "LGPL/MPL"
+DEPENDS = "glib-2.0 gstreamer"
+
+inherit autotools
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*a"
+FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
+
+do_compile_append() {
+ for i in $(find ${S} -name "*.pc") ; do
+ sed -i -e s:${STAGING_DIR_TARGET}::g \
+ -e s:/${TARGET_SYS}::g \
+ $i
+ done
+}
+
+
diff --git a/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch b/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch
new file mode 100644
index 000000000..b3ba3cb95
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch
@@ -0,0 +1,710 @@
+From 516d67c679101d1503dbd4c0613bcd6ff1b604e4 Mon Sep 17 00:00:00 2001
+From: Andrzej Zaborowski <balrog@zabor.org>
+Date: Wed, 19 Sep 2007 14:03:28 +0200
+Subject: [PATCH] Introduce ports.
+
+---
+ include/gsmd/atcmd.h | 2 +-
+ include/gsmd/gsmd.h | 7 +-
+ include/gsmd/uart.h | 28 ++++++
+ include/gsmd/vendorplugin.h | 4 +-
+ src/gsmd/Makefile.am | 2 +-
+ src/gsmd/atcmd.c | 177 +++++++++++++++++---------------------
+ src/gsmd/gsmd.c | 64 ++------------
+ src/gsmd/uart.c | 202 +++++++++++++++++++++++++++++++++++++++++++
+ 8 files changed, 328 insertions(+), 158 deletions(-)
+ create mode 100644 include/gsmd/uart.h
+ create mode 100644 src/gsmd/uart.c
+
+diff --git a/include/gsmd/atcmd.h b/include/gsmd/atcmd.h
+index 0d6c62a..a1af6a0 100644
+--- a/include/gsmd/atcmd.h
++++ b/include/gsmd/atcmd.h
+@@ -9,7 +9,7 @@ typedef int atcmd_cb_t(struct gsmd_atcmd *cmd, void *ctx, char *resp);
+
+ extern struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen, atcmd_cb_t *cb, void *ctx, u_int16_t id);
+ extern int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd);
+-extern int atcmd_init(struct gsmd *g, int sockfd);
++extern int atcmd_init(struct gsmd *g, struct gsmd_port *port);
+ extern void atcmd_drain(int fd);
+
+ #endif /* __GSMD__ */
+diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
+index ed334f1..4afdf66 100644
+--- a/include/gsmd/gsmd.h
++++ b/include/gsmd/gsmd.h
+@@ -10,6 +10,7 @@
+ #include <gsmd/machineplugin.h>
+ #include <gsmd/vendorplugin.h>
+ #include <gsmd/select.h>
++#include <gsmd/uart.h>
+ #include <gsmd/state.h>
+
+ void *gsmd_tallocs;
+@@ -52,6 +53,7 @@ enum llparse_state {
+ #define MLPARSE_BUF_SIZE 65535
+
+ struct llparser {
++ struct gsmd_port *port;
+ enum llparse_state state;
+ unsigned int len;
+ unsigned int flags;
+@@ -70,7 +72,7 @@ struct gsmd;
+ struct gsmd {
+ unsigned int flags;
+ int interpreter_ready;
+- struct gsmd_fd gfd_uart;
++ struct gsmd_uart uart;
+ struct gsmd_fd gfd_sock;
+ struct llparser llp;
+ struct llist_head users;
+@@ -81,9 +83,10 @@ struct gsmd {
+ struct gsmd_device_state dev_state;
+
+ struct llist_head operators; /* cached list of operator names */
+- unsigned char *mlbuf; /* ml_parse buffer */
++ char *mlbuf; /* ml_parse buffer */
+ unsigned int mlbuf_len;
+ int mlunsolicited;
++ int clear_to_send;
+ };
+
+ struct gsmd_user {
+diff --git a/include/gsmd/uart.h b/include/gsmd/uart.h
+new file mode 100644
+index 0000000..a006fa7
+--- /dev/null
++++ b/include/gsmd/uart.h
+@@ -0,0 +1,28 @@
++#ifndef __GSMD_UART_H
++#define __GSMD_UART_H
++
++#ifdef __GSMD__
++
++struct gsmd_port {
++ int (*write)(struct gsmd_port *port, const char data[], int len);
++ int (*set_break)(struct gsmd_port *port, int state);
++ /* more parameters here */
++ int (*newdata_cb)(void *opaque, const char data[], int len);
++ void *newdata_opaque;
++};
++
++struct gsmd_uart {
++ struct gsmd_port port;
++ struct gsmd_fd gfd;
++ char txfifo[2048];
++ int tx_start;
++ int tx_len;
++};
++
++extern int set_baudrate(int fd, int baudrate, int hwflow);
++extern void uart_drain(int fd);
++extern int uart_init(struct gsmd_uart *uart, int sockfd);
++
++#endif /* __GSMD__ */
++
++#endif
+diff --git a/include/gsmd/vendorplugin.h b/include/gsmd/vendorplugin.h
+index 1911fef..1c82790 100644
+--- a/include/gsmd/vendorplugin.h
++++ b/include/gsmd/vendorplugin.h
+@@ -11,8 +11,8 @@ struct gsmd_unsolicit;
+
+ struct gsmd_vendor_plugin {
+ struct llist_head list;
+- unsigned char *name;
+- unsigned char *ext_chars;
++ char *name;
++ char *ext_chars;
+ unsigned int num_unsolicit;
+ const struct gsmd_unsolicit *unsolicit;
+ int (*detect)(struct gsmd *g);
+diff --git a/src/gsmd/Makefile.am b/src/gsmd/Makefile.am
+index 9ac45ee..110b757 100644
+--- a/src/gsmd/Makefile.am
++++ b/src/gsmd/Makefile.am
+@@ -13,7 +13,7 @@ sbin_PROGRAMS = gsmd
+ gsmd_CFLAGS = -D PLUGINDIR=\"$(plugindir)\"
+ gsmd_SOURCES = gsmd.c atcmd.c select.c machine.c vendor.c unsolicited.c log.c \
+ usock.c talloc.c timer.c operator_cache.c ext_response.c \
+- sms_cb.c sms_pdu.c
++ sms_cb.c sms_pdu.c uart.c
+ gsmd_LDADD = -ldl
+ gsmd_LDFLAGS = -Wl,--export-dynamic
+
+diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
+index 2ef6a10..27dfa41 100644
+--- a/src/gsmd/atcmd.c
++++ b/src/gsmd/atcmd.c
+@@ -159,7 +159,8 @@ static int llparse_byte(struct llparser *llp, char byte)
+ return ret;
+ }
+
+-static int llparse_string(struct llparser *llp, char *buf, unsigned int len)
++static int llparse_string(struct llparser *llp, const char *buf,
++ unsigned int len)
+ {
+ while (len--) {
+ int rc = llparse_byte(llp, *(buf++));
+@@ -187,6 +188,55 @@ static int llparse_init(struct llparser *llp)
+ return 0;
+ }
+
++/* See if we can now send more commands to the port */
++static void atcmd_wake_queue(struct gsmd *g)
++{
++ int len, rc;
++ char *cr;
++
++ /* write pending commands to UART */
++ while (g->interpreter_ready && g->clear_to_send) {
++ struct gsmd_atcmd *pos, *pos2;
++ llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
++ cr = strchr(pos->cur, '\n');
++ if (cr)
++ len = cr - pos->cur;
++ else
++ len = pos->buflen;
++ rc = g->llp.port->write(g->llp.port, pos->cur, len);
++ if (rc == 0) {
++ gsmd_log(GSMD_ERROR,
++ "write returns 0, aborting\n");
++ break;
++ }
++ if (cr && rc == len)
++ rc ++; /* Skip the \n */
++ pos->buflen -= rc;
++ pos->cur += rc;
++ g->llp.port->write(g->llp.port, "\r", 1);
++
++ if (!pos->buflen) {
++ /* success: remove from global list of
++ * to-be-sent atcmds */
++ llist_del(&pos->list);
++ /* append to global list of executing atcmds */
++ llist_add_tail(&pos->list, &g->busy_atcmds);
++
++ /* we only send one cmd at the moment */
++ g->clear_to_send = 0;
++ break;
++ } else {
++ /* The write was short or the atcmd has more
++ * lines to send after a "> ". */
++ if (rc < len)
++ break;
++ g->clear_to_send = 0;
++ break;
++ }
++ }
++ }
++}
++
+ /* mid-level parser */
+
+ static int parse_final_result(const char *res)
+@@ -216,6 +266,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
+ g->interpreter_ready = 1;
+ gsmd_initsettings(g);
+ gmsd_alive_start(g);
++ atcmd_wake_queue(g);
+ return 0;
+ }
+
+@@ -316,6 +367,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
+ } else {
+ DEBUGP("Calling cmd->cb()\n");
+ cmd->resp = g->mlbuf;
++ g->mlbuf[g->mlbuf_len] = 0;
+ rc = cmd->cb(cmd, cmd->ctx, cmd->resp);
+ DEBUGP("Clearing mlbuf\n");
+ }
+@@ -370,12 +422,15 @@ static int ml_parse(const char *buf, int len, void *ctx)
+ if (g->mlbuf_len)
+ g->mlbuf[g->mlbuf_len ++] = '\n';
+ DEBUGP("Appending buf to mlbuf\n");
+- if (len > MLPARSE_BUF_SIZE - g->mlbuf_len)
++ if (len > MLPARSE_BUF_SIZE - g->mlbuf_len) {
+ len = MLPARSE_BUF_SIZE - g->mlbuf_len;
++ gsmd_log(GSMD_NOTICE, "g->mlbuf overrun\n");
++ }
+ memcpy(g->mlbuf + g->mlbuf_len, buf, len);
+ g->mlbuf_len += len;
+
+ if (g->mlunsolicited) {
++ g->mlbuf[g->mlbuf_len] = 0;
+ rc = unsolicited_parse(g, g->mlbuf, g->mlbuf_len,
+ strchr(g->mlbuf, ':') + 1);
+ if (rc == -EAGAIN) {
+@@ -422,8 +477,11 @@ final_cb:
+
+ /* if we're finished with current commands, but still have pending
+ * commands: we want to WRITE again */
+- if (llist_empty(&g->busy_atcmds) && !llist_empty(&g->pending_atcmds))
+- g->gfd_uart.when |= GSMD_FD_WRITE;
++ if (llist_empty(&g->busy_atcmds)) {
++ g->clear_to_send = 1;
++ if (!llist_empty(&g->pending_atcmds))
++ atcmd_wake_queue(g);
++ }
+
+ return rc;
+ }
+@@ -433,85 +491,23 @@ static int atcmd_prompt(void *data)
+ {
+ struct gsmd *g = data;
+
+- g->gfd_uart.when |= GSMD_FD_WRITE;
++ g->clear_to_send = 1;
++ atcmd_wake_queue(g);
+ }
+
+ /* callback to be called if [virtual] UART has some data for us */
+-static int atcmd_select_cb(int fd, unsigned int what, void *data)
++static int atcmd_newdata_cb(void *opaque, const char data[], int len)
+ {
+- int len, rc;
+- static char rxbuf[1024];
+- struct gsmd *g = data;
+- char *cr;
+-
+- if (what & GSMD_FD_READ) {
+- memset(rxbuf, 0, sizeof(rxbuf));
+- while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
+- if (len < 0) {
+- if (errno == EAGAIN)
+- return 0;
+- gsmd_log(GSMD_NOTICE, "ERROR reading from fd %u: %d (%s)\n", fd, len,
+- strerror(errno));
+- return len;
+- }
+- rc = llparse_string(&g->llp, rxbuf, len);
+- if (rc < 0) {
+- gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
+- return rc;
+- }
+- }
+- }
+-
+- /* write pending commands to UART */
+- if ((what & GSMD_FD_WRITE) && g->interpreter_ready) {
+- struct gsmd_atcmd *pos, *pos2;
+- llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
+- cr = strchr(pos->cur, '\n');
+- if (cr)
+- len = cr - pos->cur;
+- else
+- len = pos->buflen - 1; /* assuming zero-terminated strings */
+- rc = write(fd, pos->cur, len);
+- if (rc == 0) {
+- gsmd_log(GSMD_ERROR, "write returns 0, aborting\n");
+- break;
+- } else if (rc < 0) {
+- gsmd_log(GSMD_ERROR, "error during write to fd %d: %d\n",
+- fd, rc);
+- return rc;
+- }
+- if (!cr || rc == len)
+- rc ++; /* Skip the \n or \0 */
+- pos->buflen -= rc;
+- pos->cur += rc;
+- write(fd, "\r", 1);
+-
+- if (!pos->buflen) {
+- /* success: remove from global list of
+- * to-be-sent atcmds */
+- llist_del(&pos->list);
+- /* append to global list of executing atcmds */
+- llist_add_tail(&pos->list, &g->busy_atcmds);
+-
+- /* we only send one cmd at the moment */
+- break;
+- } else {
+- /* The write was short or the atcmd has more
+- * lines to send after a "> ". */
+- if (rc < len)
+- return 0;
+- break;
+- }
+- }
++ struct gsmd *g = opaque;
++ int rc;
+
+- /* Either pending_atcmds is empty or a command has to wait */
+- g->gfd_uart.when &= ~GSMD_FD_WRITE;
+- }
++ rc = llparse_string(&g->llp, data, len);
++ if (rc < 0)
++ gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
+
+- return 0;
++ return rc;
+ }
+
+-
+ struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen,
+ atcmd_cb_t cb, void *ctx, u_int16_t id)
+ {
+@@ -544,36 +540,18 @@ int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd)
+ {
+ DEBUGP("submitting command `%s'\n", cmd->buf);
+
+- if (llist_empty(&g->pending_atcmds))
+- g->gfd_uart.when |= GSMD_FD_WRITE;
++ llist_empty(&g->pending_atcmds);
+ llist_add_tail(&cmd->list, &g->pending_atcmds);
++ atcmd_wake_queue(g);
+
+ return 0;
+ }
+
+-void atcmd_drain(int fd)
+-{
+- int rc;
+- struct termios t;
+- rc = tcflush(fd, TCIOFLUSH);
+- rc = tcgetattr(fd, &t);
+- DEBUGP("c_iflag = 0x%08x, c_oflag = 0x%08x, c_cflag = 0x%08x, c_lflag = 0x%08x\n",
+- t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
+- t.c_iflag = t.c_oflag = 0;
+- cfmakeraw(&t);
+- rc = tcsetattr(fd, TCSANOW, &t);
+-}
+-
+ /* init atcmd parser */
+-int atcmd_init(struct gsmd *g, int sockfd)
++int atcmd_init(struct gsmd *g, struct gsmd_port *port)
+ {
+ __atcmd_ctx = talloc_named_const(gsmd_tallocs, 1, "atcmds");
+
+- g->gfd_uart.fd = sockfd;
+- g->gfd_uart.when = GSMD_FD_READ;
+- g->gfd_uart.data = g;
+- g->gfd_uart.cb = &atcmd_select_cb;
+-
+ INIT_LLIST_HEAD(&g->pending_atcmds);
+ INIT_LLIST_HEAD(&g->busy_atcmds);
+
+@@ -581,7 +559,9 @@ int atcmd_init(struct gsmd *g, int sockfd)
+
+ g->mlbuf_len = 0;
+ g->mlunsolicited = 0;
++ g->clear_to_send = 1;
+
++ g->llp.port = port;
+ g->llp.cur = g->llp.buf;
+ g->llp.len = sizeof(g->llp.buf);
+ g->llp.cb = &ml_parse;
+@@ -589,5 +569,8 @@ int atcmd_init(struct gsmd *g, int sockfd)
+ g->llp.ctx = g;
+ g->llp.flags = LGSM_ATCMD_F_EXTENDED;
+
+- return gsmd_register_fd(&g->gfd_uart);
++ port->newdata_opaque = g;
++ port->newdata_cb = atcmd_newdata_cb;
++
++ return 0;
+ }
+diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
+index 51b4f2c..846bd17 100644
+--- a/src/gsmd/gsmd.c
++++ b/src/gsmd/gsmd.c
+@@ -26,7 +26,6 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <termios.h>
+ #include <signal.h>
+
+ #define _GNU_SOURCE
+@@ -247,56 +246,6 @@ int gsmd_initsettings(struct gsmd *gsmd)
+ return atcmd_submit(gsmd, cmd);
+ }
+
+-struct bdrt {
+- int bps;
+- u_int32_t b;
+-};
+-
+-static struct bdrt bdrts[] = {
+- { 0, B0 },
+- { 9600, B9600 },
+- { 19200, B19200 },
+- { 38400, B38400 },
+- { 57600, B57600 },
+- { 115200, B115200 },
+- { 230400, B230400 },
+- { 460800, B460800 },
+- { 921600, B921600 },
+-};
+-
+-static int set_baudrate(int fd, int baudrate, int hwflow)
+-{
+- int i;
+- u_int32_t bd = 0;
+- struct termios ti;
+-
+- for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
+- if (bdrts[i].bps == baudrate)
+- bd = bdrts[i].b;
+- }
+- if (bd == 0)
+- return -EINVAL;
+-
+- i = tcgetattr(fd, &ti);
+- if (i < 0)
+- return i;
+-
+- i = cfsetispeed(&ti, B0);
+- if (i < 0)
+- return i;
+-
+- i = cfsetospeed(&ti, bd);
+- if (i < 0)
+- return i;
+-
+- if (hwflow)
+- ti.c_cflag |= CRTSCTS;
+- else
+- ti.c_cflag &= ~CRTSCTS;
+-
+- return tcsetattr(fd, 0, &ti);
+-}
+-
+ static int gsmd_initialize(struct gsmd *g)
+ {
+ INIT_LLIST_HEAD(&g->users);
+@@ -478,14 +427,19 @@ int main(int argc, char **argv)
+ if (wait >= 0)
+ g.interpreter_ready = !wait;
+
+- if (atcmd_init(&g, fd) < 0) {
++ if (uart_init(&g.uart, fd) < 0) {
+ fprintf(stderr, "can't initialize UART device\n");
+ exit(1);
+ }
+
+- write(fd, "\r", 1);
+- sleep(1);
+- atcmd_drain(fd);
++ if (atcmd_init(&g, &g.uart.port) < 0) {
++ fprintf(stderr, "can't initialize AT parser\n");
++ exit(1);
++ }
++ write(fd, "\r", 1);
++ sleep(1);
++
++ uart_drain(fd);
+
+ if (usock_init(&g) < 0) {
+ fprintf(stderr, "can't open unix socket\n");
+diff --git a/src/gsmd/uart.c b/src/gsmd/uart.c
+new file mode 100644
+index 0000000..22a4a5c
+--- /dev/null
++++ b/src/gsmd/uart.c
+@@ -0,0 +1,202 @@
++/* Wrapper for the physical UART in a struct gsmd_port abstraction.
++ *
++ * Copyright (C) 2007 OpenMoko, Inc.
++ * Written by Andrzej Zaborowski <andrew@openedhand.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <string.h>
++#include <fcntl.h>
++#include <termios.h>
++#include <unistd.h>
++#include <errno.h>
++
++#include "gsmd.h"
++
++#include <gsmd/gsmd.h>
++
++void uart_drain(int fd)
++{
++ int rc;
++ struct termios t;
++ rc = tcflush(fd, TCIOFLUSH);
++ rc = tcgetattr(fd, &t);
++ DEBUGP(
++ "c_iflag = 0x%08x, c_oflag = 0x%08x, "
++ "c_cflag = 0x%08x, c_lflag = 0x%08x\n",
++ t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
++ t.c_iflag = t.c_oflag = 0;
++ cfmakeraw(&t);
++ rc = tcsetattr(fd, TCSANOW, &t);
++}
++
++struct bdrt {
++ int bps;
++ u_int32_t b;
++};
++
++static struct bdrt bdrts[] = {
++ { 0, B0 },
++ { 9600, B9600 },
++ { 19200, B19200 },
++ { 38400, B38400 },
++ { 57600, B57600 },
++ { 115200, B115200 },
++ { 230400, B230400 },
++ { 460800, B460800 },
++ { 921600, B921600 },
++};
++
++int set_baudrate(int fd, int baudrate, int hwflow)
++{
++ int i;
++ u_int32_t bd = 0;
++ struct termios ti;
++
++ for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
++ if (bdrts[i].bps == baudrate)
++ bd = bdrts[i].b;
++ }
++ if (bd == 0)
++ return -EINVAL;
++
++ i = tcgetattr(fd, &ti);
++ if (i < 0)
++ return i;
++
++ i = cfsetispeed(&ti, B0);
++ if (i < 0)
++ return i;
++
++ i = cfsetospeed(&ti, bd);
++ if (i < 0)
++ return i;
++
++ if (hwflow)
++ ti.c_cflag |= CRTSCTS;
++ else
++ ti.c_cflag &= ~CRTSCTS;
++
++ return tcsetattr(fd, 0, &ti);
++}
++
++static int uart_select_cb(int fd, unsigned int what, void *data)
++{
++ struct gsmd_uart *uart = (struct gsmd_uart *) data;
++ static char rxbuf[2048];
++ int rc, len;
++
++ if ((what & GSMD_FD_READ) && uart->port.newdata_cb) {
++ while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
++ if (len < 0) {
++ if (errno == EAGAIN || errno == EINTR)
++ return 0;
++ gsmd_log(GSMD_NOTICE, "ERROR reading from "
++ "fd %u: %d (%s)\n", fd, errno,
++ strerror(errno));
++ return -errno;
++ }
++
++ rc = uart->port.newdata_cb(
++ uart->port.newdata_opaque,
++ rxbuf,
++ len);
++ if (rc < 0)
++ return rc;
++ }
++ }
++
++ /* Write pending data to UART. */
++ if ((what & GSMD_FD_WRITE) && uart->tx_len) {
++ while (uart->tx_start + uart->tx_len >= sizeof(uart->txfifo)) {
++ len = sizeof(uart->txfifo) - uart->tx_start;
++ rc = write(fd, &uart->txfifo[uart->tx_start], len);
++ if (rc < 0 && errno != EINTR) {
++ if (errno == EAGAIN)
++ return 0;
++ gsmd_log(GSMD_NOTICE, "ERROR writing "
++ "fd %u: %d (%s)\n", fd, errno,
++ strerror(errno));
++ return -errno;
++ }
++
++ if (rc > 0) {
++ uart->tx_start += rc;
++ uart->tx_len -= rc;
++ }
++ }
++ uart->tx_start &= sizeof(uart->txfifo) - 1;
++
++ while (uart->tx_len) {
++ rc = write(fd, &uart->txfifo[uart->tx_start],
++ uart->tx_len);
++ if (rc < 0 && errno != EINTR) {
++ if (errno == EAGAIN)
++ return 0;
++ gsmd_log(GSMD_NOTICE, "ERROR writing "
++ "fd %u: %d (%s)\n", fd, errno,
++ strerror(errno));
++ return -errno;
++ }
++
++ if (rc > 0) {
++ uart->tx_start += rc;
++ uart->tx_len -= rc;
++ }
++ }
++
++ /* If we reached here, there's no more data for the moment. */
++ uart->gfd.when &= ~GSMD_FD_WRITE;
++ }
++
++ return 0;
++}
++
++static int uart_write(struct gsmd_port *port, const char data[], int len)
++{
++ struct gsmd_uart *uart = (struct gsmd_uart *) port;
++ int start = (uart->tx_start + uart->tx_len) &
++ (sizeof(uart->txfifo) - 1);
++ int space = sizeof(uart->txfifo) - start;
++
++ if (uart->tx_len + len > sizeof(uart->txfifo))
++ len = sizeof(uart->txfifo) - uart->tx_len;
++
++ if (len)
++ uart->gfd.when |= GSMD_FD_WRITE;
++
++ if (len > space) {
++ memcpy(uart->txfifo + start, data, space);
++ memcpy(uart->txfifo, data + space, len - space);
++ } else
++ memcpy(uart->txfifo + start, data, len);
++
++ uart->tx_len += len;
++ return len;
++}
++
++int uart_init(struct gsmd_uart *uart, int sockfd)
++{
++ uart->gfd.fd = sockfd;
++ uart->gfd.when = GSMD_FD_READ;
++ uart->gfd.data = uart;
++ uart->gfd.cb = &uart_select_cb;
++
++ uart->port.write = uart_write;
++
++ return gsmd_register_fd(&uart->gfd);
++}
+--
+1.5.2.1
+
diff --git a/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch b/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
new file mode 100644
index 000000000..368359638
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
@@ -0,0 +1,74 @@
+From 1078f7aced63c6216bffe649930b97c9ccf9a16e Mon Sep 17 00:00:00 2001
+From: Andrzej Zaborowski <balrog@zabor.org>
+Date: Wed, 19 Sep 2007 14:04:50 +0200
+Subject: [PATCH] Flush all pending commands before restarting the modem initialisation.
+
+---
+ include/gsmd/gsmd.h | 1 +
+ src/gsmd/atcmd.c | 21 +++++++++++++++++++++
+ src/gsmd/timer.c | 8 ++++++++
+ 3 files changed, 30 insertions(+), 0 deletions(-)
+
+diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
+index 4afdf66..6ac9d8e 100644
+--- a/include/gsmd/gsmd.h
++++ b/include/gsmd/gsmd.h
+@@ -131,6 +131,7 @@ struct gsmd_timer {
+
+ int gsmd_timer_init(void);
+ void gmsd_timer_check_n_run(void);
++void gsmd_timer_reset(void);
+
+ struct gsmd_timer *gsmd_timer_alloc(void);
+ int gsmd_timer_register(struct gsmd_timer *timer);
+diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
+index 27dfa41..2f6cee2 100644
+--- a/src/gsmd/atcmd.c
++++ b/src/gsmd/atcmd.c
+@@ -264,6 +264,27 @@ static int ml_parse(const char *buf, int len, void *ctx)
+ if (strlen(buf) == 0 ||
+ !strcmp(buf, "AT-Command Interpreter ready")) {
+ g->interpreter_ready = 1;
++ g->clear_to_send = 1;
++
++ /* Flush current queue and reinitialise */
++ while (!llist_empty(&g->busy_atcmds)) {
++ cmd = llist_entry(g->busy_atcmds.next,
++ struct gsmd_atcmd, list);
++ gsmd_log(GSMD_NOTICE, "discarding busy cmd %s\n",
++ cmd->buf);
++ llist_del(&cmd->list);
++ talloc_free(cmd);
++ }
++ while (!llist_empty(&g->pending_atcmds)) {
++ cmd = llist_entry(g->pending_atcmds.next,
++ struct gsmd_atcmd, list);
++ gsmd_log(GSMD_NOTICE, "discarding pending cmd %s\n",
++ cmd->buf);
++ llist_del(&cmd->list);
++ talloc_free(cmd);
++ }
++
++ gsmd_timer_reset();
+ gsmd_initsettings(g);
+ gmsd_alive_start(g);
+ atcmd_wake_queue(g);
+diff --git a/src/gsmd/timer.c b/src/gsmd/timer.c
+index 5200690..8877275 100644
+--- a/src/gsmd/timer.c
++++ b/src/gsmd/timer.c
+@@ -215,3 +215,11 @@ void gsmd_timer_unregister(struct gsmd_timer *timer)
+ /* re-calculate next expiration */
+ calc_next_expiration();
+ }
++
++void gsmd_timer_reset(void)
++{
++ while (!llist_empty(&gsmd_timers))
++ /* TODO: free associated resources (e.g timer->cancel_cb()) */
++ llist_del(&llist_entry(gsmd_timers.next,
++ struct gsmd_timer, list)->list);
++}
+--
+1.5.2.1
+
diff --git a/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch b/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
new file mode 100644
index 000000000..984acc936
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
@@ -0,0 +1,77 @@
+From 8af1bb4a0d0df9baa80859c5f7f56cbd7634aded Mon Sep 17 00:00:00 2001
+From: Andrzej Zaborowski <balrog@zabor.org>
+Date: Wed, 19 Sep 2007 14:06:19 +0200
+Subject: [PATCH] Correctly segment incoming usock data into packets, handler short reads.
+
+---
+ include/gsmd/gsmd.h | 2 ++
+ src/gsmd/usock.c | 20 ++++++++++++++++----
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
+index 6ac9d8e..acec02a 100644
+--- a/include/gsmd/gsmd.h
++++ b/include/gsmd/gsmd.h
+@@ -95,6 +95,8 @@ struct gsmd_user {
+ struct gsmd *gsmd;
+ struct gsmd_fd gfd; /* the socket */
+ u_int32_t subscriptions; /* bitmaks of subscribed event groups */
++ char usock_fifo[1024];
++ int usock_len;
+
+ struct llist_head pb_readrg_list; /* our READRG phonebook list */
+ struct llist_head pb_find_list; /* our FIND phonebook list */
+diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
+index 32e98d0..bac5f0c 100644
+--- a/src/gsmd/usock.c
++++ b/src/gsmd/usock.c
+@@ -1529,14 +1529,15 @@ static int usock_rcv_pcmd(struct gsmd_user *gu, char *buf, int len)
+ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
+ {
+ struct gsmd_user *gu = data;
++ struct gsmd_msg_hdr *gph;
+
+ /* FIXME: check some kind of backlog and limit it */
+
+ if (what & GSMD_FD_READ) {
+- char buf[1024];
+ int rcvlen;
+ /* read data from socket, determine what he wants */
+- rcvlen = read(fd, buf, sizeof(buf));
++ rcvlen = read(fd, gu->usock_fifo + gu->usock_len,
++ sizeof(gu->usock_fifo) - gu->usock_len);
+ if (rcvlen == 0) {
+ DEBUGP("EOF, this client has just vanished\n");
+ /* EOF, this client has just vanished */
+@@ -1549,8 +1550,18 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
+ return 0;
+ } else if (rcvlen < 0)
+ return rcvlen;
+- else
+- return usock_rcv_pcmd(gu, buf, rcvlen);
++
++ gu->usock_len += rcvlen;
++ gph = (struct gsmd_msg_hdr *) gu->usock_fifo;
++ while (gu->usock_len >= sizeof(*gph) &&
++ gu->usock_len >= sizeof(*gph) + gph->len) {
++ usock_rcv_pcmd(gu, gu->usock_fifo, gu->usock_len);
++ gu->usock_len -= sizeof(*gph) + gph->len;
++ memmove(gu->usock_fifo,
++ gu->usock_fifo + sizeof(*gph) +
++ gph->len,
++ gu->usock_len);
++ }
+ }
+
+ if (what & GSMD_FD_WRITE) {
+@@ -1609,6 +1620,7 @@ static int gsmd_usock_cb(int fd, unsigned int what, void *data)
+ newuser->gfd.cb = &gsmd_usock_user_cb;
+ newuser->gsmd = g;
+ newuser->subscriptions = 0xffffffff;
++ newuser->usock_len = 0;
+ INIT_LLIST_HEAD(&newuser->finished_ucmds);
+ INIT_LLIST_HEAD(&newuser->pb_readrg_list);
+ INIT_LLIST_HEAD(&newuser->pb_find_list);
+--
+1.5.2.1
+
diff --git a/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch b/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch
new file mode 100644
index 000000000..f5e7a7902
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch
@@ -0,0 +1,176 @@
+From 421b0fa14fefbd13a455c20380fecddda616b41a Mon Sep 17 00:00:00 2001
+From: Andrzej Zaborowski <balrog@zabor.org>
+Date: Wed, 19 Sep 2007 18:30:36 +0200
+Subject: [PATCH] Handle read() and write() return values.
+
+---
+ include/libgsmd/libgsmd.h | 3 +-
+ src/gsmd/usock.c | 38 ++++++++++++++++-----------
+ src/libgsmd/lgsm_internals.h | 2 +
+ src/libgsmd/libgsmd.c | 58 ++++++++++++++++++++++++++---------------
+ 4 files changed, 63 insertions(+), 38 deletions(-)
+
+diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h
+index fc56890..db15aa9 100644
+--- a/include/libgsmd/libgsmd.h
++++ b/include/libgsmd/libgsmd.h
+@@ -65,6 +65,7 @@ extern int lgsm_subscriptions(struct lgsm_handle *lh, u_int32_t subscriptions);
+
+ extern struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len);
+ extern int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
+-extern int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len);
++extern int lgsm_handle_packet(struct lgsm_handle *lh,
++ const char *buf, int len);
+
+ #endif
+diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
+index bac5f0c..2283600 100644
+--- a/src/gsmd/usock.c
++++ b/src/gsmd/usock.c
+@@ -1569,23 +1569,29 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
+ struct gsmd_ucmd *ucmd, *uctmp;
+ llist_for_each_entry_safe(ucmd, uctmp, &gu->finished_ucmds,
+ list) {
+- int rc;
+-
+- rc = write(fd, &ucmd->hdr, sizeof(ucmd->hdr) + ucmd->hdr.len);
+- if (rc < 0) {
+- DEBUGP("write return %d\n", rc);
+- return rc;
+- }
+- if (rc == 0) {
+- DEBUGP("write returns zero!!\n");
+- break;
++ const void *pos = &ucmd->hdr;
++ size_t len = sizeof(ucmd->hdr) + ucmd->hdr.len;
++
++ while (len) {
++ ssize_t rc;
++
++ rc = write(fd, pos, len);
++ if (rc < 0 && errno != EINTR) {
++ DEBUGP("write returned %s\n",
++ strerror(errno));
++ return rc;
++ }
++ if (rc == 0 && pos == &ucmd->hdr) {
++ DEBUGP("write returns zero!!\n");
++ return 0;
++ }
++ if (rc > 0) {
++ len -= rc;
++ pos += rc;
++ }
+ }
+- if (rc != sizeof(ucmd->hdr) + ucmd->hdr.len) {
+- DEBUGP("short write\n");
+- break;
+- }
+-
+- DEBUGP("successfully sent cmd %p to user %p, freeing\n", ucmd, gu);
++ DEBUGP("successfully sent cmd %p to user %p, "
++ "freeing\n", ucmd, gu);
+ llist_del(&ucmd->list);
+ talloc_free(ucmd);
+ }
+diff --git a/src/libgsmd/lgsm_internals.h b/src/libgsmd/lgsm_internals.h
+index c826723..f1b1a23 100644
+--- a/src/libgsmd/lgsm_internals.h
++++ b/src/libgsmd/lgsm_internals.h
+@@ -8,6 +8,8 @@ struct lgsm_handle {
+ int fd;
+ lgsm_msg_handler *handler[__NUM_GSMD_MSGS];
+ enum lgsm_netreg_state netreg_state;
++ char usock_fifo[1024];
++ int usock_len;
+ };
+
+ int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
+diff --git a/src/libgsmd/libgsmd.c b/src/libgsmd/libgsmd.c
+index 9906ea8..cc804ed 100644
+--- a/src/libgsmd/libgsmd.c
++++ b/src/libgsmd/libgsmd.c
+@@ -86,34 +86,37 @@ static int lgsm_open_backend(struct lgsm_handle *lh, const char *device)
+ }
+
+ /* handle a packet that was received on the gsmd socket */
+-int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len)
++int lgsm_handle_packet(struct lgsm_handle *lh, const char *buf, int len)
+ {
+ struct gsmd_msg_hdr *gmh;
+ lgsm_msg_handler *handler;
+ int rc = 0;
+
+- while (len) {
+- if (len < sizeof(*gmh))
+- return -EINVAL;
+- gmh = (struct gsmd_msg_hdr *) buf;
+-
+- if (len - sizeof(*gmh) < gmh->len)
+- return -EINVAL;
+- len -= sizeof(*gmh) + gmh->len;
+- buf += sizeof(*gmh) + gmh->len;
+-
+- if (gmh->msg_type >= __NUM_GSMD_MSGS)
+- return -EINVAL;
+-
+- handler = lh->handler[gmh->msg_type];
++ if (lh->usock_len + len > sizeof(lh->usock_fifo))
++ return -ENOMEM;
+
+- if (handler)
++ memcpy(lh->usock_fifo + lh->usock_len, buf, len);
++ lh->usock_len += len;
++ gmh = (struct gsmd_msg_hdr *) lh->usock_fifo;
++ while (lh->usock_len >= sizeof(*gmh) &&
++ lh->usock_len >= sizeof(*gmh) + gmh->len) {
++ if (gmh->msg_type < __NUM_GSMD_MSGS &&
++ (handler = lh->handler[gmh->msg_type]))
+ rc |= handler(lh, gmh);
+- else
+- fprintf(stderr, "unable to handle packet type=%u\n",
+- gmh->msg_type);
++ else {
++ fprintf(stderr, "unable to handle packet "
++ "type=%u id=%u\n",
++ gmh->msg_type, gmh->id);
++ rc |= EINVAL;
++ }
++
++ lh->usock_len -= gmh->len + sizeof(*gmh);
++ memmove(lh->usock_fifo,
++ lh->usock_fifo + gmh->len + sizeof(*gmh),
++ lh->usock_len);
+ }
+- return rc;
++
++ return -rc;
+ }
+
+ int lgsm_register_handler(struct lgsm_handle *lh, int type, lgsm_msg_handler *handler)
+@@ -193,8 +196,21 @@ static u_int16_t next_msg_id;
+
+ int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
+ {
++ ssize_t rc;
++ size_t len = sizeof(*gmh) + gmh->len;
++ const void *pos = gmh;
++
+ gmh->id = next_msg_id++;
+- return send(lh->fd, (char *) gmh, sizeof(*gmh) + gmh->len, 0);
++ while (len) {
++ rc = send(lh->fd, pos, len, 0);
++ if (rc < 0 && errno != EINTR)
++ return -errno;
++ if (rc > 0) {
++ len -= rc;
++ pos += rc;
++ }
++ }
++ return 0;
+ }
+
+ struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
+--
+1.5.2.1
+
diff --git a/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch b/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch
new file mode 100644
index 000000000..e9f49bd7d
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch
@@ -0,0 +1,130 @@
+diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
+index 236ad78..66cdf48 100644
+--- a/include/gsmd/usock.h
++++ b/include/gsmd/usock.h
+@@ -332,6 +332,7 @@ struct gsmd_sms {
+ struct gsmd_sms_submit {
+ struct gsmd_addr addr;
+ struct gsmd_sms payload;
++ int ask_ds;
+ };
+
+ /* Refer to GSM 07.05 subclause 4.4 */
+diff --git a/include/libgsmd/sms.h b/include/libgsmd/sms.h
+index 3ada62d..9808442 100644
+--- a/include/libgsmd/sms.h
++++ b/include/libgsmd/sms.h
+@@ -46,6 +46,7 @@ struct lgsm_sms {
+ enum gsmd_sms_alphabet alpha;
+ u_int8_t data[LGSM_SMS_DATA_MAXLEN+1];
+ int length;
++ int ask_ds;
+ };
+
+ /* GSM 03.40 subclause 9.2.2.2 and GSM 07.05 subclause 4.4 and subclause 3.1 */
+diff --git a/src/gsmd/sms_pdu.c b/src/gsmd/sms_pdu.c
+index d1235dd..d461999 100644
+--- a/src/gsmd/sms_pdu.c
++++ b/src/gsmd/sms_pdu.c
+@@ -247,7 +247,8 @@ int sms_pdu_make_smssubmit(char *dest, const struct gsmd_sms_submit *src)
+ GSMD_SMS_TP_MTI_SUBMIT |
+ (0 << 2) | /* Reject Duplicates: 0 */
+ GSMD_SMS_TP_VPF_NOT_PRESENT |
+- GSMD_SMS_TP_SRR_STATUS_REQUEST |
++ (src->ask_ds ? GSMD_SMS_TP_SRR_STATUS_REQUEST :
++ GSMD_SMS_TP_SRR_NOT_REQUEST) |
+ (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
+ GSMD_SMS_TP_UDHI_NO_HEADER) |
+ GSMD_SMS_TP_RP_NOT_SET;
+diff --git a/src/libgsmd/libgsmd_sms.c b/src/libgsmd/libgsmd_sms.c
+index 22d7dbf..bbc8689 100644
+--- a/src/libgsmd/libgsmd_sms.c
++++ b/src/libgsmd/libgsmd_sms.c
+@@ -126,6 +126,7 @@ int lgsm_sms_send(struct lgsm_handle *lh,
+ if (lgsm_number2addr(&gss->addr, sms->addr, 1))
+ return -EINVAL;
+
++ gss->ask_ds = sms->ask_ds;
+ gss->payload.has_header = 0;
+ gss->payload.length = sms->length;
+ gss->payload.coding_scheme = sms->alpha;
+@@ -161,6 +162,7 @@ int lgsm_sms_write(struct lgsm_handle *lh,
+ if (lgsm_number2addr(&gsw->sms.addr, sms_write->sms.addr, 1))
+ return -EINVAL;
+
++ gsw->sms.ask_ds = sms_write->sms.ask_ds;
+ gsw->sms.payload.has_header = 0;
+ gsw->sms.payload.length = sms_write->sms.length;
+ gsw->sms.payload.coding_scheme = sms_write->sms.alpha;
+diff --git a/src/util/shell.c b/src/util/shell.c
+index f902126..f26e17e 100644
+--- a/src/util/shell.c
++++ b/src/util/shell.c
+@@ -355,7 +355,7 @@ static int shell_help(void)
+ "\tsd\tSMS Delete (sd=index,delflg)\n"
+ "\tsl\tSMS List (sl=stat)\n"
+ "\tsr\tSMS Read (sr=index)\n"
+- "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
++ "\tss\tSMS Send (ss=ask_ds,number,text|[\"text\"])\n"
+ "\tsw\tSMS Write (sw=stat,number,text)\n"
+ "\tsm\tSMS Storage stats\n"
+ "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
+@@ -563,33 +563,29 @@ int shell_main(struct lgsm_handle *lgsmh)
+ struct lgsm_sms sms;
+
+ ptr = strchr(buf, '=');
++ sms.ask_ds = atoi(ptr+1);
+ fcomma = strchr(buf, ',');
+- if (!ptr || !fcomma) {
+- printf("Wrong command format\n");
+- } else {
+- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
+- sms.addr[fcomma-ptr-1] = '\0';
+-
+- /* todo define \" to allow " in text */
+- if (fcomma[1] == '"' &&
+- !strchr(fcomma+2, '"')) {
++ lcomma = strchr(fcomma+1, ',');
++ strncpy(sms.addr, fcomma+1, lcomma-fcomma-1);
++ sms.addr[lcomma-fcomma-1] = '\0';
++ /* todo define \" to allow " in text */
++ if (lcomma[1]=='"' &&
++ !strchr(lcomma+2, '"')) {
+ /* read until closing '"' */
+ rc = fscanf(stdin, "%[^\"]\"",
+- fcomma+strlen(fcomma));
++ lcomma+strlen(lcomma));
+ if (rc == EOF) {
+ printf("EOF\n");
+ return -1;
+ }
+ /* remove brackets */
+- fcomma++;
+- fcomma[strlen(fcomma)] = '\0';
+- }
+-
+- printf("Send SMS\n");
+- packing_7bit_character(fcomma+1, &sms);
++ lcomma++;
++ lcomma[strlen(lcomma)] = '\0';
++ }
++ printf("Send SMS\n");
++ packing_7bit_character(lcomma+1, &sms);
+
+- lgsm_sms_send(lgsmh, &sms);
+- }
++ lgsm_sms_send(lgsmh, &sms);
+ } else if ( !strncmp(buf, "sw", 2)) {
+ printf("Write SMS\n");
+ struct lgsm_sms_write sms_write;
+@@ -603,6 +599,7 @@ int shell_main(struct lgsm_handle *lgsmh)
+ sms_write.sms.addr[lcomma-fcomma-1] = '\0';
+ packing_7bit_character(
+ lcomma+1, &sms_write.sms);
++ sms_write.sms.ask_ds = 0;
+
+ lgsm_sms_write(lgsmh, &sms_write);
+ } else if (!strncmp(buf, "sm", 2)) {
+--
+1.5.2.1
+
diff --git a/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch b/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
new file mode 100644
index 000000000..32a1ca33f
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
@@ -0,0 +1,70 @@
+http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=834
+
+From: Kristian Mueller <kristian@mput.de>
+Subject: [PATCH] libgsmd-tool does not allow sms with more than one word
+
+libgsmd-tool only allows for command strings without spaces.
+SMS messages with more than one word will be parsed as multible commands.
+The patch introduces SMS message text in bracket and fixes a NULL pointer
+reference on mailformed "ss" commands.
+
+Signed-off-by: Jim Huang <jserv@openmoko.org>
+---
+ src/util/shell.c | 32 ++++++++++++++++++++++++++------
+ 1 file changed, 26 insertions(+), 6 deletions(-)
+
+Index: gsm/src/util/shell.c
+===================================================================
+--- gsm.orig/src/util/shell.c 2007-08-31 16:15:30.000000000 +0800
++++ gsm/src/util/shell.c 2007-09-17 23:35:31.000000000 +0800
+@@ -389,7 +389,7 @@
+ "\tsd\tSMS Delete (sd=index,delflg)\n"
+ "\tsl\tSMS List (sl=stat)\n"
+ "\tsr\tSMS Read (sr=index)\n"
+- "\tss\tSMS Send (ss=number,text)\n"
++ "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
+ "\tsw\tSMS Write (sw=stat,number,text)\n"
+ "\tsm\tSMS Storage stats\n"
+ "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
+@@ -612,16 +612,36 @@
+
+ lgsm_sms_read(lgsmh, atoi(ptr+1));
+ } else if ( !strncmp(buf, "ss", 2)) {
+- printf("Send SMS\n");
+ struct lgsm_sms sms;
+
+ ptr = strchr(buf, '=');
+ fcomma = strchr(buf, ',');
+- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
+- sms.addr[fcomma-ptr-1] = '\0';
+- packing_7bit_character(fcomma+1, &sms);
++ if (!ptr || !fcomma) {
++ printf("Wrong command format\n");
++ } else {
++ strncpy(sms.addr, ptr+1, fcomma-ptr-1);
++ sms.addr[fcomma-ptr-1] = '\0';
++
++ /* todo define \" to allow " in text */
++ if (fcomma[1] == '"' &&
++ !strchr(fcomma+2, '"')) {
++ /* read until closing '"' */
++ rc = fscanf(stdin, "%[^\"]\"",
++ fcomma+strlen(fcomma));
++ if (rc == EOF) {
++ printf("EOF\n");
++ return -1;
++ }
++ /* remove brackets */
++ fcomma++;
++ fcomma[strlen(fcomma)] = '\0';
++ }
++
++ printf("Send SMS\n");
++ packing_7bit_character(fcomma+1, &sms);
+
+- lgsm_sms_send(lgsmh, &sms);
++ lgsm_sms_send(lgsmh, &sms);
++ }
+ } else if ( !strncmp(buf, "sw", 2)) {
+ printf("Write SMS\n");
+ struct lgsm_sms_write sms_write;
diff --git a/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch b/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch
new file mode 100644
index 000000000..560e72e38
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch
@@ -0,0 +1,133 @@
+From: Erin Yueh <erin_yueh@openmoko.com>
+Subject: [PATCH] SMS status report
+
+I made a patch for SMS status report. It can change SMS-Submit messages
+and ask for a status report. When the destination address receives our
+message, the service center will send a SMS-STATUS-REPORT to us. We can
+tell what messages we sent by TP-MR (message reference number) value and
+can know the sending result by TP-ST (Status) value from status report
+messages.
+
+PS. if you don't want to ask a status report, you can change this value
+back. Replace "GSMD_SMS_TP_SRR_STATUS_REQUEST" with
+"GSMD_SMS_TP_SRR_NOT_REQUEST".
+header[pos ++] =
+ GSMD_SMS_TP_MTI_SUBMIT |
+ (0 << 2) | /* Reject Duplicates: 0 */
+ GSMD_SMS_TP_VPF_NOT_PRESENT |
+- GSMD_SMS_TP_SRR_NOT_REQUEST |
++ GSMD_SMS_TP_SRR_STATUS_REQUEST |
+ (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
+ GSMD_SMS_TP_UDHI_NO_HEADER) |
+ GSMD_SMS_TP_RP_NOT_SET;
+
+Signed-off-by: Jim Huang <jserv@openmoko.org>
+---
+ src/gsmd/sms_pdu.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
+ src/util/event.c | 6 +++++-
+ 2 files changed, 48 insertions(+), 12 deletions(-)
+
+Index: gsm/src/gsmd/sms_pdu.c
+===================================================================
+--- gsm.orig/src/gsmd/sms_pdu.c 2007-09-06 11:14:34.000000000 +0800
++++ gsm/src/gsmd/sms_pdu.c 2007-09-17 23:39:20.000000000 +0800
+@@ -139,6 +139,17 @@
+ /* Skip TP-PID */
+ len -= 9;
+ src += 9;
++
++ /* TP-UDL */
++ dst->payload.length = src[0];
++ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
++
++ /* TP-UD */
++ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
++ return 1;
++ memcpy(dst->payload.data, src + 1, i);
++ dst->payload.data[i] = 0;
++
+ break;
+ case GSMD_SMS_TP_MTI_SUBMIT:
+ if (len < 4)
+@@ -179,23 +190,44 @@
+ src += vpf ? 3 : 2;
+
+ memset(dst->time_stamp, 0, 7);
++
++ /* TP-UDL */
++ dst->payload.length = src[0];
++ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
++
++ /* TP-UD */
++ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
++ return 1;
++ memcpy(dst->payload.data, src + 1, i);
++ dst->payload.data[i] = 0;
+ break;
+ case GSMD_SMS_TP_MTI_STATUS_REPORT:
+- /* TODO */
++ if (len < 3)
++ return 1;
++
++ /* TP-MR set it gsmd_sms_list.index*/
++ dst->index = (int) src[1];
++ /* TP-STATUS set it to coding_scheme */
++ dst->payload.coding_scheme = (int) src[len-1];
++ /* TP-RA */
++ i = sms_number_bytelen(src[3], src[2]);
++ if (len < 13 + i)
++ return 1;
++ if (sms_address2ascii(&dst->addr, src + 2))
++ return 1;
++ len -= 4 + i;
++ src += 4 + i;
++ /* TP-SCTS */
++ memcpy(dst->time_stamp, src, 7);
++ /* TP-UD */
++ dst->payload.length = 0;
++ dst->payload.data[0] = 0;
++ break;
+ default:
+ /* Unknown PDU type */
+ return 1;
+ }
+
+- /* TP-UDL */
+- dst->payload.length = src[0];
+- i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
+-
+- /* TP-UD */
+- if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
+- return 1;
+- memcpy(dst->payload.data, src + 1, i);
+- dst->payload.data[i] = 0;
+
+ return 0;
+ }
+@@ -215,7 +247,7 @@
+ GSMD_SMS_TP_MTI_SUBMIT |
+ (0 << 2) | /* Reject Duplicates: 0 */
+ GSMD_SMS_TP_VPF_NOT_PRESENT |
+- GSMD_SMS_TP_SRR_NOT_REQUEST |
++ GSMD_SMS_TP_SRR_STATUS_REQUEST |
+ (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
+ GSMD_SMS_TP_UDHI_NO_HEADER) |
+ GSMD_SMS_TP_RP_NOT_SET;
+Index: gsm/src/util/event.c
+===================================================================
+--- gsm.orig/src/util/event.c 2007-09-06 11:14:34.000000000 +0800
++++ gsm/src/util/event.c 2007-09-17 23:39:47.000000000 +0800
+@@ -128,8 +128,12 @@
+ static int inds_handler(struct lgsm_handle *lh, int evt,
+ struct gsmd_evt_auxdata *aux)
+ {
+- if (aux->u.ds.inlined)
++ if (aux->u.ds.inlined) {
++ struct gsmd_sms_list *sms;
++ sms = (struct gsmd_sms_list *) aux->data;
+ printf("EVENT: Incoming Status Report\n");
++ printf("message ref = %d, status = %d\n", sms->index,sms->payload.coding_scheme);
++ }
+ else
+ printf("EVENT: Incoming Status Report stored at location %i\n",
+ aux->u.ds.index);
diff --git a/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch b/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch
new file mode 100644
index 000000000..ea0f12daa
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch
@@ -0,0 +1,423 @@
+From: Sean Chiang <sean_chiang@openmoko.com>
+Subject: [PATCH] Improvement for find and read phonebooks in gsmd
+
+This patch is an improvement for find and read phonebooks.
+After clients make a request to find / read phonebooks, then clients
+should make a request to retrieve all the records.
+
+Signed-off-by: Jim Huang <jserv@openmoko.org>
+---
+ include/gsmd/gsmd.h | 3
+ include/gsmd/usock.h | 20 +++-
+ include/libgsmd/phonebook.h | 6 +
+ src/gsmd/usock.c | 184 +++++++++++++++++++++++++++++++++++-----
+ src/libgsmd/libgsmd_phonebook.c | 48 ++++++++++
+ 5 files changed, 238 insertions(+), 23 deletions(-)
+
+Index: gsm/include/libgsmd/phonebook.h
+===================================================================
+--- gsm.orig/include/libgsmd/phonebook.h 2007-08-31 16:15:29.000000000 +0800
++++ gsm/include/libgsmd/phonebook.h 2007-09-17 23:48:41.000000000 +0800
+@@ -106,4 +106,10 @@
+ /* Get the location range/nlength/tlength supported */
+ extern int lgsm_pb_get_support(struct lgsm_handle *lh);
+
++/* Retrieve the records of READRG request */
++extern int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num);
++
++/* Retrieve the records of FIND request */
++extern int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num);
++
+ #endif
+Index: gsm/include/gsmd/gsmd.h
+===================================================================
+--- gsm.orig/include/gsmd/gsmd.h 2007-08-31 16:15:29.000000000 +0800
++++ gsm/include/gsmd/gsmd.h 2007-09-17 23:48:41.000000000 +0800
+@@ -92,6 +92,9 @@
+ struct gsmd *gsmd;
+ struct gsmd_fd gfd; /* the socket */
+ u_int32_t subscriptions; /* bitmaks of subscribed event groups */
++
++ struct llist_head pb_readrg_list; /* our READRG phonebook list */
++ struct llist_head pb_find_list; /* our FIND phonebook list */
+ };
+
+ #define GSMD_DEBUG 1 /* debugging information */
+Index: gsm/include/gsmd/usock.h
+===================================================================
+--- gsm.orig/include/gsmd/usock.h 2007-08-31 16:15:29.000000000 +0800
++++ gsm/include/gsmd/usock.h 2007-09-17 23:48:56.000000000 +0800
+@@ -194,6 +194,8 @@
+ GSMD_PHONEBOOK_GET_SUPPORT = 6,
+ GSMD_PHONEBOOK_LIST_STORAGE = 7,
+ GSMD_PHONEBOOK_SET_STORAGE = 8,
++ GSMD_PHONEBOOK_RETRIEVE_READRG = 9,
++ GSMD_PHONEBOOK_RETRIEVE_FIND = 10,
+ };
+
+ /* Type-of-Address, Numbering-Plan-Identification field, GSM 03.40, 9.1.2.5 */
+@@ -431,7 +433,6 @@
+ char text[GSMD_PB_TEXT_MAXLEN+1];
+ } __attribute__ ((packed));
+
+-
+ /* Refer to GSM 07.07 subclause 8.13 */
+ /* FIXME: the tlength depends on SIM, use +CPBR=? to get */
+ struct gsmd_phonebook_find {
+@@ -471,8 +472,18 @@
+ char opname_longalpha[16];
+ };
+
++/* Refer to GSM 07.07 subclause 8.11 */
++struct gsmd_phonebook_mem {
++ u_int8_t type[3];
++ u_int8_t pad;
++ u_int16_t used;
++ u_int16_t total;
++} __attribute__ ((packed));
++
+ struct gsmd_phonebook_storage {
+- char storage[3];
++ /* FIXME the amount of phonebook storage should be dynamic */
++ u_int8_t num;
++ struct gsmd_phonebook_mem mem[20];
+ } __attribute__ ((packed));
+
+ /* Subscriber number information from 3GPP TS 07.07, Clause 7.1 */
+@@ -517,6 +528,11 @@
+ char buf[];
+ } __attribute__ ((packed));
+
++struct gsmd_phonebooks {
++ struct llist_head list;
++ struct gsmd_phonebook pb;
++} __attribute__ ((packed));
++
+ extern struct gsmd_ucmd *ucmd_alloc(int extra_size);
+ extern int usock_init(struct gsmd *g);
+ extern void usock_cmd_enqueue(struct gsmd_ucmd *ucmd, struct gsmd_user *gu);
+Index: gsm/src/libgsmd/libgsmd_phonebook.c
+===================================================================
+--- gsm.orig/src/libgsmd/libgsmd_phonebook.c 2007-08-31 16:15:29.000000000 +0800
++++ gsm/src/libgsmd/libgsmd_phonebook.c 2007-09-17 23:48:41.000000000 +0800
+@@ -33,7 +33,7 @@
+ gmh->data[2] = '\0';
+
+ rc = lgsm_send(lh, gmh);
+- if (rc < gmh->len + 3) {
++ if (rc < gmh->len + sizeof(*gmh)) {
+ lgsm_gmh_free(gmh);
+ return -EIO;
+ }
+@@ -177,3 +177,49 @@
+ {
+ return lgsm_send_simple(lh, GSMD_MSG_PHONEBOOK, GSMD_PHONEBOOK_GET_SUPPORT);
+ }
++
++int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num)
++{
++ struct gsmd_msg_hdr *gmh;
++ int rc;
++
++ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
++ GSMD_PHONEBOOK_RETRIEVE_READRG, sizeof(int));
++ if (!gmh)
++ return -ENOMEM;
++
++ *(int *)(gmh->data) = num;
++
++ rc = lgsm_send(lh, gmh);
++ if (rc < gmh->len + sizeof(*gmh)) {
++ lgsm_gmh_free(gmh);
++ return -EIO;
++ }
++
++ lgsm_gmh_free(gmh);
++
++ return 0;
++}
++
++int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num)
++{
++ struct gsmd_msg_hdr *gmh;
++ int rc;
++
++ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
++ GSMD_PHONEBOOK_RETRIEVE_FIND, sizeof(int));
++ if (!gmh)
++ return -ENOMEM;
++
++ *(int *)(gmh->data) = num;
++
++ rc = lgsm_send(lh, gmh);
++ if (rc < gmh->len + sizeof(*gmh)) {
++ lgsm_gmh_free(gmh);
++ return -EIO;
++ }
++
++ lgsm_gmh_free(gmh);
++
++ return 0;
++}
+Index: gsm/src/gsmd/usock.c
+===================================================================
+--- gsm.orig/src/gsmd/usock.c 2007-08-31 16:15:30.000000000 +0800
++++ gsm/src/gsmd/usock.c 2007-09-17 23:53:34.000000000 +0800
+@@ -1035,21 +1035,56 @@
+
+ static int phonebook_find_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
+ {
+- struct gsmd_user *gu = ctx;
+- struct gsmd_ucmd *ucmd;
+-
++ struct gsmd_user *gu = ctx;
++ struct gsmd_ucmd *ucmd;
++ struct gsmd_phonebooks *gps;
++ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
++ int *num;
++
+ DEBUGP("resp: %s\n", resp);
+
+- /* FIXME: using link list, also we need to handle the case of
+- * no query result */
+- ucmd = gsmd_ucmd_fill(strlen(resp) + 1, GSMD_MSG_PHONEBOOK,
++ /*
++ * [+CPBF: <index1>,<number>,<type>,<text>[[...]
++ * <CR><LF>+CPBF: <index2>,<unmber>,<type>,<text>]]
++ */
++ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
+ GSMD_PHONEBOOK_FIND, 0);
+ if (!ucmd)
+ return -ENOMEM;
+
+- strcpy(ucmd->buf, resp);
++ num = (int*) ucmd->buf;
++
++ *num = 0;
++
++ ptr1 = strtok(resp, "\n");
++
++ while (ptr1) {
++ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
++ ptr2 = strchr(ptr1, ' ');
++ gps->pb.index = atoi(ptr2+1);
++
++ fcomma = strchr(ptr1, '"');
++ lcomma = strchr(fcomma+1, '"');
++ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
++ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
++
++ gps->pb.type = atoi(lcomma + 2);
++
++ ptr2 = strrchr(ptr1, ',');
++ fcomma = ptr2 + 1;
++ lcomma = strchr(fcomma + 1, '"');
++ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
++ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
++
++ llist_add_tail(&gps->list, &gu->pb_find_list);
++
++ (*num)++;
++
++ ptr1 = strtok(NULL, "\n");
++ }
+
+ usock_cmd_enqueue(ucmd, gu);
++
+ return 0;
+ }
+
+@@ -1102,22 +1137,51 @@
+ {
+ struct gsmd_user *gu = ctx;
+ struct gsmd_ucmd *ucmd;
++ struct gsmd_phonebooks *gps;
++ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
++ int *num;
+
+ DEBUGP("resp: %s\n", resp);
+
+ /*
+- * +CPBR: 4,"1234",129,"6C5F745E7965"
+- * +CPBR: 5,"5678",129,"800062115BB6"
+- * +CPBR: 6,"7890",129,"810280AA591A"
+- * +CPBR: 8,"36874",129,"005300650061006E"
+- *
++ * [+CPBR: <index1>,<number>,<type>,<text>[[...]
++ * <CR><LF>+CPBR: <index2>,<unmber>,<type>,<text>]]
+ */
+- ucmd = gsmd_ucmd_fill(strlen(resp)+1, GSMD_MSG_PHONEBOOK,
++ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
+ GSMD_PHONEBOOK_READRG, 0);
+ if (!ucmd)
+ return -ENOMEM;
+
+- strcpy(ucmd->buf, resp);
++ num = (int*) ucmd->buf;
++
++ *num = 0;
++
++ ptr1 = strtok(resp, "\n");
++
++ while(ptr1) {
++ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
++ ptr2 = strchr(ptr1, ' ');
++ gps->pb.index = atoi(ptr2+1);
++
++ fcomma = strchr(ptr1, '"');
++ lcomma = strchr(fcomma+1, '"');
++ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
++ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
++
++ gps->pb.type = atoi(lcomma + 2);
++
++ ptr2 = strrchr(ptr1, ',');
++ fcomma = ptr2 + 1;
++ lcomma = strchr(fcomma + 1, '"');
++ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
++ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
++
++ llist_add_tail(&gps->list, &gu->pb_readrg_list);
++
++ (*num)++;
++
++ ptr1 = strtok(NULL, "\n");
++ }
+
+ usock_cmd_enqueue(ucmd, gu);
+
+@@ -1209,22 +1273,38 @@
+ static int phonebook_list_storage_cb(struct gsmd_atcmd *cmd,
+ void *ctx, char *resp)
+ {
+- /* +CPBS: ("EN","BD","FD","DC","LD","RC","LR","MT","AD",
+- * "SM","SD","MC","LM","AF","ON","UD") */
+ /* TODO; using link list ; need to handle command error */
+ struct gsmd_user *gu = ctx;
+ struct gsmd_ucmd *ucmd;
++ struct gsmd_phonebook_storage *gps;
++ char *ptr;
+
+ DEBUGP("resp: %s\n", resp);
+
+- ucmd = gsmd_ucmd_fill(strlen(resp) + 1,
++ /*
++ * +CPBS: (<storage>s)
++ */
++
++ ucmd = gsmd_ucmd_fill(sizeof(*gps),
+ GSMD_MSG_PHONEBOOK,
+ GSMD_PHONEBOOK_LIST_STORAGE, 0);
+
+ if (!ucmd)
+ return -ENOMEM;
+
+- strcpy(ucmd->buf, resp);
++ gps = (struct gsmd_phonebook_storage *) ucmd->buf;
++ gps->num = 0;
++
++ if (!strncmp(resp, "+CPBS", 5)) {
++ char* delim = "(,";
++ ptr = strpbrk(resp, delim);
++ while ( ptr ) {
++ strncpy(gps->mem[gps->num].type, ptr+2, 2);
++ gps->mem[gps->num].type[2] = '\0';
++ ptr = strpbrk(ptr+2, delim);
++ gps->num++;
++ }
++ }
+
+ usock_cmd_enqueue(ucmd, gu);
+
+@@ -1235,11 +1315,13 @@
+ struct gsmd_msg_hdr *gph,int len)
+ {
+ struct gsmd_atcmd *cmd = NULL;
++ struct gsmd_ucmd *ucmd = NULL;
+ struct gsmd_phonebook_readrg *gpr;
+ struct gsmd_phonebook *gp;
+ struct gsmd_phonebook_find *gpf;
+- int *index;
+- int atcmd_len;
++ struct gsmd_phonebooks *cur, *cur2;
++ int *index, *num;
++ int atcmd_len, i;
+ char *storage;
+ char buf[1024];
+
+@@ -1343,6 +1425,66 @@
+ cmd = atcmd_fill("AT+CPBR=?", 9+1,
+ &phonebook_get_support_cb, gu, gph->id);
+ break;
++ case GSMD_PHONEBOOK_RETRIEVE_READRG:
++ if (len < sizeof(*gph) + sizeof(int))
++ return -EINVAL;
++
++ num = (int *) ((void *)gph + sizeof(*gph));
++
++ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num),
++ GSMD_MSG_PHONEBOOK,
++ GSMD_PHONEBOOK_RETRIEVE_READRG, 0);
++ if (!ucmd)
++ return -ENOMEM;
++
++ gp = (struct gsmd_phonebook*) ucmd->buf;
++
++ if (!llist_empty(&gu->pb_readrg_list)) {
++
++ llist_for_each_entry_safe(cur, cur2,
++ &gu->pb_readrg_list, list) {
++ gp->index = cur->pb.index;
++ strcpy(gp->numb, cur->pb.numb);
++ gp->type = cur->pb.type;
++ strcpy(gp->text, cur->pb.text);
++ gp++;
++
++ llist_del(&cur->list);
++ free(cur);
++ }
++ }
++
++ usock_cmd_enqueue(ucmd, gu);
++
++ break;
++ case GSMD_PHONEBOOK_RETRIEVE_FIND:
++ if (len < sizeof(*gph) + sizeof(int))
++ return -EINVAL;
++
++ num = (int *) ((void *)gph + sizeof(*gph));
++
++ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num), GSMD_MSG_PHONEBOOK,
++ GSMD_PHONEBOOK_RETRIEVE_FIND, 0);
++ if (!ucmd)
++ return -ENOMEM;
++
++ gp = (struct gsmd_phonebook*) ucmd->buf;
++
++ if (!llist_empty(&gu->pb_find_list)) {
++ llist_for_each_entry_safe(cur, cur2, &gu->pb_find_list, list) {
++ gp->index = cur->pb.index;
++ strcpy(gp->numb, cur->pb.numb);
++ gp->type = cur->pb.type;
++ strcpy(gp->text, cur->pb.text);
++ gp++;
++
++ llist_del(&cur->list);
++ free(cur);
++ }
++ }
++
++ usock_cmd_enqueue(ucmd, gu);
++ break;
+ default:
+ return -EINVAL;
+ }
+@@ -1468,6 +1610,8 @@
+ newuser->gsmd = g;
+ newuser->subscriptions = 0xffffffff;
+ INIT_LLIST_HEAD(&newuser->finished_ucmds);
++ INIT_LLIST_HEAD(&newuser->pb_readrg_list);
++ INIT_LLIST_HEAD(&newuser->pb_find_list);
+
+ llist_add(&newuser->list, &g->users);
+ gsmd_register_fd(&newuser->gfd);
diff --git a/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch b/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
new file mode 100644
index 000000000..db07a5df3
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
@@ -0,0 +1,264 @@
+From: Sean Chiang <sean_chiang@openmoko.com>
+Subject: [PATCH] improvement for find and read phonebooks in shell
+
+This patch improves the functions to find and read phonebooks in shell.
+
+Besides prr and pf, I add two new commands pRr and pRf to retrieve the
+phonebook.
+
+Signed-off-by: Jim Huang <jserv@openmoko.org>
+
+Index: gsm/src/util/shell.c
+===================================================================
+--- gsm.orig/src/util/shell.c 2007-09-17 23:57:51.000000000 +0800
++++ gsm/src/util/shell.c 2007-09-17 23:59:04.000000000 +0800
+@@ -34,8 +34,6 @@
+ #include <gsmd/usock.h>
+ #include <gsmd/ts0705.h>
+
+-#include <common/linux_list.h>
+-
+ #ifndef __GSMD__
+ #define __GSMD__
+ #include <gsmd/talloc.h>
+@@ -43,9 +41,8 @@
+ #endif
+
+ #define STDIN_BUF_SIZE 1024
+-
+-static LLIST_HEAD(storage_list);
+-static LLIST_HEAD(phonebook_list);
++static int nFIND = 0;
++static int nREADRG = 0;
+
+ /* this is the handler for receiving passthrough responses */
+ static int pt_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
+@@ -62,46 +59,23 @@
+ struct gsmd_phonebook_storage *gpst;
+ char *payload;
+ char *fcomma, *lcomma, *ptr = NULL;
++ int *num;
+ char buf[128];
++ int i;
+
+ switch (gmh->msg_subtype) {
+-#if 0
+ case GSMD_PHONEBOOK_FIND:
++ num = (int *) ((char *)gmh + sizeof(*gmh));
++ printf("Records:%d\n", *num);
++
++ nFIND = *num;
++ break;
+ case GSMD_PHONEBOOK_READRG:
+- payload = (char *)gmh + sizeof(*gmh);
++ num = (int *) ((char *)gmh + sizeof(*gmh));
++ printf("Records:%d\n", *num);
+
+- if (!strncmp(payload, "+CPBR", 5) ||
+- !strncmp(payload, "+CPBF", 5)) {
+- gp = (struct gsmd_phonebook *) malloc(sizeof(struct gsmd_phonebook));
+- ptr = strchr(payload, ' ');
+- gp->index = atoi(ptr+1);
+-
+- fcomma = strchr(payload, '"');
+- lcomma = strchr(fcomma+1, '"');
+- strncpy(gp->numb, fcomma + 1, (lcomma-fcomma-1));
+- gp->numb[(lcomma - fcomma) - 1] = '\0';
+-
+- gp->type = atoi(lcomma + 2);
+-
+- ptr = strrchr(payload, ',');
+- fcomma = ptr + 1;
+- lcomma = strchr(fcomma + 1, '"');
+- strncpy(gp->text, fcomma + 1, (lcomma - fcomma - 1));
+- gp->text[(lcomma - fcomma) - 1] = '\0';
+-
+- llist_add_tail(&gp->list, &phonebook_list);
+-
+-#if 0
+- llist_for_each_entry(gp, &phonebook_list, list) {
+- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
+- }
+-#endif
+- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
+- }
+- else
+- printf("%s\n", payload);
++ nREADRG = *num;
+ break;
+-#endif
+ case GSMD_PHONEBOOK_READ:
+ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
+ if (gp->index)
+@@ -115,48 +89,18 @@
+ gps = (struct gsmd_phonebook_support *) ((char *)gmh + sizeof(*gmh));
+ printf("(1-%d), %d, %d\n", gps->index, gps->nlength, gps->tlength);
+ break;
+-#if 0
+- case GSMD_PHONEBOOK_LIST_STORAGE:
+- payload = (char *)gmh + sizeof(*gmh);
+
+- if (!strncmp(payload, "+CPBS", 5)) {
+- char* delim = "(,";
+- struct gsmd_phonebook_storage *cur, *cur2;
+-
+- /* Remove previous record */
+- if (!llist_empty(&storage_list)) {
+- llist_for_each_entry_safe(cur, cur2,
+- &storage_list, list) {
+- llist_del(&cur->list);
+- talloc_free(cur);
+- }
+- }
+-
+- ptr = strpbrk(payload, delim);
+-
+- while ( ptr ) {
+- gpst = (struct gsmd_phonebook_storage *) malloc(sizeof(struct gsmd_phonebook_storage));
+- strncpy(gpst->storage, ptr+2, 2);
+- gpst->storage[2] = '\0';
+-
+- ptr = strpbrk(ptr+2, delim);
+-
+- llist_add_tail(&gpst->list, &storage_list);
+- }
++ case GSMD_PHONEBOOK_LIST_STORAGE:
++ gpst = (struct gsmd_phonebook_storage *)((char *)gmh + sizeof(*gmh));
+
+- if (llist_empty(&storage_list))
+- return 0;
++ for (i = 0; i < gpst->num; i++) {
++ printf("%s, ", gpst->mem[i].type);
++ }
+
+- llist_for_each_entry(cur, &storage_list, list) {
+- printf("\n%s",cur->storage);
+- }
++ printf("\n");
+
+- printf("\n");
+- }
+- else
+- printf("%s\n", payload);
+ break;
+-#endif
++
+ case GSMD_PHONEBOOK_WRITE:
+ case GSMD_PHONEBOOK_DELETE:
+ case GSMD_PHONEBOOK_SET_STORAGE:
+@@ -164,6 +108,26 @@
+ payload = (char *)gmh + sizeof(*gmh);
+ printf("%s\n", payload);
+ break;
++ case GSMD_PHONEBOOK_RETRIEVE_READRG:
++ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
++
++ for (i=0; i<nREADRG; i++) {
++ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
++ gp++;
++ }
++
++ nREADRG = 0;
++ break;
++ case GSMD_PHONEBOOK_RETRIEVE_FIND:
++ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
++
++ for (i = 0; i < nFIND; i++) {
++ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
++ gp++;
++ }
++
++ nFIND = 0;
++ break;
+ default:
+ return -EINVAL;
+ }
+@@ -381,11 +345,13 @@
+ "\tpd\tPB Delete (pb=index)\n"
+ "\tpr\tPB Read (pr=index)\n"
+ "\tprr\tPB Read Range (prr=index1,index2)\n"
+- "\tpf\tPB Find (pff=indtext)\n"
++ "\tpf\tPB Find (pf=indtext)\n"
+ "\tpw\tPB Write (pw=index,number,text)\n"
+ "\tps\tPB Support\n"
+ "\tpm\tPB Memory\n"
+ "\tpp\tPB Set Memory (pp=storage)\n"
++ "\tpRr\tRetrieve Readrg Records\n"
++ "\tpRf\tRetrieve Find Records\n"
+ "\tsd\tSMS Delete (sd=index,delflg)\n"
+ "\tsl\tSMS List (sl=stat)\n"
+ "\tsr\tSMS Read (sr=index)\n"
+@@ -509,48 +475,21 @@
+ printf("Delete Phonebook Entry\n");
+ ptr = strchr(buf, '=');
+ lgsm_pb_del_entry(lgsmh, atoi(ptr+1));
+-#if 0
+ } else if ( !strncmp(buf, "prr", 3)) {
+ printf("Read Phonebook Entries\n");
+ struct lgsm_phonebook_readrg pb_readrg;
+- struct gsmd_phonebook *gp_cur, *gp_cur2;
+-
+- /* Remove records */
+- if (!llist_empty(&phonebook_list)) {
+- llist_for_each_entry_safe(gp_cur,
+- gp_cur2,
+- &phonebook_list,
+- list) {
+- llist_del(&gp_cur->list);
+- talloc_free(gp_cur);
+- }
+- }
+
+ ptr = strchr(buf, '=');
+ pb_readrg.index1 = atoi(ptr+1);
+ ptr = strchr(buf, ',');
+ pb_readrg.index2 = atoi(ptr+1);
+ lgsm_pb_read_entries(lgsmh, &pb_readrg);
+-#endif
+ } else if ( !strncmp(buf, "pr", 2)) {
+ ptr = strchr(buf, '=');
+ lgsm_pb_read_entry(lgsmh, atoi(ptr+1));
+-#if 0
+ } else if ( !strncmp(buf, "pf", 2)) {
+ printf("Find Phonebook Entry\n");
+ struct lgsm_phonebook_find pb_find;
+- struct gsmd_phonebook *gp_cur, *gp_cur2;
+-
+- /* Remove records */
+- if (!llist_empty(&phonebook_list)) {
+- llist_for_each_entry_safe(gp_cur,
+- gp_cur2,
+- &phonebook_list,
+- list) {
+- llist_del(&gp_cur->list);
+- talloc_free(gp_cur);
+- }
+- }
+
+ ptr = strchr(buf, '=');
+ strncpy(pb_find.findtext,
+@@ -559,7 +498,6 @@
+ pb_find.findtext[strlen(ptr+1)] = '\0';
+
+ lgsm_pb_find_entry(lgsmh, &pb_find);
+-#endif
+ } else if ( !strncmp(buf, "pw", 2)) {
+ printf("Write Phonebook Entry\n");
+ struct lgsm_phonebook pb;
+@@ -591,6 +529,16 @@
+ } else if ( !strncmp(buf, "ps", 2)) {
+ printf("Get Phonebook Support\n");
+ lgsm_pb_get_support(lgsmh);
++ } else if( !strncmp(buf, "pRr", 3) ) {
++ printf("Retrieve Readrg Records\n");
++
++ if ( nREADRG )
++ lgsm_pb_retrieve_readrg(lgsmh, nREADRG);
++ } else if( !strncmp(buf, "pRf", 3) ) {
++ printf("Retrieve Find Records\n");
++
++ if ( nFIND )
++ lgsm_pb_retrieve_find(lgsmh, nFIND);
+ } else if ( !strncmp(buf, "sd", 2)) {
+ printf("Delete SMS\n");
+ struct lgsm_sms_delete sms_del;
diff --git a/meta/recipes-connectivity/gsm/files/default b/meta/recipes-connectivity/gsm/files/default
new file mode 100644
index 000000000..6ef4f6db5
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/default
@@ -0,0 +1,59 @@
+# gsmd This shell script configures for the gsmd init script.
+
+. /etc/init.d/functions
+
+case `machine_id` in
+ "gta01"|"gta02")
+ GSMD_OPTS="-s 115200 -F"
+ if [ -d '/sys/bus/platform/devices/gta01-pm-gsm.0' ] ; then
+ GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+ GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
+ else
+ GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
+ GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset"
+ fi
+ GSM_DEV="/dev/ttySAC0"
+ GSM_DL="/sys/devices/platform/neo1973-pm-gsm.0/download"
+ ;;
+ "htc_apache"|"htc_blueangel"|"htc_universal")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "htc_himalaya")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS2"
+ ;;
+ "htc_magician")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS1"
+ ;;
+ "palm_treo_650")
+ GSMD_OPTS="-s 460800 -F -w 1"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "motorola_ezx_platform")
+ GSMD_OPTS="-s 115200 -F -v ti"
+ GSM_DEV="/dev/mux0"
+ ;;
+ "omap3430_ldp_board")
+ # Need a machine for the Zoom modem, but this will do
+ GSMD_OPTS="-s 460800 -F -v ti -m gta01"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ *)
+ # Unknown board
+
+ # If you must specify special options, uncomment and modify the next line
+ #GSMD_OPTS="-s 115200 -F"
+
+ # If your GSM device needs to be powered up, uncomment and modify the next line
+ #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+
+ # If your GSM device then needs to be reset, uncomment and modify the next line
+ #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
+
+ # This should be in a common /etc/default/serial, together with
+ # BT_DEV and IR_DEV for devices that have those on a serial port
+ #GSM_DEV="/dev/ttyS1"
+ ;;
+esac
diff --git a/meta/recipes-connectivity/gsm/files/fix_machine_init.patch b/meta/recipes-connectivity/gsm/files/fix_machine_init.patch
new file mode 100644
index 000000000..808bb17b4
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/fix_machine_init.patch
@@ -0,0 +1,23 @@
+Index: src/gsmd/gsmd.c
+===================================================================
+--- a/src/gsmd/gsmd.c (revision 4304)
++++ b/src/gsmd/gsmd.c (working copy)
+@@ -196,13 +196,13 @@
+
+ sms_cb_init(gsmd);
+
+- if (gsmd->vendorpl && gsmd->vendorpl->initsettings){
++ if (gsmd->vendorpl && gsmd->vendorpl->initsettings)
+ rc |= gsmd->vendorpl->initsettings(gsmd);
++
++ if (gsmd->machinepl && gsmd->machinepl->initsettings)
+ rc |= gsmd->machinepl->initsettings(gsmd);
+- return rc;
+- }
+- else
+- return rc;
++
++ return rc;
+ }
+
+ static int firstcmd_response = 0;
diff --git a/meta/recipes-connectivity/gsm/files/gsmd b/meta/recipes-connectivity/gsm/files/gsmd
new file mode 100644
index 000000000..dc10e6309
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/gsmd
@@ -0,0 +1,47 @@
+#! /bin/sh
+#
+# gsmd This shell script starts and stops gsmd.
+#
+# chkconfig: 345 90 40
+# description: Gsmd manages access to a serial- or USB-connected GSM
+# processname: gsmd
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+[ -f /etc/default/gsmd ] && . /etc/default/gsmd
+
+case "$1" in
+ start)
+ [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
+ [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
+ [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
+ [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
+
+ echo -n "Starting GSM daemon: "
+ start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog
+
+ if [ $? = 0 ]; then
+ echo "gsmd."
+ else
+ echo "(failed.)"
+ fi
+ ;;
+ stop)
+ [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
+
+ echo -n "Stopping GSM daemon: "
+ start-stop-daemon -K -x /usr/sbin/gsmd
+ echo "gsmd."
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/gsm/files/install-ts-headers.patch b/meta/recipes-connectivity/gsm/files/install-ts-headers.patch
new file mode 100644
index 000000000..88e3b6dd1
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/install-ts-headers.patch
@@ -0,0 +1,11 @@
+Index: gsm/include/gsmd/Makefile.am
+===================================================================
+--- gsm.orig/include/gsmd/Makefile.am 2007-10-29 21:05:57.000000000 +0100
++++ gsm/include/gsmd/Makefile.am 2007-10-29 21:06:03.000000000 +0100
+@@ -1,4 +1,4 @@
+
+-pkginclude_HEADERS = event.h usock.h
++pkginclude_HEADERS = event.h ts0705.h ts0707.h usock.h
+
+-noinst_HEADERS = atcmd.h gsmd.h select.h ts0705.h ts0707.h unsolicited.h usock.h vendorplugin.h
++noinst_HEADERS = atcmd.h gsmd.h select.h unsolicited.h usock.h vendorplugin.h
diff --git a/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch b/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch
new file mode 100644
index 000000000..00ba3a454
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch
@@ -0,0 +1,11 @@
+--- gsm/src/libgsmd/libgsmd.c.orig 2007-09-25 00:41:56.000000000 -0500
++++ gsm/src/libgsmd/libgsmd.c 2007-09-25 00:43:44.000000000 -0500
+@@ -210,7 +210,7 @@
+ pos += rc;
+ }
+ }
+- return 0;
++ return (sizeof(*gmh) + gmh->len);
+ }
+
+ struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
diff --git a/meta/recipes-connectivity/gsm/gsmd.inc b/meta/recipes-connectivity/gsm/gsmd.inc
new file mode 100644
index 000000000..a69fdd90f
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/gsmd.inc
@@ -0,0 +1,93 @@
+DESCRIPTION = "GSM libraries and daemons implementing the 07.10 specification"
+HOMEPAGE = "http://www.openmoko.org"
+LICENSE = "GPL LGPL"
+SECTION = "libs/gsm"
+PROVIDES += "gsmd"
+RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
+PV = "0.1+svnr${SRCREV}"
+PR = "r47"
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
+ file://fix_machine_init.patch;patch=1 \
+ file://gsmd \
+ file://default"
+S = "${WORKDIR}/gsm"
+
+inherit autotools pkgconfig update-rc.d
+# handle update-rc.d RDEPENDS manually, we don't need it on
+# anything but gsmd
+RDEPENDS_append = ""
+
+INITSCRIPT_NAME = "gsmd"
+INITSCRIPT_PARAMS = "defaults 35"
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/
+ install -d ${D}/${sysconfdir}/default
+ install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd
+}
+
+PACKAGES =+ "\
+ ${PN}-tools \
+ ${BASEPN}-plugins \
+ ${BASEPN}-plugin-machine-generic \
+ ${BASEPN}-plugin-machine-tihtc \
+ ${BASEPN}-plugin-machine-gta01 \
+ ${BASEPN}-plugin-vendor-bcm \
+ ${BASEPN}-plugin-vendor-qc \
+ ${BASEPN}-plugin-vendor-ti \
+ ${BASEPN}-plugin-vendor-tihtc \
+"
+
+ALLOW_EMPTY_${BASEPN}-plugin-machine-gta01 = "1"
+
+RDEPENDS_${BASEPN}-plugins = "\
+ ${BASEPN}-plugin-machine-generic \
+ ${BASEPN}-plugin-machine-tihtc \
+ ${BASEPN}-plugin-machine-gta01 \
+ ${BASEPN}-plugin-vendor-bcm \
+ ${BASEPN}-plugin-vendor-qc \
+ ${BASEPN}-plugin-vendor-ti \
+ ${BASEPN}-plugin-vendor-tihtc \
+"
+
+RDEPENDS_${PN} += "update-rc.d initscripts"
+RRECOMMENDS_${PN} += "${BASEPN}-plugins"
+
+FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*"
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${BASEPN}-plugins = ""
+FILES_${BASEPN}-plugin-machine-generic = "${libdir}/gsmd/libgsmd-machine_generic.so*"
+FILES_${BASEPN}-plugin-machine-tihtc = "${libdir}/gsmd/libgsmd-machine_tihtc.so*"
+FILES_${BASEPN}-plugin-machine-gta01 = "${libdir}/gsmd/libgsmd-machine_gta01.so*"
+FILES_${BASEPN}-plugin-vendor-qc = "${libdir}/gsmd/libgsmd-vendor_qc.so*"
+FILES_${BASEPN}-plugin-vendor-bcm = "${libdir}/gsmd/libgsmd-vendor_bcm.so*"
+FILES_${BASEPN}-plugin-vendor-ti = "${libdir}/gsmd/libgsmd-vendor_ti.so*"
+FILES_${BASEPN}-plugin-vendor-tihtc = "${libdir}/gsmd/libgsmd-vendor_tihtc.so*"
+
+PACKAGES_DYNAMIC = "lib${BASEPN}* ${BASEPN}"
+
+ALLOW_EMPTY_${BASEPN}-plugins = "1"
+
+RCONFLICTS_lib${BASEPN} = "lib${CONFLICTNAME}"
+RCONFLICTS_${BASEPN} = "${CONFLICTNAME}"
+RCONFLICTS_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
+RCONFLICTS_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
+RCONFLICTS_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
+RCONFLICTS_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
+RCONFLICTS_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
+RCONFLICTS_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
+RCONFLICTS_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
+RCONFLICTS_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
+
+RPROVIDES_lib${BASEPN} += "lib${CONFLICTNAME}"
+RPROVIDES_${BASEPN} = "${CONFLICTNAME}"
+RPROVIDES_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
+RPROVIDES_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
+RPROVIDES_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
+RPROVIDES_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
+RPROVIDES_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
+RPROVIDES_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
+RPROVIDES_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
+RPROVIDES_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
diff --git a/meta/recipes-connectivity/gsm/libgsmd_svn.bb b/meta/recipes-connectivity/gsm/libgsmd_svn.bb
new file mode 100644
index 000000000..9d3ca19c0
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/libgsmd_svn.bb
@@ -0,0 +1,5 @@
+BASEPN = "gsmd"
+CONFLICTNAME = "gsmd-devel"
+
+require gsmd.inc
+
diff --git a/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
new file mode 100644
index 000000000..67dc6f5a3
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
@@ -0,0 +1,61 @@
+# borrow from OE, to handle cross compile mess
+#
+# ktian1, 06/28/2010
+Index: iproute2-2.6.34/configure
+===================================================================
+--- iproute2-2.6.34.orig/configure
++++ iproute2-2.6.34/configure
+@@ -4,7 +4,7 @@
+ INCLUDE=${1:-"$PWD/include"}
+
+ TABLES=
+-
++SYSROOT=$1
+ check_atm()
+ {
+ cat >/tmp/atmtest.c <<EOF
+@@ -15,7 +15,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
++$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "TC_CONFIG_ATM:=y" >>Config
+@@ -49,7 +49,7 @@ int main(int argc, char **argv)
+
+ EOF
+
+-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
++if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
+ then
+ echo "TC_CONFIG_XT:=y" >>Config
+ echo "using xtables"
+@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
+ }
+
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+
+ if [ $? -eq 0 ]
+ then
+@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
+ }
+
+ EOF
+-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
+
+ if [ $? -eq 0 ]
+ then
+@@ -150,7 +150,7 @@ check_ipt()
+ check_ipt_lib_dir()
+ {
+ IPT_LIB_DIR=""
+- for dir in /lib /usr/lib /usr/local/lib
++ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
+ do
+ for file in $dir/$TABLES/lib*t_*so ; do
+ if [ -f $file ]; then
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
new file mode 100644
index 000000000..7246b87e9
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "kernel routing and traffic control utilities"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+ file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93"
+DEPENDS = "flex-native bison-native"
+
+inherit update-alternatives
+
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install
+ mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
+ install -d ${D}${datadir}
+ mv ${D}/share/* ${D}${datadir}/ || true
+ rm ${D}/share -rf || true
+}
+
+FILES_${PN} += "/usr/lib/tc/*"
+FILES_${PN}-dbg += "/usr/lib/tc/.debug"
+
+ALTERNATIVE_NAME = "ip"
+ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2"
+ALTERNATIVE_LINK = "${base_bindir}/ip"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
new file mode 100644
index 000000000..c5e0ef6e5
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
@@ -0,0 +1,6 @@
+require iproute2.inc
+
+PR = "r0"
+
+SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
+ file://configure-cross.patch"
diff --git a/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch b/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch
new file mode 100644
index 000000000..d910daab1
--- /dev/null
+++ b/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch
@@ -0,0 +1,18 @@
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- libetpan-0.54.orig/configure.ac
++++ libetpan-0.54/configure.ac
+@@ -104,10 +104,11 @@ if test "$have_w32_system" = yes; then
+ fi
+ AM_CONDITIONAL(HAVE_MINGW32_SYSTEM, test "$have_w32_system" = yes)
+
+ # Check the C compiler.
+ AC_PROG_CC
++AC_PROG_CXX
+
+ # Compiler flags.
+ AC_ARG_ENABLE(debug, [ --enable-debug setup flags (gcc) for debugging (default=no)],
+ if test "x$GCC" = xyes; then
+ CFLAGS="$CFLAGS -O2 -g"
diff --git a/meta/recipes-connectivity/libetpan/libetpan_0.54.bb b/meta/recipes-connectivity/libetpan/libetpan_0.54.bb
new file mode 100644
index 000000000..5666ea0de
--- /dev/null
+++ b/meta/recipes-connectivity/libetpan/libetpan_0.54.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "libetpan is a library for communicating with mail and news servers. \
+It supports the protocols SMTP, POP3, IMAP and NNTP."
+HOMEPAGE = "http://www.etpan.org"
+SECTION = "libs"
+DEPENDS = "curl expat gnutls"
+LICENSE = "BSD"
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libetpan/libetpan-${PV}.tar.gz \
+ file://cxx-is-here.patch;patch=1"
+
+inherit autotools pkgconfig gettext binconfig
+
+EXTRA_OECONF = "--without-openssl --with-gnutls --disable-db"
+
+PARALLEL_MAKE = ""
+
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev = "${bindir} ${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libdir}/pkgconfig"
diff --git a/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch b/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch
new file mode 100644
index 000000000..11d4655e1
--- /dev/null
+++ b/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch
@@ -0,0 +1,11 @@
+--- nss-mdns-0.6/src/nss.c.orig 2005-09-25 17:27:51 +0200
++++ nss-mdns-0.6/src/nss.c 2005-09-25 17:28:55 +0200
+@@ -456,6 +456,8 @@
+ result->h_addrtype = af;
+ result->h_length = address_length;
+
++ idx+=(sizeof(char*)-idx%sizeof(char*)); /* Align on 32 bit boundary */
++
+ /* Check if there's enough space for the addresses */
+ if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)) {
+ *errnop = ERANGE;
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
new file mode 100644
index 000000000..69eaa33d6
--- /dev/null
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "NSS module for Multicast DNS name resolution"
+HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
+SECTION = "libs"
+PRIORITY = "optional"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+DEPENDS = "avahi"
+RDEPENDS = "avahi-daemon"
+PR = "r0"
+
+SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
+S = "${WORKDIR}/nss-mdns-${PV}"
+
+inherit autotools
+
+# suppress warning, but don't bother with autonamer
+LEAD_SONAME = "libnss_mdns.so"
+DEBIANNAME_${PN} = "libnss-mdns"
+
+EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
+
+pkg_postinst () {
+ cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
+ cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
+ mv /tmp/nsswitch.conf /etc/nsswitch.conf
+ }
+}
+
+pkg_prerm () {
+ cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
+ cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
+ mv /tmp/nsswitch.conf /etc/nsswitch.conf
+ }
+}
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
new file mode 100644
index 000000000..71fd8b989
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
@@ -0,0 +1,165 @@
+diff -ruN libpcap-1.1.1-orig/aclocal.m4 libpcap-1.1.1/aclocal.m4
+--- libpcap-1.1.1-orig/aclocal.m4 2010-06-29 10:46:32.815117569 +0800
++++ libpcap-1.1.1/aclocal.m4 2010-06-29 10:49:17.150149949 +0800
+@@ -37,7 +37,7 @@
+ dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
+ dnl and AC_LBL_C_INIT at the top level.
+ dnl
+-AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
++AC_DEFUN([AC_LBL_C_INIT_BEFORE_CC],
+ [AC_PREREQ(2.50)
+ AC_BEFORE([$0], [AC_LBL_C_INIT])
+ AC_BEFORE([$0], [AC_PROG_CC])
+@@ -90,7 +90,7 @@
+ dnl ac_cv_lbl_gcc_vers
+ dnl LBL_CFLAGS
+ dnl
+-AC_DEFUN(AC_LBL_C_INIT,
++AC_DEFUN([AC_LBL_C_INIT],
+ [AC_PREREQ(2.50)
+ AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
+ AC_BEFORE([$0], [AC_LBL_DEVEL])
+@@ -217,7 +217,7 @@
+ dnl V_SONAME_OPT
+ dnl V_RPATH_OPT
+ dnl
+-AC_DEFUN(AC_LBL_SHLIBS_INIT,
++AC_DEFUN([AC_LBL_SHLIBS_INIT],
+ [AC_PREREQ(2.50)
+ if test "$GCC" = yes ; then
+ #
+@@ -361,7 +361,7 @@
+ # Make sure we use the V_CCOPT flags, because some of those might
+ # disable inlining.
+ #
+-AC_DEFUN(AC_LBL_C_INLINE,
++AC_DEFUN([AC_LBL_C_INLINE],
+ [AC_MSG_CHECKING(for inline)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$V_CCOPT"
+@@ -407,7 +407,7 @@
+ dnl
+ dnl AC_LBL_FIXINCLUDES
+ dnl
+-AC_DEFUN(AC_LBL_FIXINCLUDES,
++AC_DEFUN([AC_LBL_FIXINCLUDES],
+ [if test "$GCC" = yes ; then
+ AC_MSG_CHECKING(for ANSI ioctl definitions)
+ AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
+@@ -453,7 +453,7 @@
+ dnl $2 (yacc appended)
+ dnl $3 (optional flex and bison -P prefix)
+ dnl
+-AC_DEFUN(AC_LBL_LEX_AND_YACC,
++AC_DEFUN([AC_LBL_LEX_AND_YACC],
+ [AC_ARG_WITH(flex, [ --without-flex don't use flex])
+ AC_ARG_WITH(bison, [ --without-bison don't use bison])
+ if test "$with_flex" = no ; then
+@@ -506,7 +506,7 @@
+ dnl
+ dnl DECLWAITSTATUS (defined)
+ dnl
+-AC_DEFUN(AC_LBL_UNION_WAIT,
++AC_DEFUN([AC_LBL_UNION_WAIT],
+ [AC_MSG_CHECKING(if union wait is used)
+ AC_CACHE_VAL(ac_cv_lbl_union_wait,
+ AC_TRY_COMPILE([
+@@ -535,7 +535,7 @@
+ dnl
+ dnl HAVE_SOCKADDR_SA_LEN (defined)
+ dnl
+-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
++AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
+ [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
+ AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
+ AC_TRY_COMPILE([
+@@ -560,7 +560,7 @@
+ dnl
+ dnl HAVE_SOCKADDR_STORAGE (defined)
+ dnl
+-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
++AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
+ [AC_MSG_CHECKING(if sockaddr_storage struct exists)
+ AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
+ AC_TRY_COMPILE([
+@@ -593,7 +593,7 @@
+ dnl won't be using code that would use that member, or we wouldn't
+ dnl compile in any case).
+ dnl
+-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
++AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
+ [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
+ AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
+ AC_TRY_COMPILE([
+@@ -619,7 +619,7 @@
+ dnl
+ dnl ac_cv_lbl_have_run_path (yes or no)
+ dnl
+-AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
++AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
+ [AC_MSG_CHECKING(for ${CC-cc} -R)
+ AC_CACHE_VAL(ac_cv_lbl_have_run_path,
+ [echo 'main(){}' > conftest.c
+@@ -644,7 +644,7 @@
+ dnl
+ dnl LBL_ALIGN (DEFINED)
+ dnl
+-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
++AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
+ [AC_MSG_CHECKING(if unaligned accesses fail)
+ AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
+ [case "$host_cpu" in
+@@ -749,7 +749,7 @@
+ dnl HAVE_OS_PROTO_H (defined)
+ dnl os-proto.h (symlinked)
+ dnl
+-AC_DEFUN(AC_LBL_DEVEL,
++AC_DEFUN([AC_LBL_DEVEL],
+ [rm -f os-proto.h
+ if test "${LBL_CFLAGS+set}" = set; then
+ $1="$$1 ${LBL_CFLAGS}"
+@@ -886,7 +886,7 @@
+ dnl statically and happen to have a libresolv.a lying around (and no
+ dnl libnsl.a).
+ dnl
+-AC_DEFUN(AC_LBL_LIBRARY_NET, [
++AC_DEFUN([AC_LBL_LIBRARY_NET], [
+ # Most operating systems have gethostbyname() in the default searched
+ # libraries (i.e. libc):
+ # Some OSes (eg. Solaris) place it in libnsl
+@@ -909,7 +909,7 @@
+ dnl Test for __attribute__
+ dnl
+
+-AC_DEFUN(AC_C___ATTRIBUTE__, [
++AC_DEFUN([AC_C___ATTRIBUTE__], [
+ AC_MSG_CHECKING(for __attribute__)
+ AC_CACHE_VAL(ac_cv___attribute__, [
+ AC_COMPILE_IFELSE(
+@@ -947,7 +947,7 @@
+ dnl
+ dnl -Scott Barron
+ dnl
+-AC_DEFUN(AC_LBL_TPACKET_STATS,
++AC_DEFUN([AC_LBL_TPACKET_STATS],
+ [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
+ AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
+ AC_TRY_COMPILE([
+@@ -976,7 +976,7 @@
+ dnl doesn't have that member (which is OK, as either we won't be using
+ dnl code that would use that member, or we wouldn't compile in any case).
+ dnl
+-AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI,
++AC_DEFUN([AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI],
+ [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member)
+ AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
+ AC_TRY_COMPILE([
+@@ -1003,7 +1003,7 @@
+ dnl
+ dnl HAVE_DLPI_PASSIVE (defined)
+ dnl
+-AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
++AC_DEFUN([AC_LBL_DL_PASSIVE_REQ_T],
+ [AC_MSG_CHECKING(if dl_passive_req_t struct exists)
+ AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
+ AC_TRY_COMPILE([
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
new file mode 100644
index 000000000..f29c7cb54
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
@@ -0,0 +1,22 @@
+Index: libpcap-1.0.0/pcap-linux.c
+===================================================================
+--- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
++++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
+@@ -1616,6 +1616,17 @@
+ * so let's use "Linux-cooked" mode. Jean II */
+ //handle->md.cooked = 1;
+ break;
++#ifndef ARPHRD_IEEE80215
++#define ARPHRD_IEEE80215 804
++#endif
++#ifndef ARPHRD_IEEE80215_PHY
++#define ARPHRD_IEEE80215_PHY 805
++#endif
++
++ case ARPHRD_IEEE80215:
++ case ARPHRD_IEEE80215_PHY:
++ handle->linktype = DLT_IEEE802_15_4;
++ break;
+
+ /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
+ * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
new file mode 100644
index 000000000..2025d84c0
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -0,0 +1,24 @@
+DESCRIPTION = "Libpcap is a tool to capture network packages on Unix/Linux platform"
+HOMEPAGE = "http://www.tcpdump.org/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
+SECTION = "libs/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
+ file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-pcap=linux"
+
+CPPFLAGS_prepend = "-I${S} "
+CFLAGS_prepend = "-I${S} "
+CXXFLAGS_prepend = "-I${S} "
+
+do_configure_prepend () {
+ if [ ! -e acinclude.m4 ]; then
+ cat aclocal.m4 > acinclude.m4
+ fi
+}
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
new file mode 100644
index 000000000..58ab5e6c9
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
@@ -0,0 +1,17 @@
+require libpcap.inc
+
+PR = "r0"
+
+SRC_URI += "file://aclocal.patch \
+ file://ieee80215-arphrd.patch"
+
+#
+# make install doesn't cover the shared lib
+# make install-shared is just broken (no symlinks)
+#
+do_install_prepend () {
+ install -d ${D}${libdir}
+ install -d ${D}${bindir}
+ oe_runmake install-shared DESTDIR=${D}
+ oe_libinstall -a -so libpcap ${D}${libdir}
+}
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb
new file mode 100644
index 000000000..dc22ed85f
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Network suspend/resume scripts"
+SECTION = "base"
+LICENSE = "GPLv2"
+PV = "1.1"
+PR = "r2"
+
+SRC_URI = "file://ifupdown \
+ file://usbnet"
+
+do_install() {
+ install -d ${D}${sysconfdir}/apm/scripts.d
+ install -m 0755 ${WORKDIR}/ifupdown ${D}${sysconfdir}/apm/scripts.d
+ install -m 0755 ${WORKDIR}/usbnet ${D}${sysconfdir}/apm/scripts.d
+ install -d ${D}${sysconfdir}/apm/suspend.d
+ ln -s ../scripts.d/ifupdown ${D}${sysconfdir}/apm/suspend.d/05ifupdown
+ ln -s ../scripts.d/usbnet ${D}${sysconfdir}/apm/suspend.d/10usbnet
+ install -d ${D}${sysconfdir}/apm/resume.d
+ ln -sf ../scripts.d/ifupdown ${D}${sysconfdir}/apm/resume.d/30ifupdown
+ ln -sf ../scripts.d/usbnet ${D}${sysconfdir}/apm/resume.d/20usbnet
+}
+
+FILES = "${sysconfdir}/apm"
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown
new file mode 100644
index 000000000..d458da686
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Unloads/loads all interface that are up at time of suspend
+
+if [ "$1" = suspend ]; then
+ rm -f /var/run/ifstate-suspend
+ rm -f /var/run/ifstate-old
+ cp /var/run/ifstate /var/run/ifstate-old
+ cat /var/run/ifstate-old | (
+ IFS="="
+ while read IFACE LOGICAL; do
+ ifdown $IFACE
+ echo "$IFACE=$LOGICAL" >>/var/run/ifstate-suspend
+ done
+ rm -f /var/run/ifstate-old
+ )
+elif [ "$1" = resume ] && [ "$2" != standby ] && [ -f /var/run/ifstate-suspend ]; then
+ cat /var/run/ifstate-suspend | (
+ while read LINE; do
+ ifup $LINE
+ done
+ )
+ rm -f /var/run/ifstate-suspend
+fi
+
+: exit 0
+
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet
new file mode 100644
index 000000000..3731f6339
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Unloads/loads usb-eth so it always works
+
+. /etc/default/usbd
+
+if [ "$1" = suspend ]; then
+ rmmod usb-eth
+ rmmod sa1100usb_core
+elif [ "$1" = resume ] && [ "$2" != standby ]; then
+ modprobe usb-eth
+ modprobe -r $usbdmodule
+ modprobe $usbdmodule
+fi
+
+: exit 0
+
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb
new file mode 100644
index 000000000..c6b02fe19
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "nfs idmapping library"
+HOMEPAGE = "http://www.citi.umich.edu/projects/nfsv4/linux/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37"
+PR = "r0"
+
+SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-ldap"
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
new file mode 100644
index 000000000..336dc0e26
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
@@ -0,0 +1,18 @@
+--- ./support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000
++++ ./support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000
+@@ -66,6 +66,7 @@
+ memset ((char *) &addr, sizeof (addr));
+ addr.sin_family = AF_INET;
+
++#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
+ ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
+ &rpcp);
+ if (ret == 0 && rpcp != NULL)
+@@ -99,6 +100,7 @@
+ }
+ }
+ else
++#endif
+ {
+ if (bindresvport (sock, &addr))
+ {
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
new file mode 100644
index 000000000..9d02e8584
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -0,0 +1,161 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: nfs-kernel-server
+# Required-Start: $remote_fs $portmap hwclock
+# Required-Stop: $remote_fs $portmap hwclock
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Kernel NFS server support
+# Description: NFS is a popular protocol for file sharing across
+# TCP/IP networks. This service provides NFS server
+# functionality, which is configured via the
+# /etc/exports file.
+### END INIT INFO
+#
+# Startup script for nfs-utils
+#
+#
+# The environment variable NFS_SERVERS may be set in /etc/default/nfsd
+# Other control variables may be overridden here too
+test -r /etc/default/nfsd && . /etc/default/nfsd
+#
+# Location of executables:
+test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/mountd
+test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/nfsd
+test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/statd
+#
+# The user mode program must also exist (it just starts the kernel
+# threads using the kernel module code).
+test -x "$NFS_MOUNTD" || exit 0
+test -x "$NFS_NFSD" || exit 0
+#
+# Default is 8 threads, value is settable between 1 and the truely
+# ridiculous 99
+test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8
+#
+# The default state directory is /var/lib/nfs
+test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
+#
+#----------------------------------------------------------------------
+# Startup and shutdown functions.
+# Actual startup/shutdown is at the end of this file.
+#directories
+create_directories(){
+ echo -n 'creating NFS state directory: '
+ mkdir -p "$NFS_STATEDIR"
+ ( cd "$NFS_STATEDIR"
+ umask 077
+ mkdir -p sm sm.bak
+ test -w sm/state || {
+ rm -f sm/state
+ :>sm/state
+ }
+ umask 022
+ for file in xtab etab smtab rmtab
+ do
+ test -w "$file" || {
+ rm -f "$file"
+ :>"$file"
+ }
+ done
+ )
+ echo done
+}
+#mountd
+start_mountd(){
+ echo -n 'starting mountd: '
+ start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@"
+ echo done
+}
+stop_mountd(){
+ echo -n 'stopping mountd: '
+ start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD"
+ echo done
+}
+#
+#nfsd
+start_nfsd(){
+ echo -n "starting $1 nfsd kernel threads: "
+ start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
+ echo done
+}
+delay_nfsd(){
+ for delay in 0 1 2 3 4 5 6 7 8 9
+ do
+ if pidof nfsd >/dev/null
+ then
+ echo -n .
+ sleep 1
+ else
+ return 0
+ fi
+ done
+ return 1
+}
+stop_nfsd(){
+ # WARNING: this kills any process with the executable
+ # name 'nfsd'.
+ echo -n 'stopping nfsd: '
+ start-stop-daemon --stop --quiet --signal 1 --name nfsd
+ if delay_nfsd || {
+ echo failed
+ echo ' using signal 9: '
+ start-stop-daemon --stop --quiet --signal 9 --name nfsd
+ delay_nfsd
+ }
+ then
+ echo done
+ # This will remove, recursively, dependencies
+ echo -n 'removing nfsd kernel module: '
+ if modprobe -r nfsd
+ then
+ echo done
+ else
+ echo failed
+ fi
+ else
+ echo failed
+ fi
+}
+
+#statd
+start_statd(){
+ echo -n "starting statd: "
+ start-stop-daemon --start --exec "$NFS_STATD"
+ echo done
+}
+stop_statd(){
+ # WARNING: this kills any process with the executable
+ # name 'statd'.
+ echo -n 'stopping statd: '
+ start-stop-daemon --stop --quiet --signal 1 --name statd
+ echo done
+}
+#----------------------------------------------------------------------
+#
+# supported options:
+# start
+# stop
+# reload: reloads the exports file
+# restart: stops and starts mountd
+#FIXME: need to create the /var/lib/nfs/... directories
+case "$1" in
+start) create_directories
+ start_nfsd "$NFS_SERVERS"
+ start_mountd
+ start_statd
+ test -r /etc/exports && exportfs -a;;
+stop) exportfs -ua
+ stop_statd
+ stop_mountd
+ stop_nfsd;;
+reload) test -r /etc/exports && exportfs -r;;
+restart)exportfs -ua
+ stop_mountd
+ stop_statd
+ # restart does not restart the kernel threads,
+ # only the user mode processes
+ start_mountd
+ start_statd
+ test -r /etc/exports && exportfs -a;;
+esac
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb
new file mode 100644
index 000000000..fafedd17b
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb
@@ -0,0 +1,51 @@
+DESCRIPTION = "userspace utilities for kernel nfs"
+HOMEPAGE = "http://nfs.sourceforge.net/"
+SECTION = "console/network"
+PRIORITY = "optional"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+# util-linux for libblkid
+DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers"
+RDEPENDS = "portmap"
+RRECOMMENDS = "kernel-module-nfsd"
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
+ file://nfs-utils-1.0.6-uclibc.patch \
+ file://nfsserver"
+
+PARALLEL_MAKE = ""
+
+# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
+# pull in the remainder of the dependencies.
+
+INITSCRIPT_NAME = "nfsserver"
+# The server has no dependencies at the user run levels, so just put
+# it in at the default levels. It must be terminated before the network
+# in the shutdown levels, but that works fine.
+INITSCRIPT_PARAMS = "defaults"
+
+inherit autotools update-rc.d
+
+# --enable-uuid is need for cross-compiling
+EXTRA_OECONF = "--with-statduser=nobody \
+ --enable-nfsv41 \
+ --enable-uuid \
+ --disable-gss \
+ --disable-tirpc \
+ --with-statedir=/var/lib/nfs"
+
+INHIBIT_AUTO_STAGE = "1"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+
+ # the following are built by CC_FOR_BUILD
+ rm -f ${D}${sbindir}/rpcdebug
+ rm -f ${D}${sbindir}/rpcgen
+ rm -f ${D}${sbindir}/locktest
+}
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch
new file mode 100644
index 000000000..b68123a23
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch
@@ -0,0 +1,24 @@
+
+The number of colons are important :)
+
+Index: openssl-0.9.8g/Configure
+===================================================================
+--- openssl-0.9.8g.orig/Configure 2008-04-12 04:27:22.000000000 +0200
++++ openssl-0.9.8g/Configure 2008-04-12 04:38:56.000000000 +0200
+@@ -395,6 +395,16 @@
+ "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
+ "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
+
++ # Linux on ARM
++"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-uclibcgnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-uclibcgnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++
++"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
++
+ #### *BSD [do see comment about ${BSDthreads} above!]
+ "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch
new file mode 100644
index 000000000..761eebe51
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch
@@ -0,0 +1,20 @@
+Index: openssl-0.9.8m/apps/CA.pl.in
+===================================================================
+--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
++++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
+@@ -65,6 +65,7 @@
+ foreach (@ARGV) {
+ if ( /^(-\?|-h|-help)$/ ) {
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ exit 0;
+ } elsif (/^-newcert$/) {
+ # create a certificate
+@@ -165,6 +166,7 @@
+ } else {
+ print STDERR "Unknown arg $_\n";
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ exit 1;
+ }
+ }
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch
new file mode 100644
index 000000000..21b7935dd
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch
@@ -0,0 +1,15 @@
+Index: openssl-0.9.8k/config
+===================================================================
+--- openssl-0.9.8k.orig/config 2009-02-16 09:43:41.000000000 +0100
++++ openssl-0.9.8k/config 2009-07-19 11:32:41.000000000 +0200
+@@ -162,8 +162,8 @@
+ echo "${MACHINE}-whatever-linux1"; exit 0
+ ;;
+
+- GNU*)
+- echo "hurd-x86"; exit 0;
++ GNU:*|GNU/*:*)
++ echo "${MACHINE}-gnuish"; exit 0;
+ ;;
+
+ LynxOS:*)
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch
new file mode 100644
index 000000000..fed47341e
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch
@@ -0,0 +1,54 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-12-09 16:09:41.000000000 +0000
++++ openssl-0.9.8k/Configure 2009-12-09 16:09:55.000000000 +0000
+@@ -320,6 +320,49 @@
+ "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
+ "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
+
++# Debian GNU/* (various architectures)
++"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++#"debian-amd64","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm_linux}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++#"debian-freebsd-alpha","gcc:-DTERMIOS -O -Wa,--noexecstack -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++#"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
++"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++
+ ####
+ #### Variety of LINUX:-)
+ ####
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch
new file mode 100644
index 000000000..49400ff6e
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch
@@ -0,0 +1,47 @@
+Index: openssl-0.9.8m/Makefile.org
+===================================================================
+--- openssl-0.9.8m.orig/Makefile.org 2010-01-27 16:06:36.000000000 +0000
++++ openssl-0.9.8m/Makefile.org 2010-02-27 00:43:04.000000000 +0000
+@@ -620,7 +620,7 @@
+ install_sw:
+ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
+- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
+Index: openssl-0.9.8m/engines/Makefile
+===================================================================
+--- openssl-0.9.8m.orig/engines/Makefile 2009-11-10 01:53:02.000000000 +0000
++++ openssl-0.9.8m/engines/Makefile 2010-02-27 00:45:03.000000000 +0000
+@@ -101,13 +101,13 @@
+ *DSO_DL*) sfx="sl";; \
+ *) sfx="bad";; \
+ esac; \
+- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
++ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
+ else \
+ sfx="so"; \
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
+ fi; \
+- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
+- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
+ done; \
+ fi
+
+Index: openssl-0.9.8m/Configure
+===================================================================
+--- openssl-0.9.8m.orig/Configure 2010-02-27 00:40:42.000000000 +0000
++++ openssl-0.9.8m/Configure 2010-02-27 00:46:47.000000000 +0000
+@@ -1738,7 +1738,7 @@
+ # $foo is to become "$prefix/lib$multilib/engines";
+ # as Makefile.org and engines/Makefile are adapted for
+ # $multilib suffix.
+- my $foo = "$prefix/lib/engines";
++ my $foo = "$prefix/lib/ssl/engines";
+ $foo =~ s/\\/\\\\/g;
+ print OUT "#define ENGINESDIR \"$foo\"\n";
+ }
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
new file mode 100644
index 000000000..da9718688
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
@@ -0,0 +1,13 @@
+Index: openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl
+===================================================================
+--- openssl-0.9.8k.orig/crypto/perlasm/x86_64-xlate.pl 2008-02-13 21:01:48.000000000 +0100
++++ openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl 2009-07-19 11:37:23.000000000 +0200
+@@ -62,7 +62,7 @@
+ my ($outdev,$outino,@junk)=stat($output);
+
+ open STDOUT,">$output" || die "can't open $output: $!"
+- if ($stddev!=$outdev || $stdino!=$outino);
++# if ($stddev!=$outdev || $stdino!=$outino);
+ }
+
+ my $masmref=8 + 50727*2**-32; # 8.00.50727 shipped with VS2005
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch
new file mode 100644
index 000000000..b1239728e
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch
@@ -0,0 +1,13 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:31.000000000 +0200
+@@ -131,7 +131,7 @@
+
+ BASEADDR=
+
+-DIRS= crypto fips ssl engines apps test tools
++DIRS= crypto fips ssl engines apps tools
+ SHLIBDIRS= crypto ssl fips
+
+ # dirs in crypto to build
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch
new file mode 100644
index 000000000..29563ecf5
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch
@@ -0,0 +1,13 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:29.000000000 +0200
+@@ -152,7 +152,7 @@
+
+ MAKEFILE= Makefile
+
+-MANDIR=$(OPENSSLDIR)/man
++MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+ MANSUFFIX=
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch
new file mode 100644
index 000000000..fe20ab044
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch
@@ -0,0 +1,32 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:06.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:21.000000000 +0200
+@@ -155,7 +155,8 @@
+ MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+-MANSUFFIX=
++MANSUFFIX=ssl
++MANSECTION=SSL
+ SHELL=/bin/sh
+
+ TOP= .
+@@ -694,7 +695,7 @@
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+- --section=$$sec --center=OpenSSL \
++ --section=$${sec}$(MANSECTION) --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(PERL) util/extract-names.pl < $$i | \
+@@ -711,7 +712,7 @@
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+- --section=$$sec --center=OpenSSL \
++ --section=$${sec}$(MANSECTION) --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(PERL) util/extract-names.pl < $$i | \
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch
new file mode 100644
index 000000000..3ebc9accc
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch
@@ -0,0 +1,13 @@
+Index: openssl-0.9.8k/Makefile.shared
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
++++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:37:25.000000000 +0200
+@@ -151,7 +151,7 @@
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+
+-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
++DO_GNU_APP=LDFLAGS="$(CFLAGS)"
+
+ #This is rather special. It's a special target with which one can link
+ #applications without bothering with any features that have anything to
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch
new file mode 100644
index 000000000..2504fa791
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch
@@ -0,0 +1,13 @@
+Index: openssl-0.9.8k/Makefile.shared
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.shared 2009-07-19 11:35:02.000000000 +0200
++++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:35:48.000000000 +0200
+@@ -149,7 +149,7 @@
+ SHLIB_SUFFIX=; \
+ ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+
+ DO_GNU_APP=LDFLAGS="$(CFLAGS)"
+
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff
new file mode 100644
index 000000000..a72f938d8
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff
@@ -0,0 +1,760 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+Subject: Change the perl path's to /usr/bin/perl
+
+This is the result of running:
+perl util/perlpath.pl /usr/bin
+
+The upstream sources have this set to various different paths.
+
+--- openssl-0.9.8m.orig/Configure
++++ openssl-0.9.8m/Configure
+@@ -1,4 +1,4 @@
+-:
++#!/usr/bin/perl
+ eval 'exec perl -S $0 ${1+"$@"}'
+ if $running_under_some_shell;
+ ##
+--- openssl-0.9.8m.orig/VMS/VMSify-conf.pl
++++ openssl-0.9.8m/VMS/VMSify-conf.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/perl
+
+ use strict;
+ use warnings;
+--- openssl-0.9.8m.orig/Netware/do_tests.pl
++++ openssl-0.9.8m/Netware/do_tests.pl
+@@ -1,4 +1,4 @@
+-# perl script to run OpenSSL tests
++#!/usr/bin/perl
+
+
+ my $base_path = "\\openssl";
+--- openssl-0.9.8m.orig/apps/progs.pl
++++ openssl-0.9.8m/apps/progs.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ print "/* apps/progs.h */\n";
+ print "/* automatically generated by progs.pl for openssl.c */\n\n";
+--- openssl-0.9.8m.orig/os2/backwardify.pl
++++ openssl-0.9.8m/os2/backwardify.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ use strict;
+
+ # Use as $0
+--- openssl-0.9.8m.orig/times/091/mips-rel.pl
++++ openssl-0.9.8m/times/091/mips-rel.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100
+ &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100
+--- openssl-0.9.8m.orig/fips/mkfipsscr.pl
++++ openssl-0.9.8m/fips/mkfipsscr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ # Quick & dirty utility to generate a script for executing the
+ # FIPS 140-2 CMVP algorithm tests based on the pathnames of
+ # input algorithm test files actually present (the unqualified
+--- openssl-0.9.8m.orig/fips/fipsalgtest.pl
++++ openssl-0.9.8m/fips/fipsalgtest.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ # Perl utility to run or verify FIPS 140-2 CMVP algorithm tests based on the
+ # pathnames of input algorithm test files actually present (the unqualified
+ # file names are consistent but the pathnames are not).
+--- openssl-0.9.8m.orig/ms/uplink.pl
++++ openssl-0.9.8m/ms/uplink.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # For Microsoft CL this is implemented as inline assembler. So that
+ # even though this script can generate even Win32 code, we'll be
+--- openssl-0.9.8m.orig/ms/segrenam.pl
++++ openssl-0.9.8m/ms/segrenam.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ my $quiet = 1;
+
+--- openssl-0.9.8m.orig/ms/cmp.pl
++++ openssl-0.9.8m/ms/cmp.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
+
+--- openssl-0.9.8m.orig/test/cms-test.pl
++++ openssl-0.9.8m/test/cms-test.pl
+@@ -1,4 +1,4 @@
+-# test/cms-test.pl
++#!/usr/bin/perl
+ # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ # project.
+ #
+--- openssl-0.9.8m.orig/test/cms-examples.pl
++++ openssl-0.9.8m/test/cms-examples.pl
+@@ -1,4 +1,4 @@
+-# test/cms-examples.pl
++#!/usr/bin/perl
+ # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ # project.
+ #
+--- openssl-0.9.8m.orig/demos/b64.pl
++++ openssl-0.9.8m/demos/b64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ #
+ # Make PEM encoded data have lines of 64 bytes of data
+--- openssl-0.9.8m.orig/demos/tunala/configure.in
++++ openssl-0.9.8m/demos/tunala/configure.in
+@@ -1,4 +1,4 @@
+-dnl Process this file with autoconf to produce a configure script.
++#!/usr/bin/perl
+ AC_INIT(tunala.c)
+ AM_CONFIG_HEADER(config.h)
+ AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
+--- openssl-0.9.8m.orig/crypto/x86cpuid.pl
++++ openssl-0.9.8m/crypto/x86cpuid.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/x86_64cpuid.pl
++++ openssl-0.9.8m/crypto/x86_64cpuid.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ $output=shift;
+ $masm=1 if ($output =~ /\.asm/);
+--- openssl-0.9.8m.orig/crypto/md5/asm/md5-586.pl
++++ openssl-0.9.8m/crypto/md5/asm/md5-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # Normal is the
+ # md5_block_x86(MD5_CTX *c, ULONG *X);
+--- openssl-0.9.8m.orig/crypto/md5/asm/md5-x86_64.pl
++++ openssl-0.9.8m/crypto/md5/asm/md5-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ #
+ # MD5 optimized for AMD64.
+ #
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-ia64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-ia64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-x86_64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-sse2.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-sse2.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-ia64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-ia64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-x86_64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-586.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # ====================================================================
+ # [Re]written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/des/asm/des-586.pl
++++ openssl-0.9.8m/crypto/des/asm/des-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+--- openssl-0.9.8m.orig/crypto/des/asm/desboth.pl
++++ openssl-0.9.8m/crypto/des/asm/desboth.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $L="edi";
+ $R="esi";
+--- openssl-0.9.8m.orig/crypto/des/asm/des686.pl
++++ openssl-0.9.8m/crypto/des/asm/des686.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $prog="des686.pl";
+
+--- openssl-0.9.8m.orig/crypto/des/asm/crypt586.pl
++++ openssl-0.9.8m/crypto/des/asm/crypt586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+--- openssl-0.9.8m.orig/crypto/lhash/num.pl
++++ openssl-0.9.8m/crypto/lhash/num.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ #node 10 -> 4
+
+--- openssl-0.9.8m.orig/crypto/ripemd/asm/rmd-586.pl
++++ openssl-0.9.8m/crypto/ripemd/asm/rmd-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # Normal is the
+ # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks);
+--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-586.pl
++++ openssl-0.9.8m/crypto/rc4/asm/rc4-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # At some point it became apparent that the original SSLeay RC4
+ # assembler implementation performs suboptimaly on latest IA-32
+--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-x86_64.pl
++++ openssl-0.9.8m/crypto/rc4/asm/rc4-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/cast/asm/cast-586.pl
++++ openssl-0.9.8m/crypto/cast/asm/cast-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # define for pentium pro friendly version
+ $ppro=1;
+--- openssl-0.9.8m.orig/crypto/rc5/asm/rc5-586.pl
++++ openssl-0.9.8m/crypto/rc5/asm/rc5-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/perlasm/x86ms.pl
++++ openssl-0.9.8m/crypto/perlasm/x86ms.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86ms;
+
+--- openssl-0.9.8m.orig/crypto/perlasm/x86asm.pl
++++ openssl-0.9.8m/crypto/perlasm/x86asm.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # require 'x86asm.pl';
+ # &asm_init("cpp","des-586.pl");
+--- openssl-0.9.8m.orig/crypto/perlasm/x86nasm.pl
++++ openssl-0.9.8m/crypto/perlasm/x86nasm.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86nasm;
+
+--- openssl-0.9.8m.orig/crypto/perlasm/x86unix.pl
++++ openssl-0.9.8m/crypto/perlasm/x86unix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86unix; # GAS actually...
+
+--- openssl-0.9.8m.orig/crypto/perlasm/cbc.pl
++++ openssl-0.9.8m/crypto/perlasm/cbc.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
+ # des_cblock (*input);
+--- openssl-0.9.8m.orig/crypto/perlasm/x86_64-xlate.pl
++++ openssl-0.9.8m/crypto/perlasm/x86_64-xlate.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
+ #
+--- openssl-0.9.8m.orig/crypto/bf/asm/bf-686.pl
++++ openssl-0.9.8m/crypto/bf/asm/bf-686.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bf/asm/bf-586.pl
++++ openssl-0.9.8m/crypto/bf/asm/bf-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/objects/objects.pl
++++ openssl-0.9.8m/crypto/objects/objects.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
+ $max_nid=0;
+--- openssl-0.9.8m.orig/crypto/objects/obj_dat.pl
++++ openssl-0.9.8m/crypto/objects/obj_dat.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # fixes bug in floating point emulation on sparc64 when
+ # this script produces off-by-one output on sparc64
+--- openssl-0.9.8m.orig/crypto/conf/keysets.pl
++++ openssl-0.9.8m/crypto/conf/keysets.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $NUMBER=0x01;
+ $UPPER=0x02;
+--- openssl-0.9.8m.orig/crypto/bn/bn_prime.pl
++++ openssl-0.9.8m/crypto/bn/bn_prime.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # bn_prime.pl
+
+ $num=2048;
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/ppc.pl
++++ openssl-0.9.8m/crypto/bn/asm/ppc.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # Implemented as a Perl wrapper as we want to support several different
+ # architectures with single file. We pick up the target based on the
+--- openssl-0.9.8m.orig/crypto/bn/asm/co-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/co-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/bn-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/bn-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/mo-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/mo-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # This is crypto/bn/asm/x86-mont.pl (with asciz from crypto/perlasm/x86asm.pl)
+ # from OpenSSL 0.9.9-dev
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86_64-mont.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86_64-mont.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/comba.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/comba.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub mul_add_c
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/add.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/add.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_add_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/mul.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_mul_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul_add.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/mul_add.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_mul_add_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sqr.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/sqr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_sqr_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sub.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/sub.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_sub_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/div.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/div.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_div_words
+--- openssl-0.9.8m.orig/crypto/aes/asm/aes-586.pl
++++ openssl-0.9.8m/crypto/aes/asm/aes-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/aes/asm/aes-x86_64.pl
++++ openssl-0.9.8m/crypto/aes/asm/aes-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/asn1/charmap.pl
++++ openssl-0.9.8m/crypto/asn1/charmap.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ use strict;
+
+--- openssl-0.9.8m.orig/util/mksdef.pl
++++ openssl-0.9.8m/util/mksdef.pl
+@@ -1,4 +1,4 @@
+-
++#!/usr/bin/perl
+ # Perl script to split libeay32.def into two distinct DEF files for use in
+ # fipdso mode. It works out symbols in each case by running "link" command and
+ # parsing the output to find the list of missing symbols then splitting
+--- openssl-0.9.8m.orig/util/dirname.pl
++++ openssl-0.9.8m/util/dirname.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ if ($#ARGV < 0) {
+ die "dirname.pl: too few arguments\n";
+--- openssl-0.9.8m.orig/util/tab_num.pl
++++ openssl-0.9.8m/util/tab_num.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $num=1;
+ $width=40;
+--- openssl-0.9.8m.orig/util/sp-diff.pl
++++ openssl-0.9.8m/util/sp-diff.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This file takes as input, the files that have been output from
+ # ssleay speed.
+--- openssl-0.9.8m.orig/util/mkerr.pl
++++ openssl-0.9.8m/util/mkerr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ my $config = "crypto/err/openssl.ec";
+ my $debug = 0;
+--- openssl-0.9.8m.orig/util/clean-depend.pl
++++ openssl-0.9.8m/util/clean-depend.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ # Clean the dependency list in a makefile of standard includes...
+ # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
+
+--- openssl-0.9.8m.orig/util/add_cr.pl
++++ openssl-0.9.8m/util/add_cr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This adds a copyright message to a souce code file.
+ # It also gets the file name correct.
+--- openssl-0.9.8m.orig/util/pod2man.pl
++++ openssl-0.9.8m/util/pod2man.pl
+@@ -1,4 +1,4 @@
+-: #!/usr/bin/perl-5.005
++#!/usr/bin/perl
+ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if $running_under_some_shell;
+
+--- openssl-0.9.8m.orig/util/mkstack.pl
++++ openssl-0.9.8m/util/mkstack.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ # This is a utility that searches out "DECLARE_STACK_OF()"
+ # declarations in .h and .c files, and updates/creates/replaces
+--- openssl-0.9.8m.orig/util/selftest.pl
++++ openssl-0.9.8m/util/selftest.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ #
+ # Run the test suite and generate a report
+ #
+--- openssl-0.9.8m.orig/util/ck_errf.pl
++++ openssl-0.9.8m/util/ck_errf.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This is just a quick script to scan for cases where the 'error'
+ # function name in a XXXerr() macro is wrong.
+--- openssl-0.9.8m.orig/util/mklink.pl
++++ openssl-0.9.8m/util/mklink.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # mklink.pl
+
+--- openssl-0.9.8m.orig/util/src-dep.pl
++++ openssl-0.9.8m/util/src-dep.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # we make up an array of
+ # $file{function_name}=filename;
+--- openssl-0.9.8m.orig/util/deleof.pl
++++ openssl-0.9.8m/util/deleof.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ while (<>)
+ {
+--- openssl-0.9.8m.orig/util/arx.pl
++++ openssl-0.9.8m/util/arx.pl
+@@ -1,4 +1,4 @@
+-#!/bin/perl
++#!/usr/bin/perl
+
+ # Simple perl script to wrap round "ar" program and exclude any
+ # object files in the environment variable EXCL_OBJ
+--- openssl-0.9.8m.orig/util/copy.pl
++++ openssl-0.9.8m/util/copy.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ use Fcntl;
+
+--- openssl-0.9.8m.orig/util/mkdir-p.pl
++++ openssl-0.9.8m/util/mkdir-p.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # mkdir-p.pl
+
+--- openssl-0.9.8m.orig/util/mkdef.pl
++++ openssl-0.9.8m/util/mkdef.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ #
+ # generate a .def file
+ #
+--- openssl-0.9.8m.orig/util/files.pl
++++ openssl-0.9.8m/util/files.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # used to generate the file MINFO for use by util/mk1mf.pl
+ # It is basically a list of all variables from the passed makefile
+--- openssl-0.9.8m.orig/util/mkfiles.pl
++++ openssl-0.9.8m/util/mkfiles.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This is a hacked version of files.pl for systems that can't do a 'make files'.
+ # Do a perl util/mkminfo.pl >MINFO to build MINFO
+--- openssl-0.9.8m.orig/util/perlpath.pl
++++ openssl-0.9.8m/util/perlpath.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # modify the '#!/usr/local/bin/perl'
+ # line in all scripts that rely on perl.
+--- openssl-0.9.8m.orig/util/mk1mf.pl
++++ openssl-0.9.8m/util/mk1mf.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # A bit of an evil hack but it post processes the file ../MINFO which
+ # is generated by `make files` in the top directory.
+ # This script outputs one mega makefile that has no shell stuff or any
+--- openssl-0.9.8m.orig/util/err-ins.pl
++++ openssl-0.9.8m/util/err-ins.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # tack error codes onto the end of a file
+ #
+--- openssl-0.9.8m.orig/util/pl/Mingw32.pl
++++ openssl-0.9.8m/util/pl/Mingw32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # Mingw32.pl -- Mingw
+ #
+--- openssl-0.9.8m.orig/util/pl/unix.pl
++++ openssl-0.9.8m/util/pl/unix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # unix.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/netware.pl
++++ openssl-0.9.8m/util/pl/netware.pl
+@@ -1,4 +1,4 @@
+-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
++#!/usr/bin/perl
+ #
+
+ $version_header = "crypto/opensslv.h";
+--- openssl-0.9.8m.orig/util/pl/VC-32.pl
++++ openssl-0.9.8m/util/pl/VC-32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # VC-32.pl - unified script for Microsoft Visual C++, covering Win32,
+ # Win64 and WinCE [follow $FLAVOR variable to trace the differences].
+ #
+--- openssl-0.9.8m.orig/util/pl/OS2-EMX.pl
++++ openssl-0.9.8m/util/pl/OS2-EMX.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # OS2-EMX.pl - for EMX GCC on OS/2
+ #
+--- openssl-0.9.8m.orig/util/pl/ultrix.pl
++++ openssl-0.9.8m/util/pl/ultrix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # linux.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/linux.pl
++++ openssl-0.9.8m/util/pl/linux.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # linux.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/BC-32.pl
++++ openssl-0.9.8m/util/pl/BC-32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
+ #
+
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch
new file mode 100644
index 000000000..b534afa66
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch
@@ -0,0 +1,301 @@
+Index: openssl-0.9.8o/crypto/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
++++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -57,7 +57,7 @@
+ echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
+ echo '#endif' ) >buildinf.h
+
+-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
++x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
+ $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
+ x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
+ $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
+@@ -70,7 +70,7 @@
+ uplink-cof.s: ../ms/uplink.pl
+ $(PERL) ../ms/uplink.pl coff > $@
+
+-x86_64cpuid.s: x86_64cpuid.pl
++x86_64cpuid.S: x86_64cpuid.pl
+ $(PERL) x86_64cpuid.pl $@
+ ia64cpuid.s: ia64cpuid.S
+ $(CC) $(CFLAGS) -E ia64cpuid.S > $@
+Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
++++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -95,7 +95,11 @@
+ .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
+
+ .section .init
++#ifdef OPENSSL_PIC
++ call OPENSSL_cpuid_setup\@PLT
++#else
+ call OPENSSL_cpuid_setup
++#endif
+
+ ___
+
+Index: openssl-0.9.8o/crypto/md5/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
++++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -52,7 +52,8 @@
+ mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
+
+-md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
++md5-x86_64.s: asm/md5-x86_64.pl
++ $(PERL) asm/md5-x86_64.pl $@
+
+ files:
+ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
++++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -16,6 +16,11 @@
+
+ &push("edi");
+
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebp");
++ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
++
+ &comment("");
+ &comment("Load the data words");
+ &mov($L,&DWP(0,"ebx","",0));
+@@ -47,15 +52,21 @@
+ &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
+ &mov(&swtmp(1), "eax");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+ &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
+ &mov(&swtmp(1), "edi");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+ &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
+ &mov(&swtmp(1), "esi");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+
+ &stack_pop(3);
+ &mov($L,&DWP(0,"ebx","",0));
+Index: openssl-0.9.8o/crypto/rc4/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
++++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -51,7 +51,7 @@
+ rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
+
+-rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
++rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
+
+ rc4-ia64.s: asm/rc4-ia64.S
+ @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
+Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
++++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -270,7 +270,11 @@
+ xor %r10,%r10
+ xor %r11,%r11
+
++#ifdef OPENSSL_PIC
++ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
++#else
+ mov OPENSSL_ia32cap_P(%rip),$idx#d
++#endif
+ bt \$20,$idx#d
+ jnc .Lw1stloop
+ bt \$30,$idx#d
+@@ -338,7 +342,11 @@
+ RC4_options:
+ .picmeup %rax
+ lea .Lopts-.(%rax),%rax
++#ifdef OPENSSL_PIC
++ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
++#else
+ mov OPENSSL_ia32cap_P(%rip),%edx
++#endif
+ bt \$20,%edx
+ jnc .Ldone
+ add \$12,%rax
+Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -400,6 +400,29 @@
+ $stack=4;
+ }
+
++sub main'function_begin_B_static
++ {
++ local($func,$extra)=@_;
++
++ &main'external_label($func);
++ $func=$under.$func;
++
++ local($tmp)=<<"EOF";
++.text
++EOF
++ push(@out,$tmp);
++ if ($main'cpp)
++ { push(@out,"TYPE($func,\@function)\n"); }
++ elsif ($main'coff)
++ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
++ elsif ($main'aout and !$main'pic)
++ { }
++ else { push(@out,".type $func,\@function\n"); }
++ push(@out,".align\t$align\n");
++ push(@out,"$func:\n");
++ $stack=4;
++ }
++
+ sub main'function_end
+ {
+ local($func)=@_;
+@@ -694,7 +717,17 @@
+ {
+ $tmp=<<___;
+ .section .init
++#ifdef OPENSSL_PIC
++ pushl %ebx
++ call .pic_point0
++.pic_point0:
++ popl %ebx
++ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
++ call $under$f\@PLT
++ popl %ebx
++#else
+ call $under$f
++#endif
+ jmp .Linitalign
+ .align $align
+ .Linitalign:
+Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -122,7 +122,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($enc_func);
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
++ &call("$enc_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0));
+ &mov("ebx", &DWP($data_off+4,"esp","",0));
+@@ -187,7 +191,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($enc_func);
++ &call (&label("pic_point1"));
++ &set_label("pic_point1");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
++ &call("$enc_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0));
+ &mov("ebx", &DWP($data_off+4,"esp","",0));
+@@ -220,7 +228,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put back
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($dec_func);
++ &call (&label("pic_point2"));
++ &set_label("pic_point2");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
++ &call("$dec_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0)); # get return
+ &mov("ebx", &DWP($data_off+4,"esp","",0)); #
+@@ -263,7 +275,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put back
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($dec_func);
++ &call (&label("pic_point3"));
++ &set_label("pic_point3");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
++ &call("$dec_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0)); # get return
+ &mov("ebx", &DWP($data_off+4,"esp","",0)); #
+Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -435,7 +435,7 @@
+
+ chomp($line);
+
+- $line =~ s|[#!].*$||; # get rid of asm-style comments...
++# $line =~ s|[#!].*$||; # get rid of asm-style comments...
+ $line =~ s|/\*.*\*/||; # ... and C-style comments...
+ $line =~ s|^\s+||; # ... and skip white spaces in beginning
+
+Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
++++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -250,7 +250,7 @@
+ sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
+
+ &public_label("AES_Te");
+-&function_begin_B("_x86_AES_encrypt");
++&function_begin_B_static("_x86_AES_encrypt");
+ if ($vertical_spin) {
+ # I need high parts of volatile registers to be accessible...
+ &exch ($s1="edi",$key="ebx");
+@@ -539,7 +539,7 @@
+ }
+
+ &public_label("AES_Td");
+-&function_begin_B("_x86_AES_decrypt");
++&function_begin_B_static("_x86_AES_decrypt");
+ # note that caller is expected to allocate stack frame for me!
+ &mov (&DWP(12,"esp"),$key); # save key
+
+@@ -1461,15 +1461,22 @@
+ &public_label("AES_Td");
+ &public_label("AES_Te");
+ &function_begin_B("AES_set_decrypt_key");
++ &push ("ebx");
+ &mov ("eax",&wparam(0));
+ &mov ("ecx",&wparam(1));
+ &mov ("edx",&wparam(2));
+ &sub ("esp",12);
++
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
+ &mov (&DWP(0,"esp"),"eax");
+ &mov (&DWP(4,"esp"),"ecx");
+ &mov (&DWP(8,"esp"),"edx");
+- &call ("AES_set_encrypt_key");
++ &call ("AES_set_encrypt_key\@PLT");
+ &add ("esp",12);
++ &pop ("ebx");
+ &cmp ("eax",0);
+ &je (&label("proceed"));
+ &ret ();
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch
new file mode 100644
index 000000000..38923b08b
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch
@@ -0,0 +1,34 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:56.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:36:02.000000000 +0200
+@@ -444,7 +444,8 @@
+ echo 'Description: OpenSSL cryptography library'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lcrypto'; \
++ echo 'Libs.private: $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
+
+ libssl.pc: Makefile
+@@ -457,7 +458,8 @@
+ echo 'Description: Secure Sockets Layer and cryptography libraries'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lssl'; \
++ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
+
+ openssl.pc: Makefile
+@@ -470,7 +472,8 @@
+ echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
++ echo 'Libs.private: $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
+
+ Makefile: Makefile.org Configure config
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
new file mode 100644
index 000000000..6f0421a01
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
@@ -0,0 +1,14 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Configure 2009-07-19 11:37:10.000000000 +0200
+@@ -128,6 +128,9 @@
+ my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o MAYBE-MO86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o rc4_skey.o:rm86-out.o:r586-out.o";
+
+ my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
++# rc4 asm is disabled on amd64 because we configured it with RC4_CHAR while
++# the assembler only works with int
++my $x86_64_asm_linux="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::::";
+ my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o::";
+
+ my $no_asm="::::::::::";
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch
new file mode 100644
index 000000000..a8ff28c6f
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch
@@ -0,0 +1,33 @@
+Index: openssl-0.9.8k/tools/c_rehash.in
+===================================================================
+--- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
++++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
+@@ -59,12 +59,15 @@
+ }
+ }
+ closedir DIR;
+- FILE: foreach $fname (grep {/\.pem$/} @flist) {
++ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
+ # Check to see if certificates and/or CRLs present.
+ my ($cert, $crl) = check_file($fname);
+ if(!$cert && !$crl) {
+- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
+- next;
++ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
++ if(!$cert && !$crl) {
++ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
++ next;
++ }
+ }
+ link_hash_cert($fname) if($cert);
+ link_hash_crl($fname) if($crl);
+@@ -102,6 +105,9 @@
+ my $fname = $_[0];
+ $fname =~ s/'/'\\''/g;
+ my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
++ if(!$hash || !fprint) {
++ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
++ }
+ chomp $hash;
+ chomp $fprint;
+ $fprint =~ s/^.*=//;
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch
new file mode 100644
index 000000000..94792c48e
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch
@@ -0,0 +1,60 @@
+Index: openssl-0.9.8k/doc/apps/c_rehash.pod
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8k/doc/apps/c_rehash.pod 2009-07-19 11:36:27.000000000 +0200
+@@ -0,0 +1,55 @@
++
++=pod
++
++=head1 NAME
++
++c_rehash - Create symbolic links to files named by the hash values
++
++=head1 SYNOPSIS
++
++B<c_rehash>
++[directory] ...
++
++=head1 DESCRIPTION
++
++c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
++
++If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
++
++For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
++
++Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
++
++The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
++
++The program will also warn if there are files with extension .pem which are not certificate or CRL files.
++
++The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
++
++=head1 OPTIONS
++
++None
++
++=head1 ENVIRONMENT
++
++=over 4
++
++=item B<OPENSSL>
++
++The name (and path) of an executable to use to generate hashes and fingerprints (see above).
++
++=item B<SSL_CERT_DIR>
++
++Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
++
++=head1 SEE ALSO
++
++L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
++
++=back
++
++=head1 BUGS
++
++No known bugs
++
++=cut
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series
new file mode 100644
index 000000000..b764c0414
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series
@@ -0,0 +1,20 @@
+ca.patch
+config-hurd.patch
+debian-targets.patch
+engines-path.patch
+kfreebsd-pipe.patch
+make-targets.patch
+man-dir.patch
+man-section.patch
+no-rpath.patch
+no-symbolic.patch
+pic.patch
+pkg-config.patch
+valgrind.patch
+rc4-amd64.patch
+rehash-crt.patch
+rehash_pod.patch
+shared-lib-ext.patch
+stddef.patch
+version-script.patch
+perl-path.diff
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
new file mode 100644
index 000000000..d27e9b239
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
@@ -0,0 +1,14 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-07-19 11:36:24.000000000 +0200
++++ openssl-0.9.8k/Configure 2009-07-19 11:37:03.000000000 +0200
+@@ -1568,7 +1568,8 @@
+ elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
+ {
+ my $sotmp = $1;
+- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
++# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
++ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
+ }
+ elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
+ {
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch
new file mode 100644
index 000000000..bb65b2331
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch
@@ -0,0 +1,12 @@
+Index: openssl-0.9.8k/crypto/sha/sha.h
+===================================================================
+--- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
++++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
+@@ -59,6 +59,7 @@
+ #ifndef HEADER_SHA_H
+ #define HEADER_SHA_H
+
++#include <stddef.h>
+ #include <openssl/e_os2.h>
+ #include <stddef.h>
+
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch
new file mode 100644
index 000000000..e9f86eabb
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch
@@ -0,0 +1,15 @@
+Index: openssl-0.9.8k/crypto/rand/md_rand.c
+===================================================================
+--- openssl-0.9.8k.orig/crypto/rand/md_rand.c 2008-09-16 13:50:05.000000000 +0200
++++ openssl-0.9.8k/crypto/rand/md_rand.c 2009-07-19 11:36:05.000000000 +0200
+@@ -477,8 +477,10 @@
+ MD_Update(&m,local_md,MD_DIGEST_LENGTH);
+ MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
+ #ifndef PURIFY
++#if 0 /* Don't add uninitialised data. */
+ MD_Update(&m,buf,j); /* purify complains */
+ #endif
++#endif
+ k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
+ if (k > 0)
+ {
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch
new file mode 100644
index 000000000..64d8fc7fa
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch
@@ -0,0 +1,33 @@
+Index: openssl-0.9.8m/Configure
+===================================================================
+--- openssl-0.9.8m.orig/Configure 2010-02-27 12:28:32.000000000 +0100
++++ openssl-0.9.8m/Configure 2010-02-27 12:28:35.000000000 +0100
+@@ -1512,6 +1512,8 @@
+ }
+ }
+
++$shared_ldflag .= " -Wl,--version-script=openssl.ld";
++
+ open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
+ unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
+ open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
+Index: openssl-0.9.8m/openssl.ld
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8m/openssl.ld 2010-02-27 12:28:35.000000000 +0100
+@@ -0,0 +1,5 @@
++OPENSSL_0.9.8 {
++ global:
++ *;
++};
++
+Index: openssl-0.9.8m/engines/openssl.ld
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8m/engines/openssl.ld 2010-02-27 12:28:35.000000000 +0100
+@@ -0,0 +1,5 @@
++OPENSSL_0.9.8 {
++ global:
++ *;
++};
++
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch
new file mode 100644
index 000000000..10d9146dc
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch
@@ -0,0 +1,48 @@
+diff --git a/Makefile.org b/Makefile.org
+index e87d623..25ff367 100644
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -355,7 +355,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ if [ "$(FIPSCANLIB)" = "libfips" ]; then \
+ $(ARD) libcrypto.a fipscanister.o ; \
+- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
++ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
+ $(AR) libcrypto.a fips/fipscanister.o ; \
+ else \
+ if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
+@@ -373,7 +373,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ shlibdeps=-lcrypto; \
+ [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
+- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
++ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
+ else \
+ echo "There's no support for shared libraries on this platform" >&2 ; \
+ exit 1; \
+diff --git a/crypto/Makefile b/crypto/Makefile
+index 6557f2b..a69bf7c 100644
+--- a/crypto/Makefile
++++ b/crypto/Makefile
+@@ -103,7 +103,7 @@ $(LIB): $(LIBOBJ)
+
+ shared: buildinf.h lib subdirs
+ if [ -n "$(SHARED_LIBS)" ]; then \
+- (cd ..; $(MAKE) $(SHARED_LIB)); \
++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
+ fi
+
+ libs:
+diff --git a/ssl/Makefile b/ssl/Makefile
+index 5ac3507..77ea2bd 100644
+--- a/ssl/Makefile
++++ b/ssl/Makefile
+@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
+
+ shared: lib
+ if [ -n "$(SHARED_LIBS)" ]; then \
+- (cd ..; $(MAKE) $(SHARED_LIB)); \
++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
+ fi
+
+ files:
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
new file mode 100644
index 000000000..2482585c6
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -0,0 +1,100 @@
+DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
+HOMEPAGE = "http://www.openssl.org/"
+BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
+SECTION = "libs/network"
+
+# "openssl | SSLeay" dual license
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
+
+DEPENDS = "perl-native"
+
+SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
+S = "${WORKDIR}/openssl-${PV}"
+
+AR_append = " r"
+CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
+ -DTERMIO ${FULL_OPTIMIZATION} -Wall"
+
+# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
+CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
+CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
+
+export DIRS = "crypto ssl apps"
+export EX_LIBS = "-lgcc -ldl"
+export AS = "${CC} -c"
+
+PARALLEL_MAKE = ""
+
+inherit pkgconfig siteinfo
+
+PACKAGES =+ "libcrypto libssl"
+FILES_libcrypto = "${libdir}/libcrypto.so.*"
+FILES_libssl = "${libdir}/libssl.so.*"
+FILES_${PN} =+ " ${libdir}/ssl/*"
+
+do_configure () {
+ cd util
+ perl perlpath.pl ${bindir}
+ cd ..
+ ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
+
+ os=${HOST_OS}
+ if [ "x$os" = "xlinux-uclibc" ]; then
+ os=linux
+ fi
+ target="$os-${HOST_ARCH}"
+ case $target in
+ linux-arm)
+ target=linux-elf-arm
+ ;;
+ linux-armeb)
+ target=linux-elf-armeb
+ ;;
+ linux-sh3)
+ target=debian-sh3
+ ;;
+ linux-sh4)
+ target=debian-sh4
+ ;;
+ linux-i486)
+ target=debian-i386-i486
+ ;;
+ linux-i586)
+ target=debian-i386-i586
+ ;;
+ linux-i686)
+ target=debian-i386-i686/cmov
+ ;;
+ linux-mips)
+ target=debian-mips
+ ;;
+ linux-mipsel)
+ target=debian-mipsel
+ ;;
+ linux-powerpc)
+ target=linux-ppc
+ ;;
+ linux-supersparc)
+ target=linux-sparcv8
+ ;;
+ linux-sparc)
+ target=linux-sparcv8
+ ;;
+ esac
+ # inject machine-specific flags
+ sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
+ perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target
+}
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ install -m 0755 -d ${D}${libdir}/pkgconfig
+ oe_runmake INSTALL_PREFIX="${D}" install
+ chmod 644 ${D}${libdir}/pkgconfig/openssl.pc
+ oe_libinstall -so libcrypto ${D}${libdir}
+ oe_libinstall -so libssl ${D}${libdir}
+}
diff --git a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
new file mode 100644
index 000000000..31c5568ba
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
@@ -0,0 +1,28 @@
+require openssl.inc
+
+PR = "r0"
+SRC_URI += "file://debian/ca.patch \
+ file://debian/config-hurd.patch;apply=no \
+ file://debian/debian-targets.patch \
+ file://debian/engines-path.patch \
+ file://debian/kfreebsd-pipe.patch;apply=no \
+ file://debian/make-targets.patch \
+ file://debian/man-dir.patch \
+ file://debian/man-section.patch \
+ file://debian/no-rpath.patch \
+ file://debian/no-symbolic.patch \
+ file://debian/pic.patch \
+ file://debian/pkg-config.patch \
+ file://debian/valgrind.patch \
+ file://debian/rc4-amd64.patch \
+ file://debian/rehash-crt.patch \
+ file://debian/rehash_pod.patch \
+ file://debian/shared-lib-ext.patch \
+ file://debian/stddef.patch \
+ file://debian/version-script.patch \
+ file://debian/perl-path.diff"
+
+SRC_URI += "file://configure-targets.patch \
+ file://shared-libs.patch"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch
new file mode 100644
index 000000000..e6da2eaa5
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch
@@ -0,0 +1,13 @@
+Index: openswan-2.4.7/Makefile.inc
+===================================================================
+--- openswan-2.4.7.orig/Makefile.inc 2006-12-25 18:05:40.608503250 +0100
++++ openswan-2.4.7/Makefile.inc 2006-12-25 18:06:39.028154250 +0100
+@@ -158,7 +158,7 @@
+ # how backup names are composed.
+ # Note that the install procedures will never overwrite an existing config
+ # file, which is why -b is not specified for them.
+-INSTBINFLAGS=-b --suffix=.old
++INSTBINFLAGS=
+ INSTSUIDFLAGS=--mode=u+rxs,g+rx,o+rx --group=root -b --suffix=.old
+ INSTMANFLAGS=
+ INSTCONFFLAGS=
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch
new file mode 100644
index 000000000..e3cc8762c
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch
@@ -0,0 +1,26 @@
+--- openswan-2.2.0.orig/programs/Makefile.program 2004-06-03 03:06:27.000000000 +0200
++++ openswan-2.2.0/programs/Makefile.program 2005-03-05 13:50:19.000000000 +0100
+@@ -30,10 +30,6 @@
+
+ CFLAGS+= ${WERROR}
+
+-ifneq ($(LD_LIBRARY_PATH),)
+-LDFLAGS=-L$(LD_LIBRARY_PATH)
+-endif
+-
+ MANDIR8=$(MANTREE)/man8
+ MANDIR5=$(MANTREE)/man5
+
+--- openswan-2.2.0.orig/programs/pluto/Makefile 2005-01-03 20:40:45.000000000 +0100
++++ openswan-2.2.0/programs/pluto/Makefile 2005-03-05 13:51:21.000000000 +0100
+@@ -234,10 +234,6 @@
+ LIBSPLUTO+=${CURL_LIBS}
+ LIBSPLUTO+= -lgmp -lresolv # -lefence
+
+-ifneq ($(LD_LIBRARY_PATH),)
+-LDFLAGS=-L$(LD_LIBRARY_PATH)
+-endif
+-
+ LIBSADNS = $(OPENSWANLIB)
+ LIBSADNS += -lresolv # -lefence
+
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
new file mode 100644
index 000000000..b3863a584
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
@@ -0,0 +1,377 @@
+diff -Nru openswan-2.4.7.orig/doc/Makefile openswan-2.4.7/doc/Makefile
+--- openswan-2.4.7.orig/doc/Makefile 2005-11-08 23:32:45.000000000 +0200
++++ openswan-2.4.7/doc/Makefile 2006-12-06 22:46:54.732830840 +0200
+@@ -1,6 +1,6 @@
+ # Makefile to generate various formats from HTML source
+ #
+-# Assumes the htmldoc utility is available.
++# No longer cares if the htmldoc utility is available.
+ # This can be downloaded from www.easysw.com
+ #
+ # Also needs lynx(1) for HTML-to-text conversion
+diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl
+--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl 2004-07-16 03:24:45.000000000 +0300
++++ openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl 2006-12-06 22:46:54.732830840 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl
+--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2004-07-10 11:07:06.000000000 +0300
++++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2006-12-06 22:46:54.736831090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
+ # des_cblock (*input);
+diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl
+--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2004-07-10 11:07:06.000000000 +0300
++++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2006-12-06 22:46:54.736831090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # require 'x86asm.pl';
+ # &asm_init("cpp","des-586.pl");
+diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl
+--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2004-07-10 11:07:07.000000000 +0300
++++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2006-12-06 22:46:54.736831090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86ms;
+
+diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl
+--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2004-07-10 11:07:07.000000000 +0300
++++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2006-12-06 22:46:54.736831090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86unix;
+
+diff -Nru openswan-2.4.7.orig/lib/liblwres/Makefile openswan-2.4.7/lib/liblwres/Makefile
+--- openswan-2.4.7.orig/lib/liblwres/Makefile 2004-12-18 20:13:34.000000000 +0200
++++ openswan-2.4.7/lib/liblwres/Makefile 2006-12-06 22:46:54.736831090 +0200
+@@ -20,7 +20,7 @@
+ CDEFINES = -g
+ CWARNINGS = -Werror
+
+-CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS}
++CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS} $(USERCOMPILE)
+
+ VERSION="@(\#) openswan-hacking-9.3-for-osw2"
+ LIBINTERFACE=2
+diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl
+--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl 2004-07-10 11:06:50.000000000 +0300
++++ openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl 2006-12-06 22:46:54.736831090 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl
+--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl 2004-07-10 11:06:50.000000000 +0300
++++ openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl 2006-12-06 22:46:54.740831340 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $prog="des686.pl";
+
+diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl
+--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl 2004-07-10 11:06:50.000000000 +0300
++++ openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl 2006-12-06 22:46:54.740831340 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $L="edi";
+ $R="esi";
+diff -Nru openswan-2.4.7.orig/Makefile.inc openswan-2.4.7/Makefile.inc
+--- openswan-2.4.7.orig/Makefile.inc 2006-11-14 19:56:09.000000000 +0200
++++ openswan-2.4.7/Makefile.inc 2006-12-06 22:48:32.534943089 +0200
+@@ -46,7 +46,7 @@
+ DESTDIR?=
+
+ # "local" part of tree, used in building other pathnames
+-INC_USRLOCAL=/usr/local
++INC_USRLOCAL?=/usr
+
+ # PUBDIR is where the "ipsec" command goes; beware, many things define PATH
+ # settings which are assumed to include it (or at least, to include *some*
+@@ -80,7 +80,7 @@
+ MANPLACES=man3 man5 man8
+
+ # where configuration files go
+-FINALCONFFILE?=/etc/ipsec.conf
++FINALCONFFILE?=/etc/ipsec/ipsec.conf
+ CONFFILE=$(DESTDIR)$(FINALCONFFILE)
+
+ FINALCONFDIR?=/etc
+@@ -91,7 +91,7 @@
+
+ # sample configuration files go into
+ INC_DOCDIR?=share/doc
+-FINALEXAMPLECONFDIR=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
++FINALEXAMPLECONFDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
+ EXAMPLECONFDIR=${DESTDIR}${FINALEXAMPLECONFDIR}
+
+ FINALDOCDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
+@@ -239,7 +239,7 @@
+ # installed one in RH 7.2, won't work - you wind up depending upon
+ # openssl.
+
+-BIND9STATICLIBDIR?=/usr/local/lib
++BIND9STATICLIBDIR?=/usr/lib
+
+ # if you install elsewere, you may need to point the include files to it.
+ #BIND9STATICLIBDIR?=/sandel/lib
+diff -Nru openswan-2.4.7.orig/programs/barf/barf.in openswan-2.4.7/programs/barf/barf.in
+--- openswan-2.4.7.orig/programs/barf/barf.in 2006-11-07 05:49:18.000000000 +0200
++++ openswan-2.4.7/programs/barf/barf.in 2006-12-06 22:46:54.740831340 +0200
+@@ -16,7 +16,7 @@
+
+ LOGS=${LOGS-/var/log}
+ CONFS=${IPSEC_CONFS-/etc}
+-CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec.d}
++CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec/ipsec.d}
+ me="ipsec barf"
+ # Max lines to use for things like 'route -n'
+ maxlines=100
+@@ -238,13 +238,13 @@
+ done
+ fi
+ _________________________ ipsec/ls-libdir
+-ls -l ${IPSEC_LIBDIR-/usr/local/lib/ipsec}
++ls -l ${IPSEC_LIBDIR-/usr/lib/ipsec}
+ _________________________ ipsec/ls-execdir
+-ls -l ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}
++ls -l ${IPSEC_EXECDIR-/usr/libexec/ipsec}
+ _________________________ ipsec/updowns
+-for f in `ls ${IPSEC_EXECDIR-/usr/local/libexec/ipsec} | egrep updown`
++for f in `ls ${IPSEC_EXECDIR-/usr/libexec/ipsec} | egrep updown`
+ do
+- cat ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}/$f
++ cat ${IPSEC_EXECDIR-/usr/libexec/ipsec}/$f
+ done
+ _________________________ /proc/net/dev
+ cat /proc/net/dev
+diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.5 openswan-2.4.7/programs/eroute/eroute.5
+--- openswan-2.4.7.orig/programs/eroute/eroute.5 2006-10-26 23:40:43.000000000 +0300
++++ openswan-2.4.7/programs/eroute/eroute.5 2006-12-06 22:57:19.307864340 +0200
+@@ -168,7 +168,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
++/proc/net/ipsec_eroute, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.8 openswan-2.4.7/programs/eroute/eroute.8
+--- openswan-2.4.7.orig/programs/eroute/eroute.8 2003-10-31 04:32:27.000000000 +0200
++++ openswan-2.4.7/programs/eroute/eroute.8 2006-12-06 22:46:54.740831340 +0200
+@@ -308,7 +308,7 @@
+ .br
+ .LP
+ .SH FILES
+-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
++/proc/net/ipsec_eroute, /usr/bin/ipsec
+ .SH "SEE ALSO"
+ ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_spi(8),
+ ipsec_spigrp(8), ipsec_klipsdebug(8), ipsec_eroute(5)
+diff -Nru openswan-2.4.7.orig/programs/_include/_include.in openswan-2.4.7/programs/_include/_include.in
+--- openswan-2.4.7.orig/programs/_include/_include.in 2003-01-06 23:44:04.000000000 +0200
++++ openswan-2.4.7/programs/_include/_include.in 2006-12-06 22:46:54.740831340 +0200
+@@ -47,10 +47,10 @@
+ do
+ if test ! -r "$f"
+ then
+- if test ! "$f" = "/etc/ipsec.conf"
++ if test ! "$f" = "/etc/ipsec/ipsec.conf"
+ then
+ echo "#:cannot open configuration file \'$f\'"
+- if test "$f" = "/etc/ipsec.secrets"
++ if test "$f" = "/etc/ipsec/ipsec.secrets"
+ then
+ echo "#:Your secrets file will be created when you start FreeS/WAN for the first time."
+ fi
+diff -Nru openswan-2.4.7.orig/programs/ipsec/ipsec.8 openswan-2.4.7/programs/ipsec/ipsec.8
+--- openswan-2.4.7.orig/programs/ipsec/ipsec.8 2003-02-27 18:51:54.000000000 +0200
++++ openswan-2.4.7/programs/ipsec/ipsec.8 2006-12-06 22:46:54.744831590 +0200
+@@ -81,7 +81,7 @@
+ .I ipsec
+ thinks the IPsec configuration files are stored.
+ .SH FILES
+-/usr/local/lib/ipsec usual utilities directory
++/usr/lib/ipsec usual utilities directory
+ .SH ENVIRONMENT
+ .PP
+ The following environment variables control where FreeS/WAN finds its
+diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 openswan-2.4.7/programs/klipsdebug/klipsdebug.5
+--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 2006-10-27 01:21:25.000000000 +0300
++++ openswan-2.4.7/programs/klipsdebug/klipsdebug.5 2006-12-06 22:58:04.150666840 +0200
+@@ -114,7 +114,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
++/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 openswan-2.4.7/programs/klipsdebug/klipsdebug.8
+--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 2006-10-27 01:21:25.000000000 +0300
++++ openswan-2.4.7/programs/klipsdebug/klipsdebug.8 2006-12-06 22:58:22.295800840 +0200
+@@ -111,7 +111,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
++/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/mailkey/mailkey.in openswan-2.4.7/programs/mailkey/mailkey.in
+--- openswan-2.4.7.orig/programs/mailkey/mailkey.in 2006-10-29 02:49:23.000000000 +0300
++++ openswan-2.4.7/programs/mailkey/mailkey.in 2006-12-06 22:46:54.828836839 +0200
+@@ -60,7 +60,7 @@
+
+ "$test1st"
+
+-Common concerns: This account must be able to read /etc/ipsec.secrets.
++Common concerns: This account must be able to read /etc/ipsec/ipsec.secrets.
+ If you haven't generated your key yet, please run 'ipsec newhostkey'."
+ exit 0
+ }
+diff -Nru openswan-2.4.7.orig/programs/pluto/Makefile openswan-2.4.7/programs/pluto/Makefile
+--- openswan-2.4.7.orig/programs/pluto/Makefile 2006-11-07 17:55:52.000000000 +0200
++++ openswan-2.4.7/programs/pluto/Makefile 2006-12-06 22:46:54.832837088 +0200
+@@ -256,7 +256,7 @@
+ -DPOLICYGROUPSDIR=\"${FINALCONFDDIR}/policies\" \
+ -DPERPEERLOGDIR=\"${FINALLOGDIR}/pluto/peer\"
+
+-ALLFLAGS = $(CPPFLAGS) $(CFLAGS)
++ALLFLAGS = $(CPPFLAGS) $(CFLAGS) $(USERCOMPILE)
+
+ # libefence is a free memory allocation debugger
+ # Solaris 2 needs -lsocket -lnsl
+diff -Nru openswan-2.4.7.orig/programs/setup/Makefile openswan-2.4.7/programs/setup/Makefile
+--- openswan-2.4.7.orig/programs/setup/Makefile 2004-12-18 20:13:43.000000000 +0200
++++ openswan-2.4.7/programs/setup/Makefile 2006-12-06 22:46:54.832837088 +0200
+@@ -33,25 +33,10 @@
+ @rm -f $(BINDIR)/setup
+ @$(INSTALL) $(INSTBINFLAGS) setup $(RCDIR)/ipsec
+ @ln -s $(FINALRCDIR)/ipsec $(BINDIR)/setup
+- -@for i in 0 1 2 3 4 5 6; do mkdir -p $(RCDIR)/../rc$$i.d; done
+- -@cd $(RCDIR)/../rc0.d && ln -f -s ../init.d/ipsec K76ipsec
+- -@cd $(RCDIR)/../rc1.d && ln -f -s ../init.d/ipsec K76ipsec
+- -@cd $(RCDIR)/../rc2.d && ln -f -s ../init.d/ipsec S47ipsec
+- -@cd $(RCDIR)/../rc3.d && ln -f -s ../init.d/ipsec S47ipsec
+- -@cd $(RCDIR)/../rc4.d && ln -f -s ../init.d/ipsec S47ipsec
+- -@cd $(RCDIR)/../rc5.d && ln -f -s ../init.d/ipsec S47ipsec
+- -@cd $(RCDIR)/../rc6.d && ln -f -s ../init.d/ipsec K76ipsec
+
+ install_file_list::
+ @echo $(RCDIR)/ipsec
+ @echo $(BINDIR)/setup
+- @echo $(RCDIR)/../rc0.d/K76ipsec
+- @echo $(RCDIR)/../rc1.d/K76ipsec
+- @echo $(RCDIR)/../rc2.d/S47ipsec
+- @echo $(RCDIR)/../rc3.d/S47ipsec
+- @echo $(RCDIR)/../rc4.d/S47ipsec
+- @echo $(RCDIR)/../rc5.d/S47ipsec
+- @echo $(RCDIR)/../rc6.d/K76ipsec
+
+ clean::
+ @rm -f setup
+diff -Nru openswan-2.4.7.orig/programs/showhostkey/showhostkey.in openswan-2.4.7/programs/showhostkey/showhostkey.in
+--- openswan-2.4.7.orig/programs/showhostkey/showhostkey.in 2004-11-14 15:40:41.000000000 +0200
++++ openswan-2.4.7/programs/showhostkey/showhostkey.in 2006-12-06 22:46:54.844837840 +0200
+@@ -18,7 +18,7 @@
+ usage="Usage: $me [--file secrets] [--left] [--right] [--txt gateway] [--id id]
+ [--dhclient] [--ipseckey]"
+
+-file=/etc/ipsec.secrets
++file=/etc/ipsec/ipsec.secrets
+ fmt=""
+ gw=
+ id=
+diff -Nru openswan-2.4.7.orig/programs/spi/spi.5 openswan-2.4.7/programs/spi/spi.5
+--- openswan-2.4.7.orig/programs/spi/spi.5 2006-10-26 23:53:59.000000000 +0300
++++ openswan-2.4.7/programs/spi/spi.5 2006-12-06 23:00:11.910340779 +0200
+@@ -157,7 +157,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_spi, /usr/local/bin/ipsec
++/proc/net/ipsec_spi, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/spi/spi.8 openswan-2.4.7/programs/spi/spi.8
+--- openswan-2.4.7.orig/programs/spi/spi.8 2006-10-30 22:00:04.000000000 +0200
++++ openswan-2.4.7/programs/spi/spi.8 2006-12-06 23:00:27.043286530 +0200
+@@ -215,7 +215,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_spi, /usr/local/bin/ipsec
++/proc/net/ipsec_spi, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.5 openswan-2.4.7/programs/spigrp/spigrp.5
+--- openswan-2.4.7.orig/programs/spigrp/spigrp.5 2006-10-26 23:50:29.000000000 +0300
++++ openswan-2.4.7/programs/spigrp/spigrp.5 2006-12-06 23:01:25.650949280 +0200
+@@ -67,7 +67,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
++/proc/net/ipsec_spigrp, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.8 openswan-2.4.7/programs/spigrp/spigrp.8
+--- openswan-2.4.7.orig/programs/spigrp/spigrp.8 2006-10-26 23:50:29.000000000 +0300
++++ openswan-2.4.7/programs/spigrp/spigrp.8 2006-12-06 23:01:39.079788532 +0200
+@@ -87,7 +87,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
++/proc/net/ipsec_spigrp, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.5 openswan-2.4.7/programs/tncfg/tncfg.5
+--- openswan-2.4.7.orig/programs/tncfg/tncfg.5 2006-10-26 23:58:11.000000000 +0300
++++ openswan-2.4.7/programs/tncfg/tncfg.5 2006-12-06 23:01:59.385057530 +0200
+@@ -101,7 +101,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
++/proc/net/ipsec_tncfg, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
+diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.8 openswan-2.4.7/programs/tncfg/tncfg.8
+--- openswan-2.4.7.orig/programs/tncfg/tncfg.8 2006-10-26 23:58:11.000000000 +0300
++++ openswan-2.4.7/programs/tncfg/tncfg.8 2006-12-06 23:02:09.245673780 +0200
+@@ -63,7 +63,7 @@
+ .SH "FILES"
+
+ .PP
+-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
++/proc/net/ipsec_tncfg, /usr/bin/ipsec
+
+ .SH "SEE ALSO"
+
diff --git a/meta/recipes-connectivity/openswan/openswan_2.4.7.bb b/meta/recipes-connectivity/openswan/openswan_2.4.7.bb
new file mode 100644
index 000000000..4ebb9c7a4
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan_2.4.7.bb
@@ -0,0 +1,36 @@
+SECTION = "console/network"
+DESCRIPTION = "Openswan is an Open Source implementation of IPsec for the \
+Linux operating system."
+HOMEPAGE = "http://www.openswan.org"
+LICENSE = "GPLv2"
+DEPENDS = "gmp flex-native"
+RRECOMMENDS = "kernel-module-ipsec"
+RDEPENDS_nylon = "perl"
+PR = "r0"
+
+SRC_URI = "http://www.openswan.org/download/old/openswan-${PV}.tar.gz \
+ file://openswan-2.4.7-gentoo.patch;patch=1 \
+ file://installflags.patch;patch=1 \
+ file://ld-library-path-breakage.patch;patch=1"
+S = "${WORKDIR}/openswan-${PV}"
+
+PARALLEL_MAKE = ""
+EXTRA_OEMAKE = "DESTDIR=${D} \
+ USERCOMPILE="${CFLAGS}" \
+ FINALCONFDIR=${sysconfdir}/ipsec \
+ INC_RCDEFAULT=${sysconfdir}/init.d \
+ INC_USRLOCAL=${prefix} \
+ INC_MANDIR=share/man WERROR=''"
+
+do_compile () {
+ oe_runmake programs
+}
+
+do_install () {
+ oe_runmake install
+}
+
+FILES_${PN} = "${sysconfdir} ${libdir}/ipsec/* ${sbindir}/* ${libexecdir}/ipsec/*"
+FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+
+CONFFILES_${PN} = "${sysconfdir}/ipsec/ipsec.conf"
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch
new file mode 100644
index 000000000..1810b339a
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch
@@ -0,0 +1,18 @@
+---
+ cmake/OpenSyncInternal.cmake.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- libopensync-0.36.orig/cmake/OpenSyncInternal.cmake.in
++++ libopensync-0.36/cmake/OpenSyncInternal.cmake.in
+@@ -5,11 +5,10 @@ INCLUDE( OpenSyncTesting )
+ INCLUDE( OpenSyncPackaging )
+ INCLUDE( OpenSyncPlugin )
+ INCLUDE( OpenSyncPlatforms )
+ INCLUDE( MacroEnsureOutOfSourceBuild )
+
+-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
+
+
+ SET( OPENSYNC_PLUGINDIR "@OPENSYNC_PLUGINDIR@" )
+ SET( OPENSYNC_FORMATSDIR "@OPENSYNC_FORMATSDIR@" )
+ SET( OPENSYNC_PYTHON_PLUGINDIR "@OPENSYNC_PYTHON_PLUGINDIR@" )
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch
new file mode 100644
index 000000000..7ea461354
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch
@@ -0,0 +1,17 @@
+---
+ opensync/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+Index: libopensync-0.37/opensync/CMakeLists.txt
+===================================================================
+--- libopensync-0.37.orig/opensync/CMakeLists.txt 2008-10-15 13:56:45.000000000 +0100
++++ libopensync-0.37/opensync/CMakeLists.txt 2008-10-15 13:59:03.000000000 +0100
+@@ -67,8 +67,6 @@
+ SET_TARGET_PROPERTIES( opensync PROPERTIES VERSION ${OPENSYNC_LIBVERSION_VERSION} )
+ SET_TARGET_PROPERTIES( opensync PROPERTIES SOVERSION ${OPENSYNC_LIBVERSION_SOVERSION} )
+
+-SET_TARGET_PROPERTIES( opensync PROPERTIES COMPILE_FLAGS ${SYMBOLS_VISIBILITY} )
+-
+ IF ( OPENSYNC_UNITTESTS )
+ ADD_LIBRARY( opensync-testing SHARED ${libopensync_LIB_SRCS} )
+ TARGET_LINK_LIBRARIES( opensync-testing ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${GMODULE2_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBEXSLT_LIBRARIES} ${SQLITE3_LIBRARIES} )
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch
new file mode 100644
index 000000000..04257bc62
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch
@@ -0,0 +1,16 @@
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+Index: libopensync-0.37/CMakeLists.txt
+===================================================================
+--- libopensync-0.37.orig/CMakeLists.txt 2008-08-18 16:14:24.000000000 +0100
++++ libopensync-0.37/CMakeLists.txt 2008-10-15 14:00:12.000000000 +0100
+@@ -65,7 +65,6 @@
+ FIND_PACKAGE( LibXslt REQUIRED )
+ FIND_PACKAGE( LibExslt REQUIRED )
+ FIND_PACKAGE( SWIG )
+-FIND_PACKAGE( PythonLibs )
+ FIND_PACKAGE( Check )
+
+ ADD_SUBDIRECTORY( opensync )
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
new file mode 100644
index 000000000..4a1802ce1
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
@@ -0,0 +1,23 @@
+Index: libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake
+===================================================================
+--- libopensync-plugin-evolution2-0.36.orig/cmake/modules/FindOpenSync.cmake 2008-10-20 13:07:14.000000000 +0100
++++ libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake 2008-10-20 13:08:09.000000000 +0100
+@@ -23,15 +23,15 @@
+ ENDIF ( OpenSync_FIND_REQUIRED )
+
+ IF ( OPENSYNC_MIN_VERSION )
+- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0>=${OPENSYNC_MIN_VERSION} )
++ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync>=${OPENSYNC_MIN_VERSION} )
+ ELSE ( OPENSYNC_MIN_VERSION )
+- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0 )
++ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync )
+ ENDIF ( OPENSYNC_MIN_VERSION )
+
+ FIND_PROGRAM( PKGCONFIG_EXECUTABLE NAMES pkg-config )
+
+ IF ( PKGCONFIG_EXECUTABLE )
+- EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS opensync-1.0 --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
++ EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS libopensync --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
+ STRING( REGEX REPLACE "[\r\n]" " " _opensync_data_DIR "${_opensync_data_DIR}" )
+ ENDIF ( PKGCONFIG_EXECUTABLE )
+
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb
new file mode 100644
index 000000000..a1c4cb188
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb
@@ -0,0 +1,7 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " eds-dbus"
+
+SRC_URI += "file://0.37-fixes.patch;patch=1"
+
+PR = "r1"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb
new file mode 100644
index 000000000..33a049b7d
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb
@@ -0,0 +1 @@
+require libopensync-plugin_0.36.inc
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb
new file mode 100644
index 000000000..33a049b7d
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb
@@ -0,0 +1 @@
+require libopensync-plugin_0.36.inc
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb
new file mode 100644
index 000000000..c06de2fde
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += "openobex bluez4"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch
new file mode 100644
index 000000000..7dad88942
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch
@@ -0,0 +1,13 @@
+Index: libopensync-plugin-syncml-0.38/src/syncml_callbacks.c
+===================================================================
+--- libopensync-plugin-syncml-0.38.orig/src/syncml_callbacks.c 2009-07-31 10:30:33.000000000 +0100
++++ libopensync-plugin-syncml-0.38/src/syncml_callbacks.c 2009-07-31 10:30:39.000000000 +0100
+@@ -405,7 +405,7 @@
+ } else {
+ /* This problem should be fixed with the next SLOW-SYNC. */
+ osync_trace(TRACE_EXIT_ERROR, "%s - unexpected Add or Replace command", __func__);
+- smlErrorSet(error, SML_ERROR_TEMPORARY, "Unwanted Add or Replace command on second OMA DS session.");
++ smlErrorSet(error, SML_ERROR_GENERIC, "Unwanted Add or Replace command on second OMA DS session.");
+ return FALSE;
+ }
+ }
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb
new file mode 100644
index 000000000..d32d62de4
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb
@@ -0,0 +1,7 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " libsyncml (>= 0.4.7)"
+
+SRC_URI += "file://fixerror.patch;patch=1"
+
+PR = "r1" \ No newline at end of file
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb
new file mode 100644
index 000000000..84a48f21f
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb
@@ -0,0 +1,3 @@
+require libopensync-plugin_0.36.inc
+
+DEPENDS += " check"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc b/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc
new file mode 100644
index 000000000..db6b1fa73
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc
@@ -0,0 +1,9 @@
+DEPENDS = "libopensync (>= 0.36)"
+
+SRC_URI = "http://opensync.org/download/releases/${PV}/${P}.tar.bz2"
+
+inherit cmake
+
+FILES_${PN} += "${libdir}/opensync*/plugins/*.so \
+ ${libdir}/opensync*/formats/*.so \
+ ${datadir}/opensync*/defaults/"
diff --git a/meta/recipes-connectivity/opensync/libopensync_0.37.bb b/meta/recipes-connectivity/opensync/libopensync_0.37.bb
new file mode 100644
index 000000000..e9b8ce202
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync_0.37.bb
@@ -0,0 +1,25 @@
+LICENSE = "LGPL"
+HOMEPAGE = "http://www.opensync.org/"
+
+DEPENDS = "sqlite3 libxml2 glib-2.0 check zlib libxslt"
+
+PR = "r1"
+
+SRC_URI = "http://opensync.org/download/releases/${PV}/libopensync-${PV}.tar.bz2\
+ file://cmake.patch;patch=1 \
+ file://build-in-src.patch;patch=1 \
+ file://no-python-check.patch;patch=1"
+
+inherit cmake pkgconfig
+
+LEAD_SONAME = "libopensync.so"
+
+FILES_${PN} += " ${libdir}/opensync*/formats/*.so \
+ ${libdir}/opensync*/osplugin \
+ ${datadir}/opensync*/schemas \
+ ${datadir}/opensync*/capabilities \
+ ${datadir}/opensync*/descriptions \
+ "
+FILES_${PN}-dbg += " ${libdir}/opensync*/formats/.debug/*.so \
+ ${libdir}/opensync*/.debug/osplugin "
+
diff --git a/meta/recipes-connectivity/opensync/libsync_svn.bb b/meta/recipes-connectivity/opensync/libsync_svn.bb
new file mode 100644
index 000000000..660b39aa4
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsync_svn.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "LibSync is a GObject-based framework for more convenient use of \
+OpenSync in GLib applications."
+LICENSE = "LGPL"
+SECTION = "x11"
+DEPENDS = "glib-2.0 gtk+ libglade libopensync avahi"
+RRECOMMENDS = "\
+ libopensync-plugin-file \
+ "
+PV = "0.0+svnr${SRCREV}"
+
+SRC_URI = "svn://svn.o-hand.com/repos/sync/trunk;module=sync;proto=http"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/sync"
+
+PACKAGES += "synctool"
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_synctool = "${bindir} ${datadir}"
diff --git a/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch b/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch
new file mode 100644
index 000000000..d8106bdfc
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch
@@ -0,0 +1,19 @@
+---
+ CMakeLists.txt | 4 ----
+ 1 file changed, 4 deletions(-)
+
+Index: libsyncml-0.5.4/CMakeLists.txt
+===================================================================
+--- libsyncml-0.5.4.orig/CMakeLists.txt 2009-07-31 09:56:16.000000000 +0100
++++ libsyncml-0.5.4/CMakeLists.txt 2009-07-31 09:57:33.000000000 +0100
+@@ -72,10 +72,6 @@
+ CHECK_TYPE_SIZE( uint32_t UINT32_T )
+ CHECK_TYPE_SIZE( uint8_t UINT8_T )
+
+-# ensure out od source build
+-INCLUDE( MacroEnsureOutOfSourceBuild )
+-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
+-
+ # find requirements
+ SET ( GLIB2_MIN_VERSION "2.12" )
+ SET ( OPENOBEX_MIN_VERSION "1.1" )
diff --git a/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb b/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb
new file mode 100644
index 000000000..7feb5e0f1
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Libsyncml is a implementation of the SyncML protocol."
+HOMEPAGE = "http://libsyncml.opensync.org/"
+LICENSE = "LGPL"
+DEPENDS = "sed-native wbxml2 libsoup libxml2 bluez4 openobex check"
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libsyncml/0.5.4/libsyncml-0.5.4.tar.bz2 \
+ file://build-in-src.patch;patch=1"
+
+inherit cmake pkgconfig
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
+
+export VERBOSE=1 \ No newline at end of file
diff --git a/meta/recipes-connectivity/opensync/msynctool_0.37.bb b/meta/recipes-connectivity/opensync/msynctool_0.37.bb
new file mode 100644
index 000000000..773166b3b
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/msynctool_0.37.bb
@@ -0,0 +1,7 @@
+SRC_URI = "http://www.opensync.org/download/releases/${PV}/msynctool-${PV}.tar.bz2"
+
+LICENSE = "GPL"
+DEPENDS = "libopensync glib-2.0"
+HOMEPAGE = "http://www.opensync.org/"
+
+inherit cmake pkgconfig
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
new file mode 100644
index 000000000..a1563c714
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
@@ -0,0 +1,44 @@
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
+Subject: respect DESTDIR and dont use -s with install
+X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
+
+respect DESTDIR and dont use -s with install
+
+$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
+so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
+default to support old installs; not sure if you'd just cut it.
+
+Stripping should be left to the person to handle, not automatically done by
+the install step. Also, `install -s` always calls `strip` which is
+wrong/undesired in cross-compiling scenarios.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Neil Brown <neilb@suse.de>
+---
+
+diff --git a/Makefile b/Makefile
+index 9e9a4b4..5343428 100644
+--- a/Makefile
++++ b/Makefile
+@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
+ portmap.man : portmap.8
+ sed $(MAN_SED) < portmap.8 > portmap.man
+
++DESTDIR = $(BASEDIR)
+ install: all
+- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
+- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
+- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
++ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
++ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
++ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
++ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
++ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
++ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
+
+ clean:
+ rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
new file mode 100644
index 000000000..da55f3799
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
@@ -0,0 +1,28 @@
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
+Subject: fix building with tcpd support disabled
+X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
+
+fix building with tcpd support disabled
+
+Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
+
+Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Neil Brown <neilb@suse.de>
+---
+
+diff --git a/pmap_check.c b/pmap_check.c
+index 84f2c12..443a822 100644
+--- a/pmap_check.c
++++ b/pmap_check.c
+@@ -44,7 +44,9 @@
+ #include <netinet/in.h>
+ #include <rpc/rpcent.h>
+ #endif
++#ifdef HOSTS_ACCESS
+ #include <tcpd.h>
++#endif
+ #include <arpa/inet.h>
+ #include <grp.h>
+
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
new file mode 100644
index 000000000..d563ad5b5
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -0,0 +1,31 @@
+DESCRIPTION = "RPC program number mapper."
+HOMEPAGE = "http://neil.brown.name/portmap/"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
+ file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
+DEPENDS = "virtual/fakeroot-native"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
+ ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
+ file://portmap.init \
+ file://make.patch;apply=yes"
+S = "${WORKDIR}/portmap_5beta"
+
+INITSCRIPT_NAME = "portmap"
+INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
+
+inherit update-rc.d
+
+sbindir = "/sbin"
+
+fakeroot do_install() {
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${base_sbindir}
+ install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
+ oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "portmap-utils"
+FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
+FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init
new file mode 100755
index 000000000..e46513e11
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.init
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: portmap
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: S 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: The RPC portmapper
+# Description: Portmap is a server that converts RPC (Remote
+# Procedure Call) program numbers into DARPA
+# protocol port numbers. It must be running in
+# order to make RPC calls. Services that use
+# RPC include NFS and NIS.
+### END INIT INFO
+
+test -f /sbin/portmap || exit 0
+
+case "$1" in
+ start)
+ echo "Starting portmap daemon..."
+ start-stop-daemon --start --quiet --exec /sbin/portmap
+
+ if [ -f /var/run/portmap.upgrade-state ]; then
+ echo "Restoring old RPC service information..."
+ sleep 1 # needs a short pause or pmap_set won't work. :(
+ pmap_set </var/run/portmap.upgrade-state
+ rm -f /var/run/portmap.upgrade-state
+ echo "done."
+ fi
+
+ ;;
+ stop)
+ echo "Stopping portmap daemon..."
+ start-stop-daemon --stop --quiet --exec /sbin/portmap
+ ;;
+ reload)
+ ;;
+ force-reload)
+ $0 restart
+ ;;
+ restart)
+ pmap_dump >/var/run/portmap.state
+ $0 stop
+ $0 start
+ if [ ! -f /var/run/portmap.upgrade-state ]; then
+ sleep 1
+ pmap_set </var/run/portmap.state
+ fi
+ rm -f /var/run/portmap.state
+ ;;
+ *)
+ echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
new file mode 100644
index 000000000..49ac1d833
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -0,0 +1,20 @@
+require portmap.inc
+
+DEPENDS += "tcp-wrappers"
+PR = "r7"
+
+SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
+ file://destdir-no-strip.patch \
+ file://tcpd-config.patch \
+ file://portmap.init"
+
+S = "${WORKDIR}/${BPN}_${PV}/"
+
+CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
+CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
+
+fakeroot do_install() {
+ install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/meta/recipes-connectivity/ppp-dialin/files/host-peer b/meta/recipes-connectivity/ppp-dialin/files/host-peer
new file mode 100644
index 000000000..e7e2e11d4
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/files/host-peer
@@ -0,0 +1,11 @@
+-detach
+defaultroute
+nocrtscts
+lock
+noauth
+lcp-echo-interval 5
+lcp-echo-failure 3
+usepeerdns
+115200
+local
+asyncmap 0
diff --git a/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin b/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin
new file mode 100644
index 000000000..ea2771311
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/pppd call host
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
new file mode 100644
index 000000000..6861d8ad4
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -0,0 +1,35 @@
+SECTION = "console/network"
+DESCRIPTION = "Enables PPP dial-in through a serial connection"
+DEPENDS = "ppp"
+RDEPENDS = "ppp"
+PR = "r5"
+LICENSE = "MIT"
+
+SRC_URI = "file://host-peer \
+ file://ppp-dialin"
+
+do_install() {
+ install -d ${D}${sysconfdir}/ppp/peers
+ install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
+
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
+}
+
+PACKAGE_ARCH = "all"
+
+pkg_postinst() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
+fi
+}
+
+pkg_postrm() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ deluser ppp
+fi
+}
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns b/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns
new file mode 100644
index 000000000..998219de9
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns
@@ -0,0 +1,12 @@
+#!/bin/sh
+ACTUALCONF=/var/run/resolv.conf
+PPPCONF=/var/run/ppp/resolv.conf
+if [ -f $PPPCONF ] ; then
+ if [ -f $ACTUALCONF ] ; then
+ if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then
+ mv $ACTUALCONF $ACTUALCONF.ppporig
+ fi
+ fi
+
+ ln -sf $PPPCONF $ACTUALCONF
+fi
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns b/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns
new file mode 100644
index 000000000..2eadec689
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns
@@ -0,0 +1,5 @@
+#!/bin/sh
+ACTUALCONF=/var/run/resolv.conf
+if [ -f $ACTUALCONF.ppporig ] ; then
+ mv $ACTUALCONF.ppporig $ACTUALCONF
+fi
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch
new file mode 100644
index 000000000..6473a08bc
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch
@@ -0,0 +1,290 @@
+This patch comes from OpenEmbedded.
+The original patch is from Debian / SuSE to implement replacedefaultroute
+Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
+--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
++++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
+@@ -198,6 +198,16 @@
+ "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
+ &ipcp_wantoptions[0].default_route },
+
++#ifdef __linux__
++ { "replacedefaultroute", o_bool,
++ &ipcp_wantoptions[0].replace_default_route,
++ "Replace default route", 1
++ },
++ { "noreplacedefaultroute", o_bool,
++ &ipcp_allowoptions[0].replace_default_route,
++ "Never replace default route", OPT_A2COPY,
++ &ipcp_wantoptions[0].replace_default_route },
++#endif
+ { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
+ "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
+ { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
+@@ -271,7 +281,7 @@
+ ip_active_pkt
+ };
+
+-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
++static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
+ static void ipcp_script __P((char *, int)); /* Run an up/down script */
+ static void ipcp_script_done __P((void *));
+
+@@ -1742,7 +1752,12 @@
+ if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
+ return 0;
+ if (wo->default_route)
++#ifndef __linux__
+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
++#else
++ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[u] = 1;
+ if (wo->proxy_arp)
+ if (sifproxyarp(u, wo->hisaddr))
+@@ -1830,7 +1845,8 @@
+ */
+ if (demand) {
+ if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
+- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
++ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route);
+ if (go->ouraddr != wo->ouraddr) {
+ warn("Local IP address changed to %I", go->ouraddr);
+ script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
+@@ -1855,7 +1871,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1905,7 +1926,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1983,7 +2009,7 @@
+ sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
+ sifdown(f->unit);
+ ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
+- ipcp_hisoptions[f->unit].hisaddr);
++ ipcp_hisoptions[f->unit].hisaddr, 0);
+ }
+
+ /* Execute the ip-down script */
+@@ -1999,12 +2025,21 @@
+ * proxy arp entries, etc.
+ */
+ static void
+-ipcp_clear_addrs(unit, ouraddr, hisaddr)
++ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
+ int unit;
+ u_int32_t ouraddr; /* local address */
+ u_int32_t hisaddr; /* remote address */
++ bool replacedefaultroute;
+ {
+- if (proxy_arp_set[unit]) {
++ /* If replacedefaultroute, sifdefaultroute will be called soon
++ * with replacedefaultroute set and that will overwrite the current
++ * default route. This is the case only when doing demand, otherwise
++ * during demand, this cifdefaultroute would restore the old default
++ * route which is not what we want in this case. In the non-demand
++ * case, we'll delete the default route and restore the old if there
++ * is one saved by an sifdefaultroute with replacedefaultroute.
++ */
++ if (!replacedefaultroute && default_route_set[unit]) {
+ cifproxyarp(unit, hisaddr);
+ proxy_arp_set[unit] = 0;
+ }
+diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
+--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
++++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
+@@ -70,6 +70,7 @@
+ bool old_addrs; /* Use old (IP-Addresses) option? */
+ bool req_addr; /* Ask peer to send IP address? */
+ bool default_route; /* Assign default route through interface? */
++ bool replace_default_route; /* Replace default route through interface? */
+ bool proxy_arp; /* Make proxy ARP entry for peer? */
+ bool neg_vj; /* Van Jacobson Compression? */
+ bool old_vj; /* use old (short) form of VJ option? */
+diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
+--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
++++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
+@@ -121,6 +121,13 @@
+ This entry is removed when the PPP connection is broken. This option
+ is privileged if the \fInodefaultroute\fR option has been specified.
+ .TP
++.B replacedefaultroute
++This option is a flag to the defaultroute option. If defaultroute is
++set and this flag is also set, pppd replaces an existing default route
++with the new default route.
++
++
++.TP
+ .B disconnect \fIscript
+ Execute the command specified by \fIscript\fR, by passing it to a
+ shell, after
+@@ -717,7 +724,12 @@
+ .TP
+ .B nodefaultroute
+ Disable the \fIdefaultroute\fR option. The system administrator who
+-wishes to prevent users from creating default routes with pppd
++wishes to prevent users from adding a default route with pppd
++can do so by placing this option in the /etc/ppp/options file.
++.TP
++.B noreplacedefaultroute
++Disable the \fIreplacedefaultroute\fR option. The system administrator who
++wishes to prevent users from replacing a default route with pppd
+ can do so by placing this option in the /etc/ppp/options file.
+ .TP
+ .B nodeflate
+diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
+--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
++++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
+@@ -643,7 +643,11 @@
+ int cif6addr __P((int, eui64_t, eui64_t));
+ /* Remove an IPv6 address from i/f */
+ #endif
++#ifndef __linux__
+ int sifdefaultroute __P((int, u_int32_t, u_int32_t));
++#else
++int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt));
++#endif
+ /* Create default route through i/f */
+ int cifdefaultroute __P((int, u_int32_t, u_int32_t));
+ /* Delete default route through i/f */
+diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
+--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
++++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
+@@ -206,6 +206,8 @@
+
+ static int if_is_up; /* Interface has been marked up */
+ static int have_default_route; /* Gateway for default route added */
++static struct rtentry old_def_rt; /* Old default route */
++static int default_rt_repl_rest; /* replace and restore old default rt */
+ static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
+ static char proxy_arp_dev[16]; /* Device for proxy arp entry */
+ static u_int32_t our_old_addr; /* for detecting address changes */
+@@ -1537,6 +1539,9 @@
+ p = NULL;
+ }
+
++ SET_SA_FAMILY (rt->rt_dst, AF_INET);
++ SET_SA_FAMILY (rt->rt_gateway, AF_INET);
++
+ SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
+ SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
+ SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
+@@ -1606,20 +1611,51 @@
+ /********************************************************************
+ *
+ * sifdefaultroute - assign a default route through the address given.
+- */
+-
+-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
+-{
+- struct rtentry rt;
+-
+- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
+- if (rt.rt_flags & RTF_GATEWAY)
+- error("not replacing existing default route via %I",
+- SIN_ADDR(rt.rt_gateway));
+- else
+- error("not replacing existing default route through %s",
+- rt.rt_dev);
+- return 0;
++ *
++ * If the global default_rt_repl_rest flag is set, then this function
++ * already replaced the original system defaultroute with some other
++ * route and it should just replace the current defaultroute with
++ * another one, without saving the current route. Use: demand mode,
++ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
++ * and then changes the temporary addresses to the addresses for the real
++ * ppp connection when it has come up.
++ */
++
++int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
++{
++ struct rtentry rt, tmp_rt;
++ struct rtentry *del_rt = NULL;
++
++ if (default_rt_repl_rest) {
++ /* We have already reclaced the original defaultroute, if we
++ * are called again, we will delete the current default route
++ * and set the new default route in this function.
++ * - this is normally only the case the doing demand: */
++ if (defaultroute_exists( &tmp_rt ))
++ del_rt = &tmp_rt;
++ } else if ( defaultroute_exists( &old_def_rt ) &&
++ strcmp( old_def_rt.rt_dev, ifname ) != 0) {
++ /* We did not yet replace an existing default route, let's
++ * check if we should save and replace a default route:
++ */
++ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
++ if (old_gateway != gateway) {
++ if (!replace) {
++ error("not replacing default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ return 0;
++ } else {
++ // we need to copy rt_dev because we need it permanent too:
++ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1);
++ strcpy(tmp_dev, old_def_rt.rt_dev);
++ old_def_rt.rt_dev = tmp_dev;
++
++ notice("replacing old default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ default_rt_repl_rest = 1;
++ del_rt = &old_def_rt;
++ }
++ }
+ }
+
+ memset (&rt, 0, sizeof (rt));
+@@ -1638,6 +1674,12 @@
+ error("default route ioctl(SIOCADDRT): %m");
+ return 0;
+ }
++ if (default_rt_repl_rest && del_rt)
++ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno);
++ return 0;
++ }
+
+ have_default_route = 1;
+ return 1;
+@@ -1673,6 +1715,16 @@
+ return 0;
+ }
+ }
++ if (default_rt_repl_rest) {
++ notice("restoring old default route to %s [%I]",
++ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway));
++ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno);
++ return 0;
++ }
++ default_rt_repl_rest = 0;
++ }
+
+ return 1;
+ }
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch
new file mode 100644
index 000000000..daa7f2ecc
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch
@@ -0,0 +1,13 @@
+The patch comes from OpenEmbedded
+
+--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
++++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
+@@ -62,7 +62,7 @@
+
+ HAS_SHADOW=y
+ #USE_PAM=y
+-#HAVE_INET6=y
++HAVE_INET6=y
+
+ # Enable plugins
+ PLUGIN=y
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/init b/meta/recipes-connectivity/ppp/ppp-2.4.5/init
new file mode 100755
index 000000000..5b3b7abe2
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# /etc/init.d/ppp: start or stop PPP link.
+#
+# If you want PPP started on boot time (most dialup systems won't need it)
+# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
+# follow the instructions in the comments in that file.
+
+test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
+if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
+
+case "$1" in
+ start)
+ echo -n "Starting up PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ /etc/ppp/ppp_on_boot
+ else
+ pppd call provider
+ fi
+ echo "."
+ ;;
+ stop)
+ echo -n "Shutting down PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ poff
+ else
+ poff provider
+ fi
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting PPP link: pppd"
+ if [ "$RUNFILE" = "1" ]; then
+ poff
+ sleep 5
+ /etc/ppp/ppp_on_boot
+ else
+ poff provider
+ sleep 5
+ pppd call provider
+ fi
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
new file mode 100755
index 000000000..06d35487a
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $
+#
+# This script is run by the pppd _after_ the link is brought down.
+# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
+# routes, unset IP addresses etc. you should create script(s) there.
+#
+# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
+# after that package), so choose local script names with that in mind.
+#
+# This script is called with the following arguments:
+# Arg Name Example
+# $1 Interface name ppp0
+# $2 The tty ttyS1
+# $3 The link speed 38400
+# $4 Local IP number 12.34.56.78
+# $5 Peer IP number 12.34.56.99
+# $6 Optional ``ipparam'' value foo
+
+# The environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=`/usr/bin/basename "$2"`
+export PPP_TTYNAME
+
+# Main Script starts here
+
+run-parts /etc/ppp/ip-down.d
+
+# last line
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up
new file mode 100755
index 000000000..fc2fae9fe
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: ip-up,v 1.2 1998/02/10 21:25:34 phil Exp $
+#
+# This script is run by the pppd after the link is established.
+# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
+# set IP address, run the mailq etc. you should create script(s) there.
+#
+# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
+# after that package), so choose local script names with that in mind.
+#
+# This script is called with the following arguments:
+# Arg Name Example
+# $1 Interface name ppp0
+# $2 The tty ttyS1
+# $3 The link speed 38400
+# $4 Local IP number 12.34.56.78
+# $5 Peer IP number 12.34.56.99
+# $6 Optional ``ipparam'' value foo
+
+# The environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=`/usr/bin/basename "$2"`
+export PPP_TTYNAME
+
+# Main Script starts here
+
+run-parts /etc/ppp/ip-up.d
+
+# last line
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
new file mode 100644
index 000000000..9ba868839
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
@@ -0,0 +1,19 @@
+The patch comes from OpenEmbedded.
+Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
+--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
++++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
+@@ -117,10 +117,10 @@
+ #LIBS += -lshadow $(LIBS)
+ endif
+
+-ifneq ($(wildcard /usr/include/crypt.h),)
++#ifneq ($(wildcard /usr/include/crypt.h),)
+ CFLAGS += -DHAVE_CRYPT_H=1
+ LIBS += -lcrypt
+-endif
++#endif
+
+ ifdef NEEDDES
+ ifndef USE_CRYPT
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch
new file mode 100644
index 000000000..94af5af6d
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch
@@ -0,0 +1,93 @@
+The patch comes from OpenEmbedded
+Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux
+--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800
++++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800
+@@ -25,7 +25,7 @@
+
+ install: chat
+ mkdir -p $(BINDIR) $(MANDIR)
+- $(INSTALL) -s -c chat $(BINDIR)
++ $(INSTALL) -c chat $(BINDIR)
+ $(INSTALL) -c -m 644 chat.8 $(MANDIR)
+
+ clean:
+diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
+--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
++++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800
+@@ -99,7 +99,7 @@
+ CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
+ LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
+ TARGETS += srp-entry
+-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
++EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
+ MANPAGES += srp-entry.8
+ EXTRACLEAN += srp-entry.o
+ NEEDDES=y
+@@ -200,7 +200,7 @@
+ install: pppd
+ mkdir -p $(BINDIR) $(MANDIR)
+ $(EXTRAINSTALL)
+- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
+ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ chmod o-rx,u+s $(BINDIR)/pppd; fi
+ $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
+diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux
+--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
++++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800
+@@ -36,11 +36,11 @@
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
+- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
+- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
+- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
++ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
++ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
++ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
++ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR)
++ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR)
+
+ radius.so: radius.o libradiusclient.a
+ $(CC) -o radius.so -shared radius.o libradiusclient.a
+diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
+--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800
+@@ -43,9 +43,9 @@
+
+ install: all
+ $(INSTALL) -d -m 755 $(LIBDIR)
+- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
++ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
+ $(INSTALL) -d -m 755 $(BINDIR)
+- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
++ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
+
+ clean:
+ rm -f *.o *.so pppoe-discovery
+diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
+--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
++++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800
+@@ -17,5 +17,5 @@
+
+ install:
+ mkdir -p $(BINDIR) $(MANDIR)
+- $(INSTALL) -s -c pppdump $(BINDIR)
++ $(INSTALL) -c pppdump $(BINDIR)
+ $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
+diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
+--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
++++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800
+@@ -22,7 +22,7 @@
+
+ install: pppstats
+ -mkdir -p $(MANDIR)
+- $(INSTALL) -s -c pppstats $(BINDIR)
++ $(INSTALL) -c pppstats $(BINDIR)
+ $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
+
+ pppstats: $(PPPSTATSRCS)
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/poff b/meta/recipes-connectivity/ppp/ppp-2.4.5/poff
new file mode 100644
index 000000000..0521a9406
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/poff
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Lets see how many pppds are running....
+set -- `cat /var/run/ppp*.pid 2>/dev/null`
+
+case $# in
+ 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
+ # on the assumption that we've not got that far yet.
+ killall pppd
+ ;;
+ 1) # If only one was running then it can be killed (apparently killall
+ # caused problems for some, so lets try killing the pid from the file)
+ kill $1
+ ;;
+ *) # More than one! Aieehh.. Dont know which one to kill.
+ echo "More than one pppd running. None stopped"
+ exit 1
+ ;;
+esac
+
+if [ -r /var/run/ppp-quick ]
+then
+ rm -f /var/run/ppp-quick
+fi
+
+exit 0
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/pon b/meta/recipes-connectivity/ppp/ppp-2.4.5/pon
new file mode 100644
index 000000000..91c059501
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/pon
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = "quick" ]
+then
+ touch /var/run/ppp-quick
+ shift
+fi
+
+/usr/sbin/pppd call ${1:-provider}
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
new file mode 100644
index 000000000..c4e61fdd2
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
@@ -0,0 +1,43 @@
+The patch comes from OpenEmbedded
+Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
+--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
++++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
+@@ -55,6 +55,8 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #include "pppd.h"
+ #include "fsm.h"
+@@ -2095,6 +2097,14 @@
+ u_int32_t peerdns1, peerdns2;
+ {
+ FILE *f;
++ struct stat dirinfo;
++
++ if(stat(_PATH_OUTDIR, &dirinfo)) {
++ if(mkdir(_PATH_OUTDIR, 0775)) {
++ error("Failed to create directory %s: %m", _PATH_OUTDIR);
++ return;
++ }
++ }
+
+ f = fopen(_PATH_RESOLV, "w");
+ if (f == NULL) {
+diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
+--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
++++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
+@@ -30,7 +30,8 @@
+ #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
+ #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
+ #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
+-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
++#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
+
+ #define _PATH_USEROPT ".ppprc"
+ #define _PATH_PSEUDONYM ".ppp_pseudonym"
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
new file mode 100644
index 000000000..e9caf3d13
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
@@ -0,0 +1,77 @@
+DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
+the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
+SECTION = "console/network"
+HOMEPAGE = "http://samba.org/ppp/"
+BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
+DEPENDS = "libpcap"
+LICENSE = "BSD & GPLv2+ & LGPLv2+ & public domain"
+LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
+ file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
+ file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
+ file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
+PR = "r0"
+
+SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
+ file://makefile.patch \
+ file://cifdefroute.patch \
+ file://pppd-resolv-varrun.patch \
+ file://enable-ipv6.patch \
+ file://makefile-remove-hard-usr-reference.patch \
+ file://pon \
+ file://poff \
+ file://init \
+ file://ip-up \
+ file://ip-down \
+ file://08setupdns \
+ file://92removedns"
+
+SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
+
+inherit autotools
+
+EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}/usr/include LIBDIR=${D}/usr/lib/pppd/${PV} BINDIR=${D}/usr/sbin"
+EXTRA_OECONF = "--disable-strip"
+
+do_install_append () {
+ make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
+ mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
+ mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
+ mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
+ install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
+ install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
+ install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
+ install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
+ install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
+ install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
+ rm -rf ${D}/${mandir}/man8/man8
+}
+
+CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
+PACKAGES += "ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools"
+FILES_${PN} = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd"
+FILES_${PN}_nylon = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd /usr/sbin/tdbread"
+FILES_${PN}-dbg += "${libdir}/pppd/2.4.3/.debug"
+FILES_ppp-oa = "/usr/lib/pppd/2.4.3/pppoatm.so"
+FILES_ppp-oe = "/usr/sbin/pppoe-discovery /usr/lib/pppd/2.4.3/rp-pppoe.so"
+FILES_ppp-radius = "/usr/lib/pppd/2.4.3/radius.so /usr/lib/pppd/2.4.3/radattr.so /usr/lib/pppd/2.4.3/radrealms.so"
+FILES_ppp-winbind = "/usr/lib/pppd/2.4.3/winbind.so"
+FILES_ppp-minconn = "/usr/lib/pppd/2.4.3/minconn.so"
+FILES_ppp-password = "/usr/lib/pppd/2.4.3/pass*.so"
+FILES_ppp-tools = "/usr/sbin/pppstats /usr/sbin/pppdump"
+DESCRIPTION_ppp-oa = "Plugin for PPP needed for PPP-over-ATM"
+DESCRIPTION_ppp-oe = "Plugin for PPP needed for PPP-over-Ethernet"
+DESCRIPTION_ppp-radius = "Plugin for PPP that are related to RADIUS"
+DESCRIPTION_ppp-winbind = "Plugin for PPP to authenticate against Samba or Windows"
+DESCRIPTION_ppp-minconn = "Plugin for PPP to specify a minimum connect time before the idle timeout applies"
+DESCRIPTION_ppp-password = "Plugin for PPP to get passwords via a pipe"
+DESCRIPTION_ppp-tools = "The pppdump and pppstats utitilities"
+RDEPENDS_ppp_minconn += "libpcap0.8"
+
+pkg_postinst_${PN}() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ chmod u+s ${sbindir}/pppd
+fi
+}
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb
new file mode 100644
index 000000000..f751f17e0
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
+information about currently available nameservers. It sets \
+itself up as the intermediary between programs that supply \
+nameserver information and programs that need nameserver \
+information."
+SECTION = "console/network"
+LICENSE = "GPL"
+AUTHOR = "Thomas Hood"
+HOMEPAGE = "http://packages.debian.org/resolvconf"
+DEPENDS = "bash"
+RDEPENDS = "bash"
+PR = "r1"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
+
+do_compile () {
+ :
+}
+
+do_install () {
+ install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface
+ install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
+ cp -pPR etc/* ${D}${sysconfdir}/
+ install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+ install -m 0644 README ${D}${docdir}/${P}/
+ install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
+}
+
+PACKAGE_ARCH = "all"
+
diff --git a/meta/recipes-connectivity/wbxml/files/no-doc-install.patch b/meta/recipes-connectivity/wbxml/files/no-doc-install.patch
new file mode 100644
index 000000000..16084e60e
--- /dev/null
+++ b/meta/recipes-connectivity/wbxml/files/no-doc-install.patch
@@ -0,0 +1,15 @@
+--- wbxml2-0.9.2/Makefile.am.old 2007-01-03 19:50:24.000000000 +0000
++++ wbxml2-0.9.2/Makefile.am 2007-01-03 19:50:39.000000000 +0000
+@@ -24,9 +24,9 @@
+ TODO\
+ doxygen.h
+
+-install-data-local:
+- $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
+- cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
++#install-data-local:
++# $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
++# cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
+
+ dist-bz2: distdir
+ sed -e "s/tar.gz/tar.bz2/g" $(distdir)/wbxml2.spec > $(distdir)/wbxml2.spec.aux
diff --git a/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb b/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb
new file mode 100644
index 000000000..b8ba8c747
--- /dev/null
+++ b/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "parser for wbxml"
+LICENSE = "GPLv2"
+
+DEPENDS = "libxml2 sed-native expat"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/wbxmllib/${P}.tar.gz \
+ file://no-doc-install.patch;patch=1"
+
+inherit autotools pkgconfig
+
+do_configure_append() {
+ sed -i s:-I/usr/include::g Makefile
+ sed -i s:-I/usr/include::g */Makefile
+}
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
+