summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorRaymond Danks <raymond@edanks.com>2006-04-18 01:36:07 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-18 01:36:07 +0000
commit3cb13e039b0c1686c987315760c812d153e6b399 (patch)
treec49ed4f5c9b6bac53828b1c7a27eaf7674c6e4e6 /packages
parentf58b825f8d1319d278df8527bce57bb09958ac19 (diff)
libaio: initial add. Patched for MIPS.
Diffstat (limited to 'packages')
-rw-r--r--packages/libaio/.mtn2git_empty0
-rw-r--r--packages/libaio/files/.mtn2git_empty0
-rw-r--r--packages/libaio/files/libaio-0.3.103-more-arches.patch173
-rw-r--r--packages/libaio/files/raw.h39
-rw-r--r--packages/libaio/libaio-oracle_0.3.0.bb35
-rw-r--r--packages/libaio/libaio_0.3.103.bb38
6 files changed, 285 insertions, 0 deletions
diff --git a/packages/libaio/.mtn2git_empty b/packages/libaio/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libaio/.mtn2git_empty
diff --git a/packages/libaio/files/.mtn2git_empty b/packages/libaio/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libaio/files/.mtn2git_empty
diff --git a/packages/libaio/files/libaio-0.3.103-more-arches.patch b/packages/libaio/files/libaio-0.3.103-more-arches.patch
new file mode 100644
index 0000000000..e09b392ff3
--- /dev/null
+++ b/packages/libaio/files/libaio-0.3.103-more-arches.patch
@@ -0,0 +1,173 @@
+diff -urN libaio-0.3.103/src/io_cancel.c libaio-0.3.103.new/src/io_cancel.c
+--- libaio-0.3.103/src/io_cancel.c 2003-05-20 09:54:50.000000000 -0600
++++ libaio-0.3.103.new/src/io_cancel.c 2005-10-13 17:32:27.000000000 -0600
+@@ -17,6 +17,7 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+ #include <libaio.h>
++#include <errno.h>
+ #include "syscall.h"
+
+ io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event)
+diff -urN libaio-0.3.103/src/libaio.h libaio-0.3.103.new/src/libaio.h
+--- libaio-0.3.103/src/libaio.h 2004-09-14 13:40:27.000000000 -0600
++++ libaio-0.3.103.new/src/libaio.h 2005-10-13 17:32:27.000000000 -0600
+@@ -48,7 +48,7 @@
+ IO_CMD_NOOP = 6,
+ } io_iocb_cmd_t;
+
+-#if defined(__i386__) /* little endian, 32 bits */
++#if defined(__i386__) || defined(__mips__) /* little endian, 32 bits */
+ #define PADDED(x, y) x; unsigned y
+ #define PADDEDptr(x, y) x; unsigned y
+ #define PADDEDul(x, y) unsigned long x; unsigned y
+diff -urN libaio-0.3.103/src/syscall-mips.h libaio-0.3.103.new/src/syscall-mips.h
+--- libaio-0.3.103/src/syscall-mips.h 1969-12-31 17:00:00.000000000 -0700
++++ libaio-0.3.103.new/src/syscall-mips.h 2005-10-13 17:41:50.000000000 -0600
+@@ -0,0 +1,134 @@
++#define __NR_io_setup 4000+241
++#define __NR_io_destroy 4000+242
++#define __NR_io_getevents 4000+243
++#define __NR_io_submit 4000+244
++#define __NR_io_cancel 4000+245
++
++#define io_syscall1(type,fname,sname,atype,a) \
++type fname(atype a) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %3\t\t\t# " #sname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ errno = __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
++type fname(atype a, btype b) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %4\t\t\t# " #sname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ errno = __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
++type fname(atype a, btype b, ctype c) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %5\t\t\t# " #sname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ errno = __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
++type fname(atype a, btype b, ctype c, dtype d) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7") = (unsigned long) d; \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %5\t\t\t# " #sname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "+r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ errno = __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname (atype a,btype b,ctype c,dtype d,etype e) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7") = (unsigned long) d; \
++ register unsigned long __a4 asm("$8") = (unsigned long) e; \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %6\t\t\t# " #sname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "+r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ errno = __v0; \
++ return (type) -1; \
++}
++
+diff -urN libaio-0.3.103/src/syscall.h libaio-0.3.103.new/src/syscall.h
+--- libaio-0.3.103/src/syscall.h 2005-01-21 07:11:20.000000000 -0700
++++ libaio-0.3.103.new/src/syscall.h 2005-10-13 17:33:06.000000000 -0600
+@@ -20,6 +20,8 @@
+ #include "syscall-ppc.h"
+ #elif defined(__s390__)
+ #include "syscall-s390.h"
++#elif defined(__mips__)
++#include "syscall-mips.h"
+ #else
+ #error "add syscall-arch.h"
+ #endif
diff --git a/packages/libaio/files/raw.h b/packages/libaio/files/raw.h
new file mode 100644
index 0000000000..642f78ce5a
--- /dev/null
+++ b/packages/libaio/files/raw.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_RAW_H
+#define _SYS_RAW_H 1
+
+#include <stdint.h>
+#include <sys/ioctl.h>
+
+/* The major device number for raw devices. */
+#define RAW_MAJOR 162
+
+/* `ioctl' commands for raw devices. */
+#define RAW_SETBIND _IO(0xac, 0)
+#define RAW_GETBIND _IO(0xac, 1)
+
+struct raw_config_request
+{
+ int raw_minor;
+ uint64_t block_major;
+ uint64_t block_minor;
+};
+
+#endif /* sys/raw.h */
diff --git a/packages/libaio/libaio-oracle_0.3.0.bb b/packages/libaio/libaio-oracle_0.3.0.bb
new file mode 100644
index 0000000000..e3aa23d78b
--- /dev/null
+++ b/packages/libaio/libaio-oracle_0.3.0.bb
@@ -0,0 +1,35 @@
+# libaio-oracle .bb build file
+# Copyright (C) 2005-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+DESCRIPTION="This is a library for accessing the new AIO system calls (asynchronous i/o) for the Linux kernel."
+HOMEPAGE="http://oss.oracle.com/projects/libaio-oracle"
+MAINTAINER = "Raymond Danks <raymondd@ia.amd.com>"
+LICENSE="GPL"
+
+SRC_URI="http://oss.oracle.com/projects/libaio-oracle/dist/files/${PN}-${PV}.tar.gz"
+
+DEPENDS="libaio"
+RDEPENDS="libaio"
+
+inherit autotools
+
+FILES_${PN}="/usr"
+
+#We don't have a raw.h with uClibc, so copy in the one from glibc
+SRC_URI_append_linux-uclibc=" file://raw.h"
+
+do_configure_prepend_linux-uclibc () {
+ install -D -m 0644 ${WORKDIR}/raw.h ${S}/sys/raw.h
+}
+
+do_stage() {
+
+ rm -rf ${STAGE_TEMP}
+ mkdir -p ${STAGE_TEMP}
+ oe_runmake DESTDIR="${STAGE_TEMP}" install
+ install -m 0644 ${STAGE_TEMP}/usr/include/libaio-oracle/libaio-oracle.h ${STAGING_INCDIR}
+ rm -f ${STAGE_TEMP}/usr/lib/*.la
+ oe_libinstall -a -so -C ${STAGE_TEMP}/usr/lib libaio-oracle ${STAGING_LIBDIR}
+}
+
diff --git a/packages/libaio/libaio_0.3.103.bb b/packages/libaio/libaio_0.3.103.bb
new file mode 100644
index 0000000000..1930f77c85
--- /dev/null
+++ b/packages/libaio/libaio_0.3.103.bb
@@ -0,0 +1,38 @@
+# libaio .bb build file
+# Copyright (C) 2005-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see /COPYING)
+
+DESCRIPTION="Asynchronous input/output library that uses the kernels native interface"
+HOMEPAGE="https://rhn.redhat.com/errata/RHBA-2005-085.html"
+MAINTAINER = "Raymond Danks <raymondd@ia.amd.com>"
+LICENSE="GPL"
+
+SRC_URI="http://search.belnet.be/packages/lineox/4.0/updates/SRPMS/${P}-3.src.rpm \
+file://${P}-more-arches.patch;patch=1"
+
+S=${WORKDIR}/${P}
+
+FILES_${PN} = "/usr"
+
+inherit kernel-arch
+
+DEPENDS_append = " rpm2cpio-native"
+
+do_unpack() {
+
+ if ! test -f libaio-${PV}.tar.gz ; then
+ rpm2cpio.pl ${DL_DIR}/${P}-3.src.rpm | cpio -i --make-directories
+ tar xzvf libaio-${PV}.tar.gz
+ fi
+}
+
+do_stage () {
+ #make install prefix='${STAGING_DIR}/${TARGET_SYS}'
+ install -D -m 644 src/libaio.h ${STAGING_DIR}/${TARGET_SYS}/include/libaio.h
+ oe_libinstall -so -C src libaio ${STAGING_LIBDIR}
+
+}
+
+do_install () {
+ make install prefix='${D}/usr'
+}