diff options
author | Chunrong Guo <chunrong.guo@nxp.com> | 2017-04-20 17:46:06 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2017-05-02 17:54:58 -0300 |
commit | 304d35eb872228acc048162705dba944c2483ead (patch) | |
tree | a941a7ea5f91f8fd3e243c4d4cfcaa69d46e6122 | |
parent | 382b4195ce40ef4f6d406d94d7aa3a68396fc8a8 (diff) | |
download | meta-freescale-304d35eb872228acc048162705dba944c2483ead.tar.gz |
ofp: add recipes
Signed-off-by: Chunrong Guo <B40290@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
3 files changed, 224 insertions, 0 deletions
diff --git a/recipes-extended/ofp/ofp/0001-Patch-to-install-ofp-example-applications.patch b/recipes-extended/ofp/ofp/0001-Patch-to-install-ofp-example-applications.patch new file mode 100644 index 00000000..041896a6 --- /dev/null +++ b/recipes-extended/ofp/ofp/0001-Patch-to-install-ofp-example-applications.patch | |||
@@ -0,0 +1,166 @@ | |||
1 | From 82691546d6125f1d07c4f9faa06475dff94ba567 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nikhil Agarwal <nikhil.agarwal@linaro.org> | ||
3 | Date: Wed, 11 Jan 2017 00:24:07 +0530 | ||
4 | Subject: [PATCH] Patch to install ofp example applications. | ||
5 | |||
6 | Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> | ||
7 | --- | ||
8 | example/classifier/Makefile.am | 3 ++- | ||
9 | example/fpm/Makefile.am | 3 ++- | ||
10 | example/fpm_burstmode/Makefile.am | 3 ++- | ||
11 | example/ioctl_test/Makefile.am | 3 ++- | ||
12 | example/multicast/Makefile.am | 3 ++- | ||
13 | example/socket/Makefile.am | 3 ++- | ||
14 | example/sysctl/Makefile.am | 3 ++- | ||
15 | example/udp_fwd_socket/Makefile.am | 3 ++- | ||
16 | example/udpecho/Makefile.am | 3 ++- | ||
17 | example/webserver/Makefile.am | 3 ++- | ||
18 | example/webserver2/Makefile.am | 3 ++- | ||
19 | 11 files changed, 22 insertions(+), 11 deletions(-) | ||
20 | |||
21 | diff --git a/example/classifier/Makefile.am b/example/classifier/Makefile.am | ||
22 | index c54542c..cb4eb31 100644 | ||
23 | --- a/example/classifier/Makefile.am | ||
24 | +++ b/example/classifier/Makefile.am | ||
25 | @@ -1,6 +1,7 @@ | ||
26 | include $(top_srcdir)/example/Makefile.inc | ||
27 | |||
28 | -noinst_PROGRAMS = classifier | ||
29 | +inst_PROGRAMS = classifier | ||
30 | +instdir=${exec_prefix}/ofp/bin | ||
31 | classifier_LDFLAGS = $(AM_LDFLAGS) -static | ||
32 | |||
33 | dist_classifier_SOURCES = classifier_main.c | ||
34 | diff --git a/example/fpm/Makefile.am b/example/fpm/Makefile.am | ||
35 | index d04916c..2b459d7 100644 | ||
36 | --- a/example/fpm/Makefile.am | ||
37 | +++ b/example/fpm/Makefile.am | ||
38 | @@ -1,6 +1,7 @@ | ||
39 | include $(top_srcdir)/example/Makefile.inc | ||
40 | |||
41 | -noinst_PROGRAMS = fpm | ||
42 | +inst_PROGRAMS = fpm | ||
43 | +instdir=${exec_prefix}/ofp/bin | ||
44 | fpm_LDFLAGS = $(AM_LDFLAGS) -static | ||
45 | |||
46 | dist_fpm_SOURCES = app_main.c \ | ||
47 | diff --git a/example/fpm_burstmode/Makefile.am b/example/fpm_burstmode/Makefile.am | ||
48 | index 6b7b024..fc8cdfe 100644 | ||
49 | --- a/example/fpm_burstmode/Makefile.am | ||
50 | +++ b/example/fpm_burstmode/Makefile.am | ||
51 | @@ -1,6 +1,7 @@ | ||
52 | include $(top_srcdir)/example/Makefile.inc | ||
53 | |||
54 | -noinst_PROGRAMS = fpm_burstmode | ||
55 | +inst_PROGRAMS = fpm_burstmode | ||
56 | +instdir=${exec_prefix}/ofp/bin | ||
57 | fpm_burstmode_LDFLAGS = $(AM_LDFLAGS) -static | ||
58 | |||
59 | dist_fpm_burstmode_SOURCES = app_main.c | ||
60 | diff --git a/example/ioctl_test/Makefile.am b/example/ioctl_test/Makefile.am | ||
61 | index d45c4c4..98fd573 100644 | ||
62 | --- a/example/ioctl_test/Makefile.am | ||
63 | +++ b/example/ioctl_test/Makefile.am | ||
64 | @@ -1,6 +1,7 @@ | ||
65 | include $(top_srcdir)/example/Makefile.inc | ||
66 | |||
67 | -noinst_PROGRAMS = ioctl_test | ||
68 | +inst_PROGRAMS = ioctl_test | ||
69 | +instdir=${exec_prefix}/ofp/bin | ||
70 | |||
71 | ioctl_test_LDFLAGS = $(AM_LDFLAGS) -static | ||
72 | |||
73 | diff --git a/example/multicast/Makefile.am b/example/multicast/Makefile.am | ||
74 | index 378aaf3..8476123 100644 | ||
75 | --- a/example/multicast/Makefile.am | ||
76 | +++ b/example/multicast/Makefile.am | ||
77 | @@ -1,6 +1,7 @@ | ||
78 | include $(top_srcdir)/example/Makefile.inc | ||
79 | |||
80 | -noinst_PROGRAMS = mcast | ||
81 | +inst_PROGRAMS = mcast | ||
82 | +instdir=${exec_prefix}/ofp/bin | ||
83 | |||
84 | mcast_LDFLAGS = $(AM_LDFLAGS) -static | ||
85 | |||
86 | diff --git a/example/socket/Makefile.am b/example/socket/Makefile.am | ||
87 | index 9fa2b7d..c296fc2 100644 | ||
88 | --- a/example/socket/Makefile.am | ||
89 | +++ b/example/socket/Makefile.am | ||
90 | @@ -1,6 +1,7 @@ | ||
91 | include $(top_srcdir)/example/Makefile.inc | ||
92 | |||
93 | -noinst_PROGRAMS = socket | ||
94 | +inst_PROGRAMS = socket | ||
95 | +instdir=${exec_prefix}/ofp/bin | ||
96 | socket_LDFLAGS = $(AM_LDFLAGS) -static | ||
97 | |||
98 | dist_socket_SOURCES = \ | ||
99 | diff --git a/example/sysctl/Makefile.am b/example/sysctl/Makefile.am | ||
100 | index 42f3a27..7ef0227 100644 | ||
101 | --- a/example/sysctl/Makefile.am | ||
102 | +++ b/example/sysctl/Makefile.am | ||
103 | @@ -1,6 +1,7 @@ | ||
104 | include $(top_srcdir)/example/Makefile.inc | ||
105 | |||
106 | -noinst_PROGRAMS = sysctl | ||
107 | +inst_PROGRAMS = sysctl | ||
108 | +instdir=${exec_prefix}/ofp/bin | ||
109 | |||
110 | sysctl_LDFLAGS = $(AM_LDFLAGS) -static | ||
111 | |||
112 | diff --git a/example/udp_fwd_socket/Makefile.am b/example/udp_fwd_socket/Makefile.am | ||
113 | index 653fd21..c8ce9ca 100644 | ||
114 | --- a/example/udp_fwd_socket/Makefile.am | ||
115 | +++ b/example/udp_fwd_socket/Makefile.am | ||
116 | @@ -1,6 +1,7 @@ | ||
117 | include $(top_srcdir)/example/Makefile.inc | ||
118 | |||
119 | -noinst_PROGRAMS = udp_fwd_socket | ||
120 | +inst_PROGRAMS = udp_fwd_socket | ||
121 | +instdir=${exec_prefix}/ofp/bin | ||
122 | |||
123 | udp_fwd_socket_LDFLAGS = $(AM_LDFLAGS) -static | ||
124 | |||
125 | diff --git a/example/udpecho/Makefile.am b/example/udpecho/Makefile.am | ||
126 | index e64f2c0..a0c1085 100644 | ||
127 | --- a/example/udpecho/Makefile.am | ||
128 | +++ b/example/udpecho/Makefile.am | ||
129 | @@ -1,6 +1,7 @@ | ||
130 | include $(top_srcdir)/example/Makefile.inc | ||
131 | |||
132 | -noinst_PROGRAMS = udpecho | ||
133 | +inst_PROGRAMS = udpecho | ||
134 | +instdir=${exec_prefix}/ofp/bin | ||
135 | |||
136 | udpecho_LDFLAGS = $(AM_LDFLAGS) -static | ||
137 | |||
138 | diff --git a/example/webserver/Makefile.am b/example/webserver/Makefile.am | ||
139 | index 1dad1b6..230515e 100644 | ||
140 | --- a/example/webserver/Makefile.am | ||
141 | +++ b/example/webserver/Makefile.am | ||
142 | @@ -1,6 +1,7 @@ | ||
143 | include $(top_srcdir)/example/Makefile.inc | ||
144 | |||
145 | -noinst_PROGRAMS = webserver | ||
146 | +inst_PROGRAMS = webserver | ||
147 | +instdir=${exec_prefix}/ofp/bin | ||
148 | |||
149 | webserver_LDFLAGS = $(AM_LDFLAGS) -static | ||
150 | |||
151 | diff --git a/example/webserver2/Makefile.am b/example/webserver2/Makefile.am | ||
152 | index d9f4767..c53a9d2 100644 | ||
153 | --- a/example/webserver2/Makefile.am | ||
154 | +++ b/example/webserver2/Makefile.am | ||
155 | @@ -1,6 +1,7 @@ | ||
156 | include $(top_srcdir)/example/Makefile.inc | ||
157 | |||
158 | -noinst_PROGRAMS = webserver2 | ||
159 | +inst_PROGRAMS = webserver2 | ||
160 | +instdir=${exec_prefix}/ofp/bin | ||
161 | |||
162 | webserver2_LDFLAGS = $(AM_LDFLAGS) -static | ||
163 | |||
164 | -- | ||
165 | 2.9.3 | ||
166 | |||
diff --git a/recipes-extended/ofp/ofp/Fix-compilation-issue-with-redefinition-of-a-struct.patch b/recipes-extended/ofp/ofp/Fix-compilation-issue-with-redefinition-of-a-struct.patch new file mode 100644 index 00000000..4163dc8e --- /dev/null +++ b/recipes-extended/ofp/ofp/Fix-compilation-issue-with-redefinition-of-a-struct.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | ofp_netlink.c: do not include netinet/ip.h | ||
2 | |||
3 | The struct iphdr is defined in netinet/ip.h and in linux/ip.h. The | ||
4 | backwards compatible ofp_netlink.c is modified to include linux/ip.h. | ||
5 | |||
6 | http://www.openfastpath.org/pipermail/openfastpath/2016-October/001330.html | ||
7 | |||
8 | |||
9 | --- a/src/ofp_netlink.cold 2017-04-20 16:08:20.942851781 +0800 | ||
10 | +++ b/src/ofp_netlink.c 2017-04-20 16:08:39.222851148 +0800 | ||
11 | @@ -9,7 +9,7 @@ | ||
12 | #include <stdio.h> | ||
13 | #include <string.h> | ||
14 | #include <netinet/in.h> | ||
15 | -#include <netinet/ip.h> | ||
16 | +#include <linux/ip.h> | ||
17 | #include <linux/netlink.h> | ||
18 | #include <linux/rtnetlink.h> | ||
19 | #include <linux/if_arp.h> | ||
diff --git a/recipes-extended/ofp/ofp_git.bb b/recipes-extended/ofp/ofp_git.bb new file mode 100644 index 00000000..1c6757ef --- /dev/null +++ b/recipes-extended/ofp/ofp_git.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "An open source user space fast path TCP/IP stack" | ||
2 | DESCRIPTION = "openfastpath is used to enable accelerated routing/forwarding for IPv4 and IPv6, \ | ||
3 | tunneling and termination for a variety of protocols." | ||
4 | HOMEPAGE = "http://www.openfastpath.org" | ||
5 | SECTION = "console/network" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fbe4957c430eed6cc20521d4eb429fae" | ||
8 | |||
9 | SRC_URI = "git://github.com/OpenFastPath/ofp.git;protocol=https \ | ||
10 | file://0001-Patch-to-install-ofp-example-applications.patch \ | ||
11 | file://Fix-compilation-issue-with-redefinition-of-a-struct.patch \ | ||
12 | " | ||
13 | SRCREV = "f7ea51b32450ba45d87aff79504e39fad801e7a7" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit autotools-brokensep pkgconfig | ||
18 | |||
19 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
20 | |||
21 | DEPENDS = "odp" | ||
22 | |||
23 | EXTRA_OECONF = " \ | ||
24 | --prefix=/usr \ | ||
25 | --libdir=${libdir} \ | ||
26 | --host=${SIMPLE_TARGET_SYS} \ | ||
27 | --with-odp=${STAGING_DIR_TARGET} \ | ||
28 | " | ||
29 | |||
30 | do_configure () { | ||
31 | export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)" | ||
32 | |||
33 | ${S}/bootstrap | ||
34 | ${S}/configure ${EXTRA_OECONF} | ||
35 | } | ||
36 | |||
37 | FILES_${PN} += "/usr/ofp/bin" | ||
38 | FILES_${PN}-dbg += "/usr/ofp/bin/.debug" | ||
39 | COMPATIBLE_MACHINE = "(ls2088a)" | ||