added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,48 @@
From 29b37e45577c0921846c1709a190f08a3b032666 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 8 Mar 2019 09:08:38 -0800
Subject: [PATCH] IFNAMSIZ is defined in net/if.h
Fixes
/mnt/a/yoe/build/tmp/work/qemuriscv64-yoe-linux-musl/linux-atm/2.5.2-r0/recipe-sysroot/usr/include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
| char arp_dev[IFNAMSIZ];
| ^~~~~~~~
In file included from ../../../linux-atm-2.5.2/src/arpd/itf.c:17:
/mnt/a/yoe/build/tmp/work/qemuriscv64-yoe-linux-musl/linux-atm/2.5.2-r0/recipe-sysroot/usr/include/linux/if_arp.h:121:16: error: 'IFNAMSIZ' undeclared here (not in a function)
| char arp_dev[IFNAMSIZ];
| ^~~~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/arpd/arp.c | 1 +
src/arpd/itf.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/arpd/arp.c b/src/arpd/arp.c
index 92d3787..ff1574c 100644
--- a/src/arpd/arp.c
+++ b/src/arpd/arp.c
@@ -17,6 +17,7 @@
#include <netinet/in.h> /* for ntohs, etc. */
#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
#include <linux/types.h>
+#include <net/if.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <atm.h>
diff --git a/src/arpd/itf.c b/src/arpd/itf.c
index 92f0951..d285e3b 100644
--- a/src/arpd/itf.c
+++ b/src/arpd/itf.c
@@ -14,6 +14,7 @@
#include <sys/socket.h>
#define _LINUX_NETDEVICE_H /* glibc2 */
#include <linux/types.h>
+#include <net/if.h>
#include <linux/if_arp.h>
#include "atmd.h"
--
2.21.0

View File

@@ -0,0 +1,28 @@
From a2a2e1b7a3f4f90e32912b5ba9b79e1a02275775 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 1 Sep 2022 11:17:13 -0700
Subject: [PATCH] configure: Check for symbol from libresolv instead of main
This checks will fail with modern autoconf and compilers
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.in
+++ b/configure.in
@@ -45,12 +45,7 @@ AC_CHECK_HEADER(linux/atmsap.h, ,
)
dnl Check for libraries
-dnl libresolv is required
-AC_CHECK_LIB(resolv, main, ,
- AC_MSG_ERROR([*** Unable to find libresolv!!!])
-)
-dnl We don't want libresolv everywhere, just with libatm
LIBS=""
INCLUDES="-I\$(top_srcdir)/src/include"

View File

@@ -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

View File

@@ -0,0 +1,87 @@
From 5217cb7c829cf87771096c4ce41fd4648dca47cb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Aug 2022 16:36:21 -0700
Subject: [PATCH] include string,h from memcpy and strcpy function prototype
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/led/address.c | 1 +
src/led/display.c | 1 +
src/lib/unix.c | 1 +
src/maint/hediag.c | 1 +
src/sigd/kernel.c | 1 +
src/sigd/policy.c | 1 +
6 files changed, 6 insertions(+)
diff --git a/src/led/address.c b/src/led/address.c
index 574e881..b5c5fbb 100644
--- a/src/led/address.c
+++ b/src/led/address.c
@@ -31,6 +31,7 @@
#endif
#include <sys/ioctl.h>
+#include <string.h>
#include <unistd.h>
#include <errno.h>
diff --git a/src/led/display.c b/src/led/display.c
index d78a15d..b835e89 100644
--- a/src/led/display.c
+++ b/src/led/display.c
@@ -5,6 +5,7 @@
#if HAVE_CONFIG_H
#include <config.h>
#endif
+#include <string.h>
#include <atm.h>
#include <atmd.h>
diff --git a/src/lib/unix.c b/src/lib/unix.c
index 34aa465..d5bef54 100644
--- a/src/lib/unix.c
+++ b/src/lib/unix.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
diff --git a/src/maint/hediag.c b/src/maint/hediag.c
index 8a4312a..a4f792f 100644
--- a/src/maint/hediag.c
+++ b/src/maint/hediag.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
diff --git a/src/sigd/kernel.c b/src/sigd/kernel.c
index 9ee74b1..2491626 100644
--- a/src/sigd/kernel.c
+++ b/src/sigd/kernel.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <assert.h>
diff --git a/src/sigd/policy.c b/src/sigd/policy.c
index 2cfb42d..87223a7 100644
--- a/src/sigd/policy.c
+++ b/src/sigd/policy.c
@@ -6,6 +6,7 @@
#include <config.h>
#endif
+#include <string.h>
#include <atm.h>
#include <atmd.h>

View File

