summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-connectivity/linuxptp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-connectivity/linuxptp')
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch26
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch36
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch37
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch29
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb24
5 files changed, 152 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch
new file mode 100644
index 000000000..96163f654
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch
@@ -0,0 +1,26 @@
+From b36cafdbcbe2193f5b669e703c608e19e23f80a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 11:16:42 -0700
+Subject: [PATCH 3/4] include missing time.h for time_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.h b/util.h
+index e912f19..3c634c1 100644
+--- a/util.h
++++ b/util.h
+@@ -22,7 +22,7 @@
+
+ #include "ddt.h"
+ #include "ether.h"
+-
++#include <time.h>
+ /**
+ * Table of human readable strings, one for each port state.
+ */
+--
+2.13.3
+
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch
new file mode 100644
index 000000000..e69927514
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch
@@ -0,0 +1,36 @@
+From 3cd28aa771934d9165ff0d7e19932cde65de3e52 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Jul 2017 11:16:57 -0700
+Subject: [PATCH 4/4] Adjust include header sequence to avoid duplicate
+ definitions on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ raw.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raw.c b/raw.c
+index f51c829..494ea7f 100644
+--- a/raw.c
++++ b/raw.c
+@@ -18,8 +18,6 @@
+ */
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <linux/filter.h>
+-#include <linux/if_ether.h>
+ #include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+@@ -32,6 +30,8 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+
++#include <linux/filter.h>
++#include <linux/if_ether.h>
+ #include <linux/errqueue.h>
+ #include <linux/net_tstamp.h>
+ #include <linux/sockios.h>
+--
+2.13.3
+
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
new file mode 100644
index 000000000..b1d96ae5a
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
@@ -0,0 +1,37 @@
+From af485c638c61fa883212ea424e676fbf90bee594 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Tue, 1 Jul 2014 17:37:31 -0300
+Subject: [PATCH] build: Allow CC and prefix to be overriden
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makefile b/makefile
+index 22e7d0d..809cc8f 100644
+--- a/makefile
++++ b/makefile
+@@ -18,7 +18,7 @@
+ KBUILD_OUTPUT =
+
+ DEBUG =
+-CC = $(CROSS_COMPILE)gcc
++CC ?= $(CROSS_COMPILE)gcc
+ VER = -DVER=$(version)
+ CFLAGS = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
+ LDLIBS = -lm -lrt $(EXTRA_LDFLAGS)
+@@ -35,7 +35,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh)
+ version := $(shell $(srcdir)/version.sh $(srcdir))
+ VPATH = $(srcdir)
+
+-prefix = /usr/local
++prefix ?= /usr/local
+ sbindir = $(prefix)/sbin
+ mandir = $(prefix)/man
+ man8dir = $(mandir)/man8
+--
+1.7.10.4
+
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
new file mode 100644
index 000000000..02dbb2346
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
@@ -0,0 +1,29 @@
+From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
+From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Date: Fri, 23 Dec 2016 18:12:29 +0100
+Subject: [PATCH] linuxptp: no incdefs using host headers
+
+Avoid using host headers via incdefs.sh shell script.
+
+Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+---
+
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index 8cdbd15..85174b8 100644
+--- a/makefile
++++ b/makefile
+@@ -33,7 +33,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o pmc.o pmc_common.o \
+ SRC = $(OBJECTS:.o=.c)
+ DEPEND = $(OBJECTS:.o=.d)
+ srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
+-incdefs := $(shell $(srcdir)/incdefs.sh)
++#incdefs := $(shell $(srcdir)/incdefs.sh)
+ version := $(shell $(srcdir)/version.sh $(srcdir))
+ VPATH = $(srcdir)
+
+--
+2.9.3
+
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb
new file mode 100644
index 000000000..c7b8b2933
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
+ file://build-Allow-CC-and-prefix-to-be-overriden.patch \
+ file://no-incdefs-using-host-headers.patch \
+ file://0003-include-missing-time.h-for-time_t.patch \
+ file://0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch \
+ "
+
+SRC_URI[md5sum] = "5688cdfe57932273e1dbf35b3b97b9a0"
+SRC_URI[sha256sum] = "fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165"
+
+EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \
+ EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'"
+
+do_install () {
+ install -d ${D}/${bindir}
+ install -p ${S}/ptp4l ${D}/${bindir}
+ install -p ${S}/pmc ${D}/${bindir}
+ install -p ${S}/phc2sys ${D}/${bindir}
+ install -p ${S}/hwstamp_ctl ${D}/${bindir}
+}
OpenPOWER on IntegriCloud