From 416cca027dc597a5db0ea7a3c905883b3d4d466d Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 8 Apr 2006 13:16:28 +0000 Subject: linux-libc-header-2.6.12.0: add package, add mips nptl fixes --- .../linux-libc-headers-2.6.12.0/.mtn2git_empty | 0 ...x-libc-headers-2.6.12.0-mips_atomic_fix-1.patch | 19 +++++ .../linux-libc-headers-2.6.12.0-mips_tls-1.patch | 97 ++++++++++++++++++++++ .../linux-libc-headers_2.6.12.0.bb | 72 ++++++++++++++++ 4 files changed, 188 insertions(+) create mode 100644 packages/linux-libc-headers/linux-libc-headers-2.6.12.0/.mtn2git_empty create mode 100644 packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_atomic_fix-1.patch create mode 100644 packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_tls-1.patch create mode 100644 packages/linux-libc-headers/linux-libc-headers_2.6.12.0.bb (limited to 'packages/linux-libc-headers') diff --git a/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/.mtn2git_empty b/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_atomic_fix-1.patch b/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_atomic_fix-1.patch new file mode 100644 index 0000000000..35951b1923 --- /dev/null +++ b/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_atomic_fix-1.patch @@ -0,0 +1,19 @@ +Submitted By: Jim Gifford (patches at jg555 dot com) +Date: 2005-10-01 +Initial Package Version: 2.6.12.0 +Origin: Jim Gifford +Upstream Status: Sent +Description: Fixes Compile Issue with Sysklogd + +diff -Naur linux-libc-headers-2.6.12.0.orig/include/asm-mips/atomic.h linux-libc-headers-2.6.12.0/include/asm-mips/atomic.h +--- linux-libc-headers-2.6.12.0.orig/include/asm-mips/atomic.h 2005-07-06 00:17:30.000000000 +0000 ++++ linux-libc-headers-2.6.12.0/include/asm-mips/atomic.h 2005-10-01 22:04:26.000000000 +0000 +@@ -18,7 +18,7 @@ + typedef struct { volatile int counter; } atomic_t; + + #ifdef __mips64 +-typedef struct { volatile __s64 counter; } atomic64_t; ++typedef struct { volatile long counter; } atomic64_t; + #endif + + #endif /* _ASM_ATOMIC_H */ diff --git a/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_tls-1.patch b/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_tls-1.patch new file mode 100644 index 0000000000..e442fd25d3 --- /dev/null +++ b/packages/linux-libc-headers/linux-libc-headers-2.6.12.0/linux-libc-headers-2.6.12.0-mips_tls-1.patch @@ -0,0 +1,97 @@ +Submitted By: Jim Gifford (patches at jg555 dot com) +Date: 2005-09-12 +Initial Package Version: 2.6.12.0 +Origin: http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/kernel-headers/linux-libc-headers-2.6.12.0-mips-nptl.patch?rev=11104&view=auto +Upstream Status: Unknown +Description: Adds TLS Support to Kernel Headers for MIPS + +diff -Naur linux-libc-headers-2.6.12.0.orig/include/asm-mips/inst.h linux-libc-headers-2.6.12.0/include/asm-mips/inst.h +--- linux-libc-headers-2.6.12.0.orig/include/asm-mips/inst.h 2004-10-31 19:54:20.000000000 +0000 ++++ linux-libc-headers-2.6.12.0/include/asm-mips/inst.h 2005-09-12 23:57:11.000000000 +0000 +@@ -28,7 +28,7 @@ + sdl_op, sdr_op, swr_op, cache_op, + ll_op, lwc1_op, lwc2_op, pref_op, + lld_op, ldc1_op, ldc2_op, ld_op, +- sc_op, swc1_op, swc2_op, major_3b_op, /* Opcode 0x3b is unused */ ++ sc_op, swc1_op, swc2_op, rdhwr_op, + scd_op, sdc1_op, sdc2_op, sd_op + }; + +@@ -62,10 +62,10 @@ + spimi_op, unused_rt_op_0x05, unused_rt_op_0x06, unused_rt_op_0x07, + tgei_op, tgeiu_op, tlti_op, tltiu_op, + teqi_op, unused_0x0d_rt_op, tnei_op, unused_0x0f_rt_op, +- bltzal_op, bgezal_op, bltzall_op, bgezall_op +- /* +- * The others (0x14 - 0x1f) are unused. +- */ ++ bltzal_op, bgezal_op, bltzall_op, bgezall_op, ++ rt_op_0x14, rt_op_0x15, rt_op_0x16, rt_op_0x17, ++ rt_op_0x18, rt_op_0x19, rt_op_0x1a, rt_op_0x1b, ++ bposge32_op, rt_op_0x1d, rt_op_0x1e, rt_op_0x1f + }; + + /* +diff -Naur linux-libc-headers-2.6.12.0.orig/include/asm-mips/unistd.h linux-libc-headers-2.6.12.0/include/asm-mips/unistd.h +--- linux-libc-headers-2.6.12.0.orig/include/asm-mips/unistd.h 2005-07-06 00:17:29.000000000 +0000 ++++ linux-libc-headers-2.6.12.0/include/asm-mips/unistd.h 2005-09-12 23:57:11.000000000 +0000 +@@ -303,16 +303,17 @@ + #define __NR_add_key (__NR_Linux + 280) + #define __NR_request_key (__NR_Linux + 281) + #define __NR_keyctl (__NR_Linux + 282) ++#define __NR_set_thread_area (__NR_Linux + 283) + + /* + * Offset of the last Linux o32 flavoured syscall + */ +-#define __NR_Linux_syscalls 282 ++#define __NR_Linux_syscalls 283 + + #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + + #define __NR_O32_Linux 4000 +-#define __NR_O32_Linux_syscalls 282 ++#define __NR_O32_Linux_syscalls 283 + + #if _MIPS_SIM == _MIPS_SIM_ABI64 + +@@ -562,16 +563,17 @@ + #define __NR_add_key (__NR_Linux + 239) + #define __NR_request_key (__NR_Linux + 240) + #define __NR_keyctl (__NR_Linux + 241) ++#define __NR_set_thread_area (__NR_Linux + 242) + + /* + * Offset of the last Linux 64-bit flavoured syscall + */ +-#define __NR_Linux_syscalls 241 ++#define __NR_Linux_syscalls 242 + + #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + + #define __NR_64_Linux 5000 +-#define __NR_64_Linux_syscalls 241 ++#define __NR_64_Linux_syscalls 242 + + #if _MIPS_SIM == _MIPS_SIM_NABI32 + +@@ -825,16 +827,17 @@ + #define __NR_add_key (__NR_Linux + 243) + #define __NR_request_key (__NR_Linux + 244) + #define __NR_keyctl (__NR_Linux + 245) ++#define __NR_set_thread_area (__NR_Linux + 246) + + /* + * Offset of the last N32 flavoured syscall + */ +-#define __NR_Linux_syscalls 245 ++#define __NR_Linux_syscalls 246 + + #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + + #define __NR_N32_Linux 6000 +-#define __NR_N32_Linux_syscalls 245 ++#define __NR_N32_Linux_syscalls 246 + + #ifndef __ASSEMBLY__ + diff --git a/packages/linux-libc-headers/linux-libc-headers_2.6.12.0.bb b/packages/linux-libc-headers/linux-libc-headers_2.6.12.0.bb new file mode 100644 index 0000000000..a8534870d9 --- /dev/null +++ b/packages/linux-libc-headers/linux-libc-headers_2.6.12.0.bb @@ -0,0 +1,72 @@ +SECTION = "devel" +DESCRIPTION = "Sanitized set of 2.6 kernel headers for the C library's use." +HOMEPAGE = "http://ep09.pld-linux.org/~mmazur/linux-libc-headers/" +# license note from the package: +# Linux-libc-headers are derived from linux kernel headers. For license of a +# particular header, check it's content, and if copyright notice isn't present, +# standard linux kernel license applies. +# since we assume GPL for linux i think we can also assume it here +LICENSE = "GPL" +MAINTAINER = "Felix Domke " +INHIBIT_DEFAULT_DEPS = "1" +PR = "r0" + +SRC_URI = "http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-${PV}.tar.bz2 \ + file://keyboard.patch;patch=1" + +def get_nptl_patches(bb, d): + if bb.data.getVar('GLIBC_ADDONS', d, 1) in ['nptl']: + return "file://linux-libc-headers-2.6.12.0-mips_tls-1.patch;patch=1;pnum=1" + return "" + +SRC_URI_append_mipsel = " file://linux-libc-headers-2.6.12.0-mips_atomic_fix-1.patch;patch=1;pnum=1 \ + ${@get_nptl_patches(bb, d)}" + +S = "${WORKDIR}/linux-libc-headers-${PV}" + +do_configure () { + case ${TARGET_ARCH} in + alpha*) ARCH=alpha ;; + arm*) ARCH=arm ;; + cris*) ARCH=cris ;; + hppa*) ARCH=parisc ;; + i*86*) ARCH=i386 ;; + ia64*) ARCH=ia64 ;; + mips*) ARCH=mips ;; + m68k*) ARCH=m68k ;; + powerpc*) ARCH=ppc ;; + s390*) ARCH=s390 ;; + sh*) ARCH=sh ;; + sparc64*) ARCH=sparc64 ;; + sparc*) ARCH=sparc ;; + x86_64*) ARCH=x86_64 ;; + esac + if test ! -e include/asm-$ARCH; then + oefatal unable to create asm symlink in kernel headers + fi + cp -pPR "include/asm-$ARCH" "include/asm" + if test "$ARCH" = "arm"; then + cp -pPR include/asm/arch-ebsa285 include/asm/arch + elif test "$ARCH" = "sh"; then + cp -pPR include/asm/cpu-${TARGET_ARCH} include/asm/cpu || die "unable to create include/asm/cpu" + fi +} + +do_stage () { + install -d ${STAGING_INCDIR} + rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm + cp -pfLR include/linux ${STAGING_INCDIR}/ + cp -pfLR include/asm ${STAGING_INCDIR}/ + rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/linux + rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm + install -d ${CROSS_DIR}/${TARGET_SYS}/include + cp -pfLR include/linux ${CROSS_DIR}/${TARGET_SYS}/include/ + cp -pfLR include/asm ${CROSS_DIR}/${TARGET_SYS}/include/ +} + +do_install() { + install -d ${D}${includedir} + cp -pfLR include/linux ${D}${includedir}/ + cp -pfLR include/asm ${D}${includedir}/ +} + -- cgit 1.2.3-korg