diff options
Diffstat (limited to 'meta/recipes-core/uclibc/files')
-rw-r--r-- | meta/recipes-core/uclibc/files/armeb-kernel-stat.h.patch | 125 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/files/errno_values.h.patch | 21 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/files/kernel-key-t-ipc.h.patch | 27 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/files/nokernelheadercheck.patch | 24 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/files/termios.h.patch | 22 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/files/uClibc.distro | 3 |
6 files changed, 222 insertions, 0 deletions
diff --git a/meta/recipes-core/uclibc/files/armeb-kernel-stat.h.patch b/meta/recipes-core/uclibc/files/armeb-kernel-stat.h.patch new file mode 100644 index 0000000000..0440718eec --- /dev/null +++ b/meta/recipes-core/uclibc/files/armeb-kernel-stat.h.patch | |||
@@ -0,0 +1,125 @@ | |||
1 | # The 2.6 asm/stat.h for ARM has some rather unusual transmogrifications | ||
2 | # for big-endian running. This patch adds ARM specific code in xstatconv.c | ||
3 | # which deals with the 2.4->2.6 ABI change. | ||
4 | --- uClibc-0.9.27/libc/sysdeps/linux/common/xstatconv.c 2005-01-11 23:59:21.000000000 -0800 | ||
5 | +++ uClibc-0.9.27/libc/sysdeps/linux/common/xstatconv.c 2005-06-05 11:03:56.742587966 -0700 | ||
6 | @@ -18,7 +18,14 @@ | ||
7 | 02111-1307 USA. | ||
8 | |||
9 | Modified for uClibc by Erik Andersen <andersen@codepoet.org> | ||
10 | + Further modified for ARMBE by John Bowler <jbowler@acm.org> | ||
11 | */ | ||
12 | +/* This is a copy of common/xstatconv.c with a fixup for the ABI | ||
13 | + * (structure layout) change in ARM Linux 2.6 - this shifts the | ||
14 | + * st_dev and st_rdev information from the start of the 8 byte | ||
15 | + * space to the end on big-endian ARM (only). The code is unchanged | ||
16 | + * on little endian. | ||
17 | + */ | ||
18 | |||
19 | #define _GNU_SOURCE | ||
20 | #define _LARGEFILE64_SOURCE | ||
21 | @@ -32,6 +39,84 @@ | ||
22 | #include <sys/stat.h> | ||
23 | #include "xstatconv.h" | ||
24 | |||
25 | +/* Only for ARMEB and LFS. */ | ||
26 | +#if defined(__ARMEB__) && defined(__UCLIBC_HAS_LFS__) | ||
27 | +/* stat64 (renamed) from 2.6.11.11. What happened here is that after | ||
28 | + * Linux 2.4 the 2.4 unsigned short st_rdev and st_dev fields were | ||
29 | + * lengthened to unsigned long long - causing the inclusion of at least | ||
30 | + * some of the 0 padding bytes which followed them. On little endian | ||
31 | + * this is fine because 2.4 did zero the pad bytes (I think) and the | ||
32 | + * position of the data did not change. On big endian the change | ||
33 | + * shifted the data to the end of the field. Someone noticed for the | ||
34 | + * struct stat, and the armeb (big endian) case preserved the | ||
35 | + * unsigned short (yuck), but no so for stat64 (maybe this was deliberate, | ||
36 | + * but there is no evidence in the code of this.) Consequently a | ||
37 | + * fixup is necessary for the stat64 case. The fixup here is to | ||
38 | + * use the new structure when the change is detected. See below. | ||
39 | + */ | ||
40 | +struct __kernel_stat64_armeb { | ||
41 | + /* This definition changes the layout on big-endian from that | ||
42 | + * used in 2.4.31 - ABI change! Likewise for st_rdev. | ||
43 | + */ | ||
44 | + unsigned long long st_dev; | ||
45 | + unsigned char __pad0[4]; | ||
46 | + unsigned long __st_ino; | ||
47 | + unsigned int st_mode; | ||
48 | + unsigned int st_nlink; | ||
49 | + unsigned long st_uid; | ||
50 | + unsigned long st_gid; | ||
51 | + unsigned long long st_rdev; | ||
52 | + unsigned char __pad3[4]; | ||
53 | + long long st_size; | ||
54 | + unsigned long st_blksize; | ||
55 | + unsigned long __pad4; | ||
56 | + unsigned long st_blocks; | ||
57 | + unsigned long st_atime; | ||
58 | + unsigned long st_atime_nsec; | ||
59 | + unsigned long st_mtime; | ||
60 | + unsigned long st_mtime_nsec; | ||
61 | + unsigned long st_ctime; | ||
62 | + unsigned long st_ctime_nsec; | ||
63 | + unsigned long long st_ino; | ||
64 | +}; | ||
65 | + | ||
66 | +/* This fixup only works so long as the old struct stat64 is no | ||
67 | + * smaller than the new one - the caller of xstatconv uses the | ||
68 | + * *old* struct, but the kernel writes the new one. CASSERT | ||
69 | + * detects this at compile time. | ||
70 | + */ | ||
71 | +#define CASSERT(c) do switch (0) { case 0:; case (c):; } while (0) | ||
72 | + | ||
73 | +void __xstat64_conv_new(struct __kernel_stat64_armeb *kbuf, struct stat64 *buf) | ||
74 | +{ | ||
75 | + CASSERT(sizeof *kbuf <= sizeof (struct kernel_stat64)); | ||
76 | + | ||
77 | + /* Convert from new kernel version of `struct stat64'. */ | ||
78 | + buf->st_dev = kbuf->st_dev; | ||
79 | + buf->st_ino = kbuf->st_ino; | ||
80 | +#ifdef _HAVE_STAT64___ST_INO | ||
81 | + buf->__st_ino = kbuf->__st_ino; | ||
82 | +#endif | ||
83 | + buf->st_mode = kbuf->st_mode; | ||
84 | + buf->st_nlink = kbuf->st_nlink; | ||
85 | + buf->st_uid = kbuf->st_uid; | ||
86 | + buf->st_gid = kbuf->st_gid; | ||
87 | + buf->st_rdev = kbuf->st_rdev; | ||
88 | + buf->st_size = kbuf->st_size; | ||
89 | + buf->st_blksize = kbuf->st_blksize; | ||
90 | + buf->st_blocks = kbuf->st_blocks; | ||
91 | + buf->st_atime = kbuf->st_atime; | ||
92 | + buf->st_mtime = kbuf->st_mtime; | ||
93 | + buf->st_ctime = kbuf->st_ctime; | ||
94 | +} | ||
95 | +#define _MAY_HAVE_NEW_STAT64 1 | ||
96 | +#else | ||
97 | +#define _MAY_HAVE_NEW_STAT64 0 | ||
98 | +#endif | ||
99 | + | ||
100 | +/* The following is taken verbatim from xstatconv.c apart from | ||
101 | + * the addition of the _MAY_HAVE_NEW_STAT64 code. | ||
102 | + */ | ||
103 | void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) | ||
104 | { | ||
105 | /* Convert to current kernel version of `struct stat'. */ | ||
106 | @@ -53,6 +138,19 @@ | ||
107 | #if defined __UCLIBC_HAS_LFS__ | ||
108 | void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) | ||
109 | { | ||
110 | +# if _MAY_HAVE_NEW_STAT64 | ||
111 | + /* This relies on any device (0,0) not being mountable - i.e. | ||
112 | + * it fails on Linux 2.4 if dev(0,0) is a mountable block file | ||
113 | + * system and itself contains it's own device. That doesn't | ||
114 | + * happen on Linux 2.4 so far as I can see, but even if it | ||
115 | + * does the API only fails (even then) if 2.4 didn't set all | ||
116 | + * of the pad bytes to 0 (and it does set them to zero.) | ||
117 | + */ | ||
118 | + if (kbuf->st_dev == 0 && kbuf->st_rdev == 0) { | ||
119 | + __xstat64_conv_new((struct __kernel_stat64_armeb*)kbuf, buf); | ||
120 | + return; | ||
121 | + } | ||
122 | +# endif | ||
123 | /* Convert to current kernel version of `struct stat64'. */ | ||
124 | buf->st_dev = kbuf->st_dev; | ||
125 | buf->st_ino = kbuf->st_ino; | ||
diff --git a/meta/recipes-core/uclibc/files/errno_values.h.patch b/meta/recipes-core/uclibc/files/errno_values.h.patch new file mode 100644 index 0000000000..a1e39c181b --- /dev/null +++ b/meta/recipes-core/uclibc/files/errno_values.h.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Index: uClibc-0.9.29/libc/sysdeps/linux/common/bits/errno_values.h | ||
2 | =================================================================== | ||
3 | --- uClibc-0.9.29/libc/sysdeps/linux/common/bits/errno_values.h 2002-08-23 20:48:19.000000000 +0200 | ||
4 | +++ uClibc-0.9.29/libc/sysdeps/linux/common/bits/errno_values.h 2007-07-01 22:11:53.000000000 +0200 | ||
5 | @@ -134,4 +134,16 @@ | ||
6 | #define ENOMEDIUM 123 /* No medium found */ | ||
7 | #define EMEDIUMTYPE 124 /* Wrong medium type */ | ||
8 | |||
9 | +/* the following errornumbers are only in 2.6 */ | ||
10 | + | ||
11 | +#define ECANCELED 125 /* Operation Canceled */ | ||
12 | +#define ENOKEY 126 /* Required key not available */ | ||
13 | +#define EKEYEXPIRED 127 /* Key has expired */ | ||
14 | +#define EKEYREVOKED 128 /* Key has been revoked */ | ||
15 | +#define EKEYREJECTED 129 /* Key was rejected by service */ | ||
16 | + | ||
17 | +/* for robust mutexes */ | ||
18 | +#define EOWNERDEAD 130 /* Owner died */ | ||
19 | +#define ENOTRECOVERABLE 131 /* State not recoverable */ | ||
20 | + | ||
21 | #endif /* _BITS_ERRNO_VALUES_H */ | ||
diff --git a/meta/recipes-core/uclibc/files/kernel-key-t-ipc.h.patch b/meta/recipes-core/uclibc/files/kernel-key-t-ipc.h.patch new file mode 100644 index 0000000000..4cc4530470 --- /dev/null +++ b/meta/recipes-core/uclibc/files/kernel-key-t-ipc.h.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | # include/linux/posix_types.h defines __kernel_key_t as int, this file | ||
2 | # contains an identical definition. This results in a compiler error | ||
3 | # if both files are included. The ipc.h file, however, also includes | ||
4 | # bits/types.h, which typedefs __key_t to (int), therefore it must | ||
5 | # be safe to use __key_t in place of __kernel_key_t (given that C | ||
6 | # regards equivalent numeric typedefs as identical.) | ||
7 | --- uClibc-0.9.27/libc/sysdeps/linux/common/bits/ipc.h.orig 2005-05-07 13:36:04.448332211 -0700 | ||
8 | +++ uClibc-0.9.27/libc/sysdeps/linux/common/bits/ipc.h 2005-05-07 13:37:00.493885708 -0700 | ||
9 | @@ -35,9 +35,6 @@ | ||
10 | # define IPC_INFO 3 /* See ipcs. */ | ||
11 | #endif | ||
12 | |||
13 | -/* Type of a SYSV IPC key. */ | ||
14 | -typedef int __kernel_key_t; | ||
15 | - | ||
16 | /* Special key values. */ | ||
17 | #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ | ||
18 | |||
19 | @@ -45,7 +42,7 @@ | ||
20 | /* Data structure used to pass permission information to IPC operations. */ | ||
21 | struct ipc_perm | ||
22 | { | ||
23 | - __kernel_key_t __key; | ||
24 | + __key_t __key; | ||
25 | __kernel_uid_t uid; | ||
26 | __kernel_gid_t gid; | ||
27 | __kernel_uid_t cuid; | ||
diff --git a/meta/recipes-core/uclibc/files/nokernelheadercheck.patch b/meta/recipes-core/uclibc/files/nokernelheadercheck.patch new file mode 100644 index 0000000000..9f09fb2ac9 --- /dev/null +++ b/meta/recipes-core/uclibc/files/nokernelheadercheck.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- uClibc/Makefile~nokernelheadercheck | ||
7 | +++ uClibc/Makefile | ||
8 | @@ -121,11 +121,11 @@ | ||
9 | @./extra/config/conf -o extra/Configs/Config.in | ||
10 | |||
11 | headers: include/bits/uClibc_config.h | ||
12 | -ifeq ($(strip $(ARCH_HAS_MMU)),y) | ||
13 | - @set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) | ||
14 | -else | ||
15 | - @set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) -n | ||
16 | -endif | ||
17 | +#ifeq ($(strip $(ARCH_HAS_MMU)),y) | ||
18 | +# @set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) | ||
19 | +#else | ||
20 | +# @set -x; ./extra/scripts/fix_includes.sh -k $(KERNEL_SOURCE) -t $(TARGET_ARCH) -n | ||
21 | +#endif | ||
22 | @cd include/bits; \ | ||
23 | set -e; \ | ||
24 | for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \ | ||
diff --git a/meta/recipes-core/uclibc/files/termios.h.patch b/meta/recipes-core/uclibc/files/termios.h.patch new file mode 100644 index 0000000000..f7200ba393 --- /dev/null +++ b/meta/recipes-core/uclibc/files/termios.h.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Index: uClibc-0.9.29/libc/sysdeps/linux/common/bits/termios.h | ||
2 | =================================================================== | ||
3 | --- uClibc-0.9.29.orig/libc/sysdeps/linux/common/bits/termios.h 2006-02-13 09:41:37.000000000 +0100 | ||
4 | +++ uClibc-0.9.29/libc/sysdeps/linux/common/bits/termios.h 2007-07-03 00:41:27.000000000 +0200 | ||
5 | @@ -156,7 +156,6 @@ | ||
6 | #endif | ||
7 | #define B57600 0010001 | ||
8 | #define B115200 0010002 | ||
9 | -#if 0 /* limited on uClibc, keep in sync w/ cfsetspeed.c */ | ||
10 | #define B230400 0010003 | ||
11 | #define B460800 0010004 | ||
12 | #define B500000 0010005 | ||
13 | @@ -171,9 +170,6 @@ | ||
14 | #define B3500000 0010016 | ||
15 | #define B4000000 0010017 | ||
16 | #define __MAX_BAUD B4000000 | ||
17 | -#else | ||
18 | -#define __MAX_BAUD B115200 | ||
19 | -#endif | ||
20 | #ifdef __USE_MISC | ||
21 | # define CIBAUD 002003600000 /* input baud rate (not used) */ | ||
22 | # define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
diff --git a/meta/recipes-core/uclibc/files/uClibc.distro b/meta/recipes-core/uclibc/files/uClibc.distro new file mode 100644 index 0000000000..d87b891b41 --- /dev/null +++ b/meta/recipes-core/uclibc/files/uClibc.distro | |||
@@ -0,0 +1,3 @@ | |||
1 | # Default per-distro config | ||
2 | # DO NOT CHANGE THIS | ||
3 | # Create a new file ${DISTRO}/uClibc.distro | ||