@@ -0,0 +1,31 @@
From 94cb952207e44a5c29578c9c56912190a5422876 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 23 Apr 2022 09:41:51 -0700
Subject: [PATCH] make: Add PREFIX knob
This will be used to pass appropriate root prefix which is different
when using usrmerge
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/extra/Makefile.am | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/src/extra/Makefile.am
+++ b/src/extra/Makefile.am
@@ -8,10 +8,10 @@ BUILT_SOURCES = pca200e.bin pca200e_ecd.
CLEANFILES = pca200e.bin pca200e_ecd.bin2 sba200e_ecd.bin2
install-exec-hook:
- $(MKDIR_P) $(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
+ $(MKDIR_P) $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+ $(INSTALL_DATA) $(builddir)/pca200e.bin $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+ $(INSTALL_DATA) $(builddir)/pca200e_ecd.bin2 $(DESTDIR)$(ROOTPREFIX)/lib/firmware
+ $(INSTALL_DATA) $(builddir)/sba200e_ecd.bin2 $(DESTDIR)$(ROOTPREFIX)/lib/firmware
%.bin %.bin2: %.data
objcopy -Iihex $< -Obinary $@.gz

View File

@@ -0,0 +1,59 @@
From 4456e13880803a300e4b6f263ad22a37481b5df5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 29 Aug 2019 09:33:43 -0700
Subject: [PATCH] saaldump,atmdump: Include linux/sockios.h for SIOCGSTAMP
In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
Instead it provides only SIOCGSTAMP_OLD.
The linux/sockios.h header now defines SIOCGSTAMP using either
SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
header file is not pulled so we get a build failure.
Fixes
../../../linux-atm-2.5.2/src/maint/atmdump.c:142:18: error: use of undeclared identifier 'SIOCGSTAMP'
if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
^
1 error generated.
make[3]: *** [Makefile:623: atmdump.o] Error 1
make[3]: *** Waiting for unfinished jobs....
../../../linux-atm-2.5.2/src/maint/saaldump.c:169:14: error: use of undeclared identifier 'SIOCGSTAMP'
if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
^
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/maint/atmdump.c | 2 +-
src/maint/saaldump.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/maint/atmdump.c b/src/maint/atmdump.c
index 8b17826..9e4853b 100644
--- a/src/maint/atmdump.c
+++ b/src/maint/atmdump.c
@@ -5,7 +5,7 @@
#if HAVE_CONFIG_H
#include <config.h>
#endif
-
+#include <linux/sockios.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff --git a/src/maint/saaldump.c b/src/maint/saaldump.c
index 83bdde9..69429a8 100644
--- a/src/maint/saaldump.c
+++ b/src/maint/saaldump.c
@@ -5,7 +5,7 @@
#if HAVE_CONFIG_H
#include <config.h>
#endif
-
+#include <linux/sockios.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
--
2.23.0

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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@

View File

@@ -0,0 +1,37 @@
Description: musl lacks on_exit
Author: Adrian Bunk <bunk@stusta.de>
Only prints a trace on nonzero exit(),
so can safely be disabled in musl builds.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Upstream-Status: Inappropriate [musl specific]
--- linux-atm-2.5.1.orig/src/sigd/atmsigd.c
+++ linux-atm-2.5.1/src/sigd/atmsigd.c
@@ -283,6 +283,7 @@ static void setup_signals(void)
/* ------------------------------- main ... ------------------------------- */
+#if 0
static void trace_on_exit(int status,void *dummy)
{
char path[PATH_MAX+1];
@@ -300,6 +301,7 @@ static void trace_on_exit(int status,voi
dump_trace(file,"Message trace (after error exit)");
if (file != stderr) (void) fclose(file);
}
+#endif
static void manual_override(void)
@@ -517,7 +519,9 @@ int main(int argc,char **argv)
exit(0);
}
}
+#if 0
(void) on_exit(trace_on_exit,NULL);
+#endif
poll_loop();
close_all();
for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);

View File

@@ -0,0 +1,34 @@
SUMMARY = "Drivers and tools to support ATM networking under Linux"
HOMEPAGE = "http://linux-atm.sourceforge.net/"
SECTION = "libs"
LICENSE = "GPL-2.0-only & LGPL-2.0-only"
DEPENDS = "flex flex-native"
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://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
file://0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch \
file://0001-make-Add-PREFIX-knob.patch \
file://0001-include-string-h-from-memcpy-and-strcpy-function-pro.patch \
file://0001-configure-Check-for-symbol-from-libresolv-instead-of.patch \
"
SRC_URI:append:libc-musl = " file://musl-no-on_exit.patch"
SRC_URI[sha256sum] = "9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a"
LIC_FILES_CHKSUM = "\
file://COPYING;md5=d928de9537d846935a98af3bbc6e6ee1 \
file://COPYING.GPL;md5=ac2db169b9309e240555bc77be4f1a33 \
file://COPYING.LGPL;md5=6e29c688d912da12b66b73e32b03d812"
inherit autotools pkgconfig
EXTRA_OEMAKE += "ROOTPREFIX=${root_prefix}"
FILES:${PN} += "${nonarch_base_libdir}/firmware"