packages: linux-one/OneTypes.h (NEW), linux-one/linux-one.spec (NEW)=?UTF-8?Q?=20?=- new, ...
qboosh
qboosh at pld-linux.org
Sat Jun 23 21:44:34 CEST 2012
Author: qboosh Date: Sat Jun 23 19:44:34 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- new, extracted from DirectFB to ease kernel rebuilds
---- Files affected:
packages/linux-one:
OneTypes.h (NONE -> 1.1) (NEW), linux-one.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/linux-one/OneTypes.h
diff -u /dev/null packages/linux-one/OneTypes.h:1.1
--- /dev/null Sat Jun 23 21:44:34 2012
+++ packages/linux-one/OneTypes.h Sat Jun 23 21:44:29 2012
@@ -0,0 +1,92 @@
+/*
+ (c) Copyright 2011 Denis Oliver Kropp <dok at directfb.org>
+
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version
+ 2 of the License, or (at your option) any later version.
+*/
+
+#ifndef __ONE_TYPES_H__
+#define __ONE_TYPES_H__
+
+
+/**********************************************************************************************************************
+** Queues
+*/
+
+
+/*
+ * The One Queue ID is a unique identifier for one queue.
+ */
+typedef uint32_t OneQID;
+
+#define ONE_QID_NONE 0
+
+
+/*
+ * Queue Flags
+ */
+typedef enum {
+ ONE_QUEUE_NO_FLAGS = 0x00000000,
+
+ ONE_QUEUE_VIRTUAL = 0x00000001, /* Virtual Queue, has no receive buffers, only forwards to attached queues */
+} OneQueueFlags;
+
+
+/*
+ * Packet Header Flags
+ */
+typedef enum {
+ ONE_PACKET_NO_FLAGS = 0x00000000,
+
+ ONE_PACKET_COMPRESSED = 0x00000001 /* Compressed Packet */
+} OnePacketHeaderFlags;
+
+
+/*
+ * Packet Header
+ */
+typedef struct {
+ OneQID queue_id; /* Queue ID this packet is sent to */
+
+ OnePacketHeaderFlags flags; /* Packet Flags */
+ uint32_t size; /* Packet Size */
+ uint32_t uncompressed; /* Packet Size after decompression */
+} OnePacketHeader;
+
+
+
+
+
+/*
+
+ New QID for global messaging
+
+
+ 16-byte
+
+ 2 byte reserved
+ 2 byte name space
+ 8 byte system within name space (one kernel module instance for example)
+ 4 byte queue id within system
+
+
+ Public name space "MAC" with system IDs
+
+ 6 byte MAC address
+ 2 byte sub address (e.g. multiple systems on a board with one ethernet connection)
+
+
+ Public name space "random" ??
+
+ 8 byte random
+
+
+ Private name spaces could be defined, e.g. for systems without a MAC address.
+*/
+
+#endif
+
================================================================
Index: packages/linux-one/linux-one.spec
diff -u /dev/null packages/linux-one/linux-one.spec:1.1
--- /dev/null Sat Jun 23 21:44:34 2012
+++ packages/linux-one/linux-one.spec Sat Jun 23 21:44:29 2012
@@ -0,0 +1,144 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without dist_kernel # allow non-distribution kernel
+%bcond_without kernel # don't build kernel modules
+%bcond_without userspace # don't build userspace programs
+%bcond_with verbose # verbose build (V=1)
+#
+%if %{without kernel}
+%undefine with_dist_kernel
+%endif
+
+Summary: One IPC Linux kernel module
+Summary(pl.UTF-8): Moduł IPC One dla jądra Linuksa
+Name: linux-one
+Version: 1.6.0
+%define rel 1
+Release: %{rel}
+License: GPL v2+
+Group: Base/Kernel
+# when packaged in DirectFB tarball
+#Source0: http://www.directfb.org/downloads/Core/DirectFB/DirectFB-%{version}.tar.gz
+# but currently:
+# $ git clone git://git.directfb.org/git/directfb/core/DirectFB.git DirectFB.git
+# $ tar cf linux-one.tar -C DirectFB.git/lib/One linux-one
+Source0: %{name}.tar.xz
+# Source0-md5: d794442fccb99b82c9c3d0b2d5609aaa
+Source1: OneTypes.h
+URL: http://www.directfb.org/
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.20.2}
+BuildRequires: rpmbuild(macros) >= 1.379
+%endif
+BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+One IPC Linux kernel module.
+
+Linux One is the new IPC API used by Coma.
+
+%description -l pl.UTF-8
+Moduł IPC One dla jądra Linuksa.
+
+Linux One to nowe API IPC wykorzystywane przez Comę.
+
+%package devel
+Summary: Header file for One IPC device
+Summary(pl.UTF-8): Plik nagłówkowy dla urządzenia IPC One
+Group: Development/Libraries
+Requires: linux-libc-headers
+
+%description devel
+Header file for One IPC device.
+
+Linux One is the new IPC API used by Coma.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy dla urządzenia IPC One.
+
+Linux One to nowe API IPC wykorzystywane przez Comę.
+
+%package -n kernel-one
+Summary: One IPC module for Linux kernel
+Summary(pl.UTF-8): Moduł IPC One dla jądra Linuksa
+Release: %{rel}@%{_kernel_ver_str}
+Group: Base/Kernel
+Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_up
+Requires(postun): %releq_kernel_up
+%endif
+
+%description -n kernel-one
+One IPC module for Linux kernel.
+
+Linux One is the new IPC API used by Coma.
+
+%description -n kernel-one -l pl.UTF-8
+Moduł IPC One dla jądra Linuksa.
+
+Linux One to nowe API IPC wykorzystywane przez Comę.
+
+%prep
+%setup -q -n %{name}
+
+sed -i -e 's/^obj-[^ ]*/obj-m/' src/Makefile-2.6
+echo "EXTRA_CFLAGS = -I`pwd`/include -I`pwd`/src/single" >> src/Makefile-2.6
+
+cp %{SOURCE1} include
+
+%build
+%if %{with kernel}
+cd src
+ln -sf Makefile-2.6 Makefile
+# NOTE: build_kernel_modules (as of rpm macros 1.649) doesn't allow line breaking
+%build_kernel_modules -m linux-one ONECORE=single
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with userspace}
+install -d $RPM_BUILD_ROOT%{_includedir}/linux
+install include/linux/one.h $RPM_BUILD_ROOT%{_includedir}/linux
+%endif
+
+%if %{with kernel}
+cd src
+%install_kernel_modules -m linux-one -d kernel
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n kernel-one
+%depmod %{_kernel_ver}
+
+%postun -n kernel-one
+%depmod %{_kernel_ver}
+
+%if %{with userspace}
+%files devel
+%defattr(644,root,root,755)
+%doc README TODO
+%{_includedir}/linux/one.h
+%endif
+
+%if %{with kernel}
+%files -n kernel-one
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/kernel/linux-one.ko*
+%endif
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2012/06/23 19:44:29 qboosh
+- new, extracted from DirectFB to ease kernel rebuilds
================================================================
More information about the pld-cvs-commit
mailing list