summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-support/linux-atm
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-support/linux-atm')
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch74
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch34
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch30
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch37
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch19
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch38
-rw-r--r--meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb32
7 files changed, 264 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
new file mode 100644
index 000000000..583a6ca60
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-fix-compile-error-with-linux-kernel-v4.8.patch
@@ -0,0 +1,74 @@
+From 7cdafc0dee8054f82777ed3bf6d4c8b5582d09ad Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 18 Oct 2016 07:56:02 +0000
+Subject: [PATCH] fix compile error with linux kernel v4.8
+
+In src/maint/zntune.c, the glibc time.h is included before linux
+time.h, so when compile the zntune.c, it break down by errors:
+
+ redefinition of 'struct timespec' 'struct timeval'
+ 'struct timezone' 'struct itimerval'
+
+We should exclude the linux time.h by disable linux/atm_zatm.h and
+move some useful definition in linux/atm_zatm.h to zntune.c to resolve
+it.
+
+Upstream-status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ src/include/atm_zatm.h | 26 ++++++++++++++++++++++++++
+ src/maint/zntune.c | 3 +--
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+ create mode 100644 src/include/atm_zatm.h
+
+diff --git a/src/include/atm_zatm.h b/src/include/atm_zatm.h
+new file mode 100644
+index 0000000..7d64f4d
+--- /dev/null
++++ b/src/include/atm_zatm.h
+@@ -0,0 +1,26 @@
++#include <linux/atmapi.h>
++#include <linux/atmioc.h>
++
++#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
++ /* get pool statistics */
++#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
++ /* get statistics and zero */
++#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
++
++struct zatm_pool_info {
++ int ref_count; /* free buffer pool usage counters */
++ int low_water,high_water; /* refill parameters */
++ int rqa_count,rqu_count; /* queue condition counters */
++ int offset,next_off; /* alignment optimizations: offset */
++ int next_cnt,next_thres; /* repetition counter and threshold */
++}; /* set pool parameters */
++
++struct zatm_pool_req {
++ int pool_num; /* pool number */
++ struct zatm_pool_info info; /* actual information */
++};
++
++#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
++#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
++#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
++#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
+diff --git a/src/maint/zntune.c b/src/maint/zntune.c
+index 62d62ab..bb93eab 100644
+--- a/src/maint/zntune.c
++++ b/src/maint/zntune.c
+@@ -13,9 +13,8 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <atm.h>
++#include <atm_zatm.h>
+ #include <sys/time.h> /* for struct timeval, although it's not used */
+-#include <linux/atm_zatm.h>
+-
+
+ static void usage(const char *name)
+ {
+--
+2.9.0
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
new file mode 100644
index 000000000..87e7dc3c6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0001-ttcp-Add-printf-format-string.patch
@@ -0,0 +1,34 @@
+From b83fd54584fabd5d24f6645b4a3cf345c9d2020d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:11:59 -0700
+Subject: [PATCH 1/3] ttcp: Add printf format string
+
+Fixes compiler warnings when format security is enabled
+
+| ../../../linux-atm-2.5.2/src/test/ttcp.c:666:21: error: format not a string literal and no format arguments [-Werror=format-security]
+| fprintf(stderr, Usage);
+| ^~~~~
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/test/ttcp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/test/ttcp.c b/src/test/ttcp.c
+index acb9185..337cee5 100644
+--- a/src/test/ttcp.c
++++ b/src/test/ttcp.c
+@@ -663,7 +663,7 @@ int no_check = 0;
+ exit(0);
+
+ usage:
+- fprintf(stderr, Usage);
++ fprintf(stderr, "%s", Usage);
+ exit(1);
+ }
+
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch
new file mode 100644
index 000000000..ce061231c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0002-sigd-Replace-on_exit-API-with-atexit.patch
@@ -0,0 +1,30 @@
+From 27fa80dc8045e71c30dd2abea835206d5c8f6c71 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:18:56 -0700
+Subject: [PATCH 2/3] sigd: Replace on_exit() API with atexit()
+
+on_exit is not universally available
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/sigd/atmsigd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sigd/atmsigd.c b/src/sigd/atmsigd.c
+index 52e41c7..b766606 100644
+--- a/src/sigd/atmsigd.c
++++ b/src/sigd/atmsigd.c
+@@ -517,7 +517,7 @@ int main(int argc,char **argv)
+ exit(0);
+ }
+ }
+- (void) on_exit(trace_on_exit,NULL);
++ atexit(trace_on_exit);
+ poll_loop();
+ close_all();
+ for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
new file mode 100644
index 000000000..0302286dc
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch
@@ -0,0 +1,37 @@
+From fe954b2fb17d813aaab3e926cee76144314a115a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 16:22:55 -0700
+Subject: [PATCH 3/3] mpoad: Drop old hack to compile with very old glibc
+
+Use poll.h instead of sys/poll.h
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mpoad/io.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/mpoad/io.c b/src/mpoad/io.c
+index 69900c2..8d1433f 100644
+--- a/src/mpoad/io.c
++++ b/src/mpoad/io.c
+@@ -10,14 +10,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <sys/param.h> /* for OPEN_MAX */
+-#if __GLIBC__ >= 2
+-#include <sys/poll.h>
+-#else /* ugly hack to make it compile on RH 4.2 - WA */
+-#include <syscall.h>
+-#include <linux/poll.h>
+-#define SYS_poll 168
+-_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
+-#endif
++#include <poll.h>
+ #include <atm.h>
+ #include <linux/types.h>
+ #include <linux/atmioc.h>
+--
+2.13.1
+
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
new file mode 100644
index 000000000..d1380eb2a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/install-from-buildir.patch
@@ -0,0 +1,19 @@
+install binaries from builddir not srcdir.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+--- linux-atm-2.5.2.orig/src/extra/Makefile.am 2010-12-21 05:07:22.000000000 +0800
++++ linux-atm-2.5.2/src/extra/Makefile.am 2014-12-22 10:56:04.458563269 +0800
+@@ -9,9 +9,9 @@ CLEANFILES = pca200e.bin pca200e_ecd.bin
+
+ install-exec-hook:
+ $(MKDIR_P) $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/pca200e.bin $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
+- $(INSTALL_DATA) $(srcdir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)/lib/firmware
++ $(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware
+
+ %.bin %.bin2: %.data
+ objcopy -Iihex $< -Obinary $@.gz
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
new file mode 100644
index 000000000..62fad2a54
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm/link-with-ldflags.patch
@@ -0,0 +1,38 @@
+LDFLAGS_FOR_BUILD should be required when doing link for qgen.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp linux-atm-2.5.2.orig/configure.in linux-atm-2.5.2/configure.in
+--- linux-atm-2.5.2.orig/configure.in 2010-12-28 23:36:07.000000000 +0800
++++ linux-atm-2.5.2/configure.in 2014-12-22 10:25:23.830510932 +0800
+@@ -66,6 +66,7 @@ else
+ fi
+ AC_SUBST(CC_FOR_BUILD)
+ AC_SUBST(CFLAGS_FOR_BUILD)
++AC_SUBST(LDFLAGS_FOR_BUILD)
+ dnl Add -d flag to bison/yacc to create intermediate .h files
+ YACC="$YACC -d"
+
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.am linux-atm-2.5.2/src/qgen/Makefile.am
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.am 2010-12-28 22:29:31.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.am 2014-12-22 10:23:51.914508318 +0800
+@@ -5,7 +5,7 @@ qgen_SOURCES = common.c common.h file.c
+ qgen_LDADD = -lfl
+
+ COMPILE = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@
+-LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ -o $@
++LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ @LDFLAGS_FOR_BUILD@ -o $@
+
+ #TESTS = $(check_PROGRAMS)
+
+diff -Nurp linux-atm-2.5.2.orig/src/qgen/Makefile.in linux-atm-2.5.2/src/qgen/Makefile.in
+--- linux-atm-2.5.2.orig/src/qgen/Makefile.in 2010-12-29 00:06:11.000000000 +0800
++++ linux-atm-2.5.2/src/qgen/Makefile.in 2014-12-22 10:23:51.914508318 +0800
+@@ -106,6 +106,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
diff --git a/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
new file mode 100644
index 000000000..9fce4fba6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Drivers and tools to support ATM networking under Linux"
+HOMEPAGE = "http://linux-atm.sourceforge.net/"
+SECTION = "libs"
+LICENSE = "GPL-2.0 & LGPL-2.0"
+
+DEPENDS = "virtual/kernel flex flex-native"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+ file://link-with-ldflags.patch \
+ file://install-from-buildir.patch \
+ file://0001-fix-compile-error-with-linux-kernel-v4.8.patch \
+ file://0001-ttcp-Add-printf-format-string.patch \
+ file://0002-sigd-Replace-on_exit-API-with-atexit.patch \
+ file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
+"
+
+SRC_URI[md5sum] = "d49499368c3cf15f73a05d9bce8824a8"
+SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
+
+LIC_FILES_CHKSUM = "\
+file://COPYING;md5=d928de9537d846935a98af3bbc6e6ee1 \
+file://COPYING.GPL;md5=ac2db169b9309e240555bc77be4f1a33 \
+file://COPYING.LGPL;md5=6e29c688d912da12b66b73e32b03d812"
+
+inherit autotools pkgconfig
+
+# The firmware is explicitly put under /lib when installed.
+#
+
+FILES_${PN} += "/lib/firmware"
OpenPOWER on IntegriCloud