Mercurial > hg > aboriginal
changeset 1419:62b8b2936c6f
Switch uClibc to 0.9.32, which simplifies the patch stack a lot but adds a few new ones.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 24 Jul 2011 13:55:31 -0500 |
parents | f2f1238d25e2 |
children | bcecd839ff21 |
files | download.sh sources/patches/alt-uClibc-fixx86.patch sources/patches/alt-uClibc-mmu.patch sources/patches/alt-uClibc-ruserpass.patch sources/patches/alt-uClibc-schedparam.patch sources/patches/uClibc-backport-humor-udev.patch sources/patches/uClibc-fix-fcntl64.patch sources/patches/uClibc-fixclone.patch sources/patches/uClibc-fixintlassert.patch sources/patches/uClibc-fixx86.patch sources/patches/uClibc-futimes.patch sources/patches/uClibc-mips64.patch sources/patches/uClibc-mmu.patch sources/patches/uClibc-ruserpass.patch |
diffstat | 14 files changed, 289 insertions(+), 560 deletions(-) [+] |
line wrap: on
line diff
--- a/download.sh Sun Jul 24 13:37:22 2011 -0500 +++ b/download.sh Sun Jul 24 13:55:31 2011 -0500 @@ -26,11 +26,9 @@ UNSTABLE=http://kernel.org/pub/linux/kernel/v3.0/testing/linux-3.0-rc1.tar.bz2 \ maybe_fork "download || dienow" -URL=http://uclibc.org/downloads/uClibc-0.9.31.1.tar.bz2 \ -SHA1=4adb1839126d67da478c4360ef41895368c75057 \ -#SHA1= \ -#UNSTABLE=http://uclibc.org/downloads/uClibc-snapshot.tar.bz2 \ -UNSTABLE=http://uclibc.org/downloads/uClibc-0.9.32.tar.bz2 \ +URL=http://uclibc.org/downloads/uClibc-0.9.32.tar.bz2 \ +SHA1=f8edc4ffcd9e8d1e8ae5348b9b879f5175010e67 \ +UNSTABLE=http://uclibc.org/downloads/uClibc-snapshot.tar.bz2 \ maybe_fork "download || dienow" # 2.17 was the last GPLv2 release of binutils
--- a/sources/patches/alt-uClibc-fixx86.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -commit 8245f3b4638fdff2011c2657af1bb211def704bc -Author: Phil Blundell <pb@pbcl.net> -Date: Sat Jun 11 01:10:46 2011 -0400 - - Fix __libc_epoll_pwait compile failure on x86 - - This prevents "memory input 7 is not directly addressable" errors. - - | libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait': - | libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable - | libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable - | make: *** [libc/sysdeps/linux/common/epoll.o] Error 1 - | make: *** Waiting for unfinished jobs.... - - Signed-off-by: Phil Blundell <pb@pbcl.net> - Signed-off-by: Jason Woodward <jason.woodward@timesys.com> - Signed-off-by: Khem Raj <raj.khem@gmail.com> - -diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c -index 85b0cfd..ab3e73b 100644 ---- a/libc/sysdeps/linux/common/epoll.c -+++ b/libc/sysdeps/linux/common/epoll.c -@@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait; - int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents, - int timeout, const sigset_t *set) - { -+ int nsig = _NSIG / 8; - if (SINGLE_THREAD_P) -- return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); -+ return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); - # ifdef __UCLIBC_HAS_THREADS_NATIVE__ - else { - int oldtype = LIBC_CANCEL_ASYNC (); -- int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); -+ int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); - LIBC_CANCEL_RESET (oldtype); - return result; - }
--- a/sources/patches/alt-uClibc-mmu.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -diff --git a/extra/Configs/Config.alpha b/extra/Configs/Config.alpha -index 144924a..9aab976 100644 ---- a/extra/Configs/Config.alpha -+++ b/extra/Configs/Config.alpha -@@ -11,6 +11,5 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_LITTLE_ENDIAN -- select ARCH_HAS_MMU - select ARCH_HAS_NO_LDSO - select UCLIBC_HAS_LFS -diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm -index b060ace..5c919b4 100644 ---- a/extra/Configs/Config.arm -+++ b/extra/Configs/Config.arm -@@ -62,11 +62,9 @@ config CONFIG_GENERIC_ARM - - config CONFIG_ARM610 - bool "Arm 610" -- select ARCH_HAS_MMU - - config CONFIG_ARM710 - bool "Arm 710" -- select ARCH_HAS_MMU - - config CONFIG_ARM7TDMI - bool "Arm 7TDMI" -@@ -74,35 +72,27 @@ config CONFIG_ARM7TDMI - - config CONFIG_ARM720T - bool "Arm 720T" -- select ARCH_HAS_MMU - - config CONFIG_ARM920T - bool "Arm 920T" -- select ARCH_HAS_MMU - - config CONFIG_ARM922T - bool "Arm 922T" -- select ARCH_HAS_MMU - - config CONFIG_ARM926T - bool "Arm 926T" -- select ARCH_HAS_MMU - - config CONFIG_ARM10T - bool "Arm 10T" -- select ARCH_HAS_MMU - - config CONFIG_ARM1136JF_S - bool "Arm 1136JF-S" -- select ARCH_HAS_MMU - - config CONFIG_ARM1176JZ_S - bool "Arm 1176JZ-S" -- select ARCH_HAS_MMU - - config CONFIG_ARM1176JZF_S - bool "Arm 1176JZF-S" -- select ARCH_HAS_MMU - - config CONFIG_ARM_CORTEX_M3 - bool "Arm Cortex-M3" -@@ -116,18 +106,14 @@ config CONFIG_ARM_CORTEX_M1 - - config CONFIG_ARM_SA110 - bool "Intel StrongArm SA-110" -- select ARCH_HAS_MMU - - config CONFIG_ARM_SA1100 - bool "Intel StrongArm SA-1100" -- select ARCH_HAS_MMU - - config CONFIG_ARM_XSCALE - bool "Intel Xscale" -- select ARCH_HAS_MMU - - config CONFIG_ARM_IWMMXT - bool "Intel Xscale With WMMX PXA27x" -- select ARCH_HAS_MMU - - endchoice -diff --git a/extra/Configs/Config.avr32 b/extra/Configs/Config.avr32 -index cbadb4c..a5eb157 100644 ---- a/extra/Configs/Config.avr32 -+++ b/extra/Configs/Config.avr32 -@@ -19,7 +19,6 @@ choice - - config CONFIG_AVR32_AP7 - bool "AVR32 AP7" -- select ARCH_HAS_MMU - - endchoice - -diff --git a/extra/Configs/Config.cris b/extra/Configs/Config.cris -index 52ca0c3..db9293c 100644 ---- a/extra/Configs/Config.cris -+++ b/extra/Configs/Config.cris -@@ -24,11 +24,9 @@ choice - - CRISv32 Support for Axis' CRISv32 architecture. - - config CONFIG_CRIS -- select ARCH_HAS_MMU - bool "CRIS" - - config CONFIG_CRISV32 -- select ARCH_HAS_MMU - bool "CRISv32" - - endchoice -diff --git a/extra/Configs/Config.hppa b/extra/Configs/Config.hppa -index 1323de2..b8699bf 100644 ---- a/extra/Configs/Config.hppa -+++ b/extra/Configs/Config.hppa -@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_BIG_ENDIAN -- select ARCH_HAS_MMU - select HAS_NO_THREADS - select ARCH_HAS_NO_LDSO - select HAVE_NO_SSP -diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 -index 288aa5e..f23646c 100644 ---- a/extra/Configs/Config.i386 -+++ b/extra/Configs/Config.i386 -@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_LITTLE_ENDIAN -- select ARCH_HAS_MMU - - choice - prompt "Target x86 Processor Family" -diff --git a/extra/Configs/Config.ia64 b/extra/Configs/Config.ia64 -index ae88be7..c7a1f63 100644 ---- a/extra/Configs/Config.ia64 -+++ b/extra/Configs/Config.ia64 -@@ -11,5 +11,4 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_LITTLE_ENDIAN -- select ARCH_HAS_MMU - select ARCH_HAS_NO_LDSO -diff --git a/extra/Configs/Config.in.arch b/extra/Configs/Config.in.arch -index 8a02cb1..4679517 100644 ---- a/extra/Configs/Config.in.arch -+++ b/extra/Configs/Config.in.arch -@@ -93,7 +93,7 @@ if ARCH_HAS_NO_MMU - comment "Target CPU lacks a memory management unit (MMU)" - endif - --config ARCH_HAS_MMU -+config ARCH_USE_MMU - bool "Target CPU has a memory management unit (MMU)" - depends on !ARCH_HAS_NO_MMU - default y -@@ -102,13 +102,6 @@ config ARCH_HAS_MMU - then answer N here. Normally, Linux runs on systems with an MMU. - If you are building a uClinux system, answer N. - -- Most people will answer Y. -- --config ARCH_USE_MMU -- bool "Do you want to utilize the MMU?" -- depends on ARCH_HAS_MMU -- default y -- help - If your target CPU has a MMU, and you wish to actually utilize it, - then answer Y here. Normal Linux requires an MMU. - -diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc -index 84c4423..6b09f47 100644 ---- a/extra/Configs/Config.powerpc -+++ b/extra/Configs/Config.powerpc -@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_BIG_ENDIAN -- select ARCH_HAS_MMU - - choice - prompt "Target Processor Type" -diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh -index 10e9d8b..ce86ef3 100644 ---- a/extra/Configs/Config.sh -+++ b/extra/Configs/Config.sh -@@ -37,7 +37,6 @@ config CONFIG_SH2 - bool "SH2" - - config CONFIG_SH3 -- select ARCH_HAS_MMU - bool "SH3" - - config CONFIG_SH4 -diff --git a/extra/Configs/Config.sh64 b/extra/Configs/Config.sh64 -index 02535b9..a8c22bd 100644 ---- a/extra/Configs/Config.sh64 -+++ b/extra/Configs/Config.sh64 -@@ -25,7 +25,6 @@ choice - - "SH5" SuperH SH-5 101, 103 - - config CONFIG_SH5 -- select ARCH_HAS_MMU - select UCLIBC_HAS_LFS - bool "SH5" - -diff --git a/extra/Configs/Config.x86_64 b/extra/Configs/Config.x86_64 -index 1b28088..80c9e08 100644 ---- a/extra/Configs/Config.x86_64 -+++ b/extra/Configs/Config.x86_64 -@@ -11,4 +11,3 @@ config FORCE_OPTIONS_FOR_ARCH - bool - default y - select ARCH_LITTLE_ENDIAN -- select ARCH_HAS_MMU
--- a/sources/patches/alt-uClibc-ruserpass.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -diff -ru uClibc/include/netdb.h uClibc.new/include/netdb.h ---- uClibc/include/netdb.h 2010-04-02 10:34:27.000000000 -0500 -+++ uClibc.new/include/netdb.h 2010-11-13 14:40:03.000000000 -0600 -@@ -483,12 +483,6 @@ - #endif /* misc */ - - --/* ruserpass - remote password check. -- This function also exists in glibc but is undocumented */ --extern int ruserpass(const char *host, const char **aname, const char **apass); --libc_hidden_proto(ruserpass) -- -- - #ifdef __USE_BSD - /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD. - The local user is LOCUSER, on the remote machine the command is -diff -ru uClibc/libc/inet/rpc/rexec.c uClibc.new/libc/inet/rpc/rexec.c ---- uClibc/libc/inet/rpc/rexec.c 2010-04-02 10:34:27.000000000 -0500 -+++ uClibc.new/libc/inet/rpc/rexec.c 2010-11-13 16:23:37.000000000 -0600 -@@ -48,6 +48,8 @@ - /* int rexecoptions; - google does not know it */ - static char ahostbuf[NI_MAXHOST]; - -+int ruserpass(const char *host, const char **aname, const char **apass); -+ - int - rexec_af(char **ahost, int rport, const char *name, const char *pass, const char *cmd, int *fd2p, sa_family_t af) - { -diff -ru uClibc/libc/inet/rpc/ruserpass.c uClibc.new/libc/inet/rpc/ruserpass.c ---- uClibc/libc/inet/rpc/ruserpass.c 2010-04-02 10:34:27.000000000 -0500 -+++ uClibc.new/libc/inet/rpc/ruserpass.c 2010-11-13 16:25:27.000000000 -0600 -@@ -283,7 +283,7 @@ - (void) fclose(cfile); - return (-1); - } --libc_hidden_def(ruserpass) -+libc_hidden_proto(ruserpass) - - static int - token(void)
--- a/sources/patches/alt-uClibc-schedparam.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -uClibc-schedparam.patch \ No newline at end of file
--- a/sources/patches/uClibc-backport-humor-udev.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -Udev is quite possibly the most brittle program in the history of Linux. - -commit 83333e9c873e4eca6b2c945f7770b1f5373b0427 -Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> -Date: Tue Jun 1 20:02:39 2010 +0400 - - bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support - - This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket - descriptor flags, which are introduced since Linux 2.6.27 - - Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> - Signed-off-by: Khem Raj <raj.khem@gmail.com> - -diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h -index ac5a433..11f6e97 100644 ---- a/libc/sysdeps/linux/common/bits/socket.h -+++ b/libc/sysdeps/linux/common/bits/socket.h -@@ -53,10 +53,20 @@ enum __socket_type - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ - #define SOCK_SEQPACKET SOCK_SEQPACKET -- SOCK_PACKET = 10 /* Linux specific way of getting packets -+ SOCK_PACKET = 10, /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ - #define SOCK_PACKET SOCK_PACKET -+ -+ /* Flags to be ORed into the type parameter of socket and socketpair and -+ used for the flags parameter of paccept. */ -+ -+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the -+ new descriptor(s). */ -+#define SOCK_CLOEXEC SOCK_CLOEXEC -+ SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as -+ non-blocking. */ -+#define SOCK_NONBLOCK SOCK_NONBLOCK - }; - - /* Protocol families. */ -commit c6d6237819037168a6923ac080e348e54615422c -Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> -Date: Tue Jun 1 23:22:57 2010 +0400 - - endian.h: add BSD convertions between big/little-endian byte order - - This patch adds support for convertion of values between host and - big-/little-endian byte order. - - Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> - Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> - -diff --git a/include/endian.h b/include/endian.h -index 2f7bce1..0ba7384 100644 ---- a/include/endian.h -+++ b/include/endian.h -@@ -55,4 +55,42 @@ - # define __LONG_LONG_PAIR(HI, LO) HI, LO - #endif - -+ -+#ifdef __USE_BSD -+/* Conversion interfaces. */ -+# include <byteswap.h> -+ -+# if __BYTE_ORDER == __LITTLE_ENDIAN -+# define htobe16(x) __bswap_16 (x) -+# define htole16(x) (x) -+# define be16toh(x) __bswap_16 (x) -+# define le16toh(x) (x) -+ -+# define htobe32(x) __bswap_32 (x) -+# define htole32(x) (x) -+# define be32toh(x) __bswap_32 (x) -+# define le32toh(x) (x) -+ -+# define htobe64(x) __bswap_64 (x) -+# define htole64(x) (x) -+# define be64toh(x) __bswap_64 (x) -+# define le64toh(x) (x) -+# else -+# define htobe16(x) (x) -+# define htole16(x) __bswap_16 (x) -+# define be16toh(x) (x) -+# define le16toh(x) __bswap_16 (x) -+ -+# define htobe32(x) (x) -+# define htole32(x) __bswap_32 (x) -+# define be32toh(x) (x) -+# define le32toh(x) __bswap_32 (x) -+ -+# define htobe64(x) (x) -+# define htole64(x) __bswap_64 (x) -+# define be64toh(x) (x) -+# define le64toh(x) __bswap_64 (x) -+# endif -+#endif -+ - #endif /* endian.h */ -commit a2e5630af426f85fdd8721b2820786d9bd2aa695 -Author: Vladimir Zapolskiy <vzapolskiy@gmail.com> -Date: Tue Jun 1 20:02:54 2010 +0400 - - inotify: add inotify_init1 system call support - - This patch introduces support for inotify_init1 system call, found - since Linux 2.6.27. - - Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> - Signed-off-by: Khem Raj <raj.khem@gmail.com> - -diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c -index e5a6120..e35f043 100644 ---- a/libc/sysdeps/linux/common/inotify.c -+++ b/libc/sysdeps/linux/common/inotify.c -@@ -15,6 +15,10 @@ - _syscall0(int, inotify_init) - #endif - -+#ifdef __NR_inotify_init1 -+_syscall1(int, inotify_init1, int, flags) -+#endif -+ - #ifdef __NR_inotify_add_watch - _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask) - #endif -diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h -index 0131db9..dc4e19d 100644 ---- a/libc/sysdeps/linux/common/sys/inotify.h -+++ b/libc/sysdeps/linux/common/sys/inotify.h -@@ -22,6 +22,16 @@ - #include <stdint.h> - - -+/* Flags for the parameter of inotify_init1. */ -+enum -+ { -+ IN_CLOEXEC = 02000000, -+#define IN_CLOEXEC IN_CLOEXEC -+ IN_NONBLOCK = 04000 -+#define IN_NONBLOCK IN_NONBLOCK -+ }; -+ -+ - /* Structure describing an inotify event. */ - struct inotify_event - { -@@ -79,6 +89,9 @@ __BEGIN_DECLS - /* Create and initialize inotify instance. */ - extern int inotify_init (void) __THROW; - -+/* Create and initialize inotify instance. */ -+extern int inotify_init1 (int __flags) __THROW; -+ - /* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ - extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
--- a/sources/patches/uClibc-fix-fcntl64.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ ---- uClibc/include/fcntl.h 2010-04-02 10:34:27.000000000 -0500 -+++ uClibc.bak/include/fcntl.h 2010-05-16 04:54:10.000000000 -0500 -@@ -73,7 +73,7 @@ - - This function is a cancellation point and therefore not marked with - __THROW. */ --#ifndef __USE_FILE_OFFSET64 -+#if !defined(__USE_FILE_OFFSET64) || defined(__LP64__) - extern int fcntl (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl) - #else -@@ -83,7 +83,7 @@ - # define fcntl fcntl64 - # endif - #endif --#ifdef __USE_LARGEFILE64 -+#if defined(__USE_LARGEFILE64) && !defined(__LP64__) - extern int fcntl64 (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl64) - #endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/uClibc-fixclone.patch Sun Jul 24 13:55:31 2011 -0500 @@ -0,0 +1,31 @@ +The sh4 and sparc targets have assembly implementations of clone.S that don't +get used, and thus the build breaks. Also, sparc is missing a header file in +pthreads.old that exists in pthreads.new. + +diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch +index 92e262b..6cbc681 100644 +--- a/libc/sysdeps/linux/sh/Makefile.arch ++++ b/libc/sysdeps/linux/sh/Makefile.arch +@@ -9,4 +9,4 @@ + CSRC := \ + mmap.c pipe.c __init_brk.c brk.c sbrk.c pread_write.c cacheflush.c + +-SSRC := setjmp.S __longjmp.S ___fpscr_values.S vfork.S ++SSRC := setjmp.S __longjmp.S ___fpscr_values.S vfork.S clone.S +diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch +index d0cae9f..820b2fa 100644 +--- a/libc/sysdeps/linux/sparc/Makefile.arch ++++ b/libc/sysdeps/linux/sparc/Makefile.arch +@@ -13,7 +13,7 @@ SSRC := \ + + ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y) + CSRC += sigaction.c +-SSRC += fork.S vfork.S ++SSRC += fork.S vfork.S clone.S + endif + + # check weather __LONG_DOUBLE_128__ is defined (long double support) +--- /dev/null 2011-07-15 06:34:19.820919508 -0500 ++++ uClibc/libpthread/linuxthreads.old/sysdeps/sparc/tcb-offsets.h 2011-07-23 19:53:02.079880519 -0500 +@@ -0,0 +1 @@ ++#include "../../../linuxthreads/sysdeps/pthread/tcb-offsets.h"
--- a/sources/patches/uClibc-fixintlassert.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -diff -ruN uClibc/libc/misc/wchar/wchar.c uClibc.bak2/libc/misc/wchar/wchar.c ---- uClibc/libc/misc/wchar/wchar.c 2010-04-02 10:34:27.000000000 -0500 -+++ uClibc.bak2/libc/misc/wchar/wchar.c 2010-11-20 21:57:16.000000000 -0600 -@@ -286,6 +286,7 @@ - s = empty_string; - n = 1; - } else if (*s == '\0') { -+ if (pwc) *pwc = 0; - /* According to the ISO C 89 standard this is the expected behaviour. */ - return 0; - } else if (!n) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/uClibc-fixx86.patch Sun Jul 24 13:55:31 2011 -0500 @@ -0,0 +1,38 @@ +commit 8245f3b4638fdff2011c2657af1bb211def704bc +Author: Phil Blundell <pb@pbcl.net> +Date: Sat Jun 11 01:10:46 2011 -0400 + + Fix __libc_epoll_pwait compile failure on x86 + + This prevents "memory input 7 is not directly addressable" errors. + + | libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait': + | libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable + | libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable + | make: *** [libc/sysdeps/linux/common/epoll.o] Error 1 + | make: *** Waiting for unfinished jobs.... + + Signed-off-by: Phil Blundell <pb@pbcl.net> + Signed-off-by: Jason Woodward <jason.woodward@timesys.com> + Signed-off-by: Khem Raj <raj.khem@gmail.com> + +diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c +index 85b0cfd..ab3e73b 100644 +--- a/libc/sysdeps/linux/common/epoll.c ++++ b/libc/sysdeps/linux/common/epoll.c +@@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait; + int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents, + int timeout, const sigset_t *set) + { ++ int nsig = _NSIG / 8; + if (SINGLE_THREAD_P) +- return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); ++ return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); + # ifdef __UCLIBC_HAS_THREADS_NATIVE__ + else { + int oldtype = LIBC_CANCEL_ASYNC (); +- int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); ++ int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); + LIBC_CANCEL_RESET (oldtype); + return result; + }
--- a/sources/patches/uClibc-futimes.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -User Mode Linux needs futimes(). - ---- uClibc/include/sys/time.h 2005-11-30 11:07:06.000000000 -0600 -+++ uClibc2/include/sys/time.h 2009-11-14 04:55:32.000000000 -0600 -@@ -143,7 +143,9 @@ - /* Same as `utimes', but does not follow symbolic links. */ - extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) - __THROW __nonnull ((1)); -+#endif - -+#ifdef __USE_BSD - /* Same as `utimes', but takes an open file descriptor instead of a name. */ - extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW; - #endif ---- /dev/null 2009-08-01 20:56:12.000000000 -0500 -+++ uClibc2/libc/sysdeps/linux/common/futimes.c 2009-11-14 04:53:49.000000000 -0600 -@@ -0,0 +1,39 @@ -+/* vi: set sw=4 ts=4: */ -+/* -+ * futimes() for uClibc -+ * -+ * Copyright (C) 2009 Rob Landley <rob@landley.net> -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#define _SYSCALL_H -+#include <bits/syscalls.h> -+#include <utime.h> -+#include <sys/time.h> -+ -+#ifdef __NR_utimensat -+libc_hidden_proto(futimes) -+ -+int futimes(const int fd, const struct timeval tvp[2]) -+{ -+ struct timespec ts[2], *pts = ts; -+ int ret; -+ INTERNAL_SYSCALL_DECL(err); -+ -+ /* Convert timeval to timespec, for syscall */ -+ -+ if (tvp) { -+ TIMEVAL_TO_TIMESPEC(tvp, ts); -+ TIMEVAL_TO_TIMESPEC(tvp+1, ts+1); -+ } else pts = 0; -+ -+ /* Make syscall */ -+ -+ ret = INTERNAL_SYSCALL_NCS(utimensat, dummy, 4, fd, 0, pts, 0); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+} -+libc_hidden_def(futimes) -+#endif
--- a/sources/patches/uClibc-mips64.patch Sun Jul 24 13:37:22 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c -index b6e0932..a56ee81 100644 ---- a/ldso/ldso/mips/elfinterp.c -+++ b/ldso/ldso/mips/elfinterp.c -@@ -172,8 +172,8 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt, - for (i = 0; i < rel_size; i++, rpnt++) { - reloc_addr = (unsigned long *) (tpnt->loadaddr + - (unsigned long) rpnt->r_offset); -- reloc_type = ELF32_R_TYPE(rpnt->r_info); -- symtab_index = ELF32_R_SYM(rpnt->r_info); -+ reloc_type = ELF_R_TYPE(rpnt->r_info); -+ symtab_index = ELF_R_SYM(rpnt->r_info); - symbol_addr = 0; - - debug_sym(symtab,strtab,symtab_index);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/uClibc-mmu.patch Sun Jul 24 13:55:31 2011 -0500 @@ -0,0 +1,216 @@ +diff --git a/extra/Configs/Config.alpha b/extra/Configs/Config.alpha +index 144924a..9aab976 100644 +--- a/extra/Configs/Config.alpha ++++ b/extra/Configs/Config.alpha +@@ -11,6 +11,5 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_LITTLE_ENDIAN +- select ARCH_HAS_MMU + select ARCH_HAS_NO_LDSO + select UCLIBC_HAS_LFS +diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm +index b060ace..5c919b4 100644 +--- a/extra/Configs/Config.arm ++++ b/extra/Configs/Config.arm +@@ -62,11 +62,9 @@ config CONFIG_GENERIC_ARM + + config CONFIG_ARM610 + bool "Arm 610" +- select ARCH_HAS_MMU + + config CONFIG_ARM710 + bool "Arm 710" +- select ARCH_HAS_MMU + + config CONFIG_ARM7TDMI + bool "Arm 7TDMI" +@@ -74,35 +72,27 @@ config CONFIG_ARM7TDMI + + config CONFIG_ARM720T + bool "Arm 720T" +- select ARCH_HAS_MMU + + config CONFIG_ARM920T + bool "Arm 920T" +- select ARCH_HAS_MMU + + config CONFIG_ARM922T + bool "Arm 922T" +- select ARCH_HAS_MMU + + config CONFIG_ARM926T + bool "Arm 926T" +- select ARCH_HAS_MMU + + config CONFIG_ARM10T + bool "Arm 10T" +- select ARCH_HAS_MMU + + config CONFIG_ARM1136JF_S + bool "Arm 1136JF-S" +- select ARCH_HAS_MMU + + config CONFIG_ARM1176JZ_S + bool "Arm 1176JZ-S" +- select ARCH_HAS_MMU + + config CONFIG_ARM1176JZF_S + bool "Arm 1176JZF-S" +- select ARCH_HAS_MMU + + config CONFIG_ARM_CORTEX_M3 + bool "Arm Cortex-M3" +@@ -116,18 +106,14 @@ config CONFIG_ARM_CORTEX_M1 + + config CONFIG_ARM_SA110 + bool "Intel StrongArm SA-110" +- select ARCH_HAS_MMU + + config CONFIG_ARM_SA1100 + bool "Intel StrongArm SA-1100" +- select ARCH_HAS_MMU + + config CONFIG_ARM_XSCALE + bool "Intel Xscale" +- select ARCH_HAS_MMU + + config CONFIG_ARM_IWMMXT + bool "Intel Xscale With WMMX PXA27x" +- select ARCH_HAS_MMU + + endchoice +diff --git a/extra/Configs/Config.avr32 b/extra/Configs/Config.avr32 +index cbadb4c..a5eb157 100644 +--- a/extra/Configs/Config.avr32 ++++ b/extra/Configs/Config.avr32 +@@ -19,7 +19,6 @@ choice + + config CONFIG_AVR32_AP7 + bool "AVR32 AP7" +- select ARCH_HAS_MMU + + endchoice + +diff --git a/extra/Configs/Config.cris b/extra/Configs/Config.cris +index 52ca0c3..db9293c 100644 +--- a/extra/Configs/Config.cris ++++ b/extra/Configs/Config.cris +@@ -24,11 +24,9 @@ choice + - CRISv32 Support for Axis' CRISv32 architecture. + + config CONFIG_CRIS +- select ARCH_HAS_MMU + bool "CRIS" + + config CONFIG_CRISV32 +- select ARCH_HAS_MMU + bool "CRISv32" + + endchoice +diff --git a/extra/Configs/Config.hppa b/extra/Configs/Config.hppa +index 1323de2..b8699bf 100644 +--- a/extra/Configs/Config.hppa ++++ b/extra/Configs/Config.hppa +@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_BIG_ENDIAN +- select ARCH_HAS_MMU + select HAS_NO_THREADS + select ARCH_HAS_NO_LDSO + select HAVE_NO_SSP +diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 +index 288aa5e..f23646c 100644 +--- a/extra/Configs/Config.i386 ++++ b/extra/Configs/Config.i386 +@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_LITTLE_ENDIAN +- select ARCH_HAS_MMU + + choice + prompt "Target x86 Processor Family" +diff --git a/extra/Configs/Config.ia64 b/extra/Configs/Config.ia64 +index ae88be7..c7a1f63 100644 +--- a/extra/Configs/Config.ia64 ++++ b/extra/Configs/Config.ia64 +@@ -11,5 +11,4 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_LITTLE_ENDIAN +- select ARCH_HAS_MMU + select ARCH_HAS_NO_LDSO +diff --git a/extra/Configs/Config.in.arch b/extra/Configs/Config.in.arch +index 8a02cb1..4679517 100644 +--- a/extra/Configs/Config.in.arch ++++ b/extra/Configs/Config.in.arch +@@ -93,7 +93,7 @@ if ARCH_HAS_NO_MMU + comment "Target CPU lacks a memory management unit (MMU)" + endif + +-config ARCH_HAS_MMU ++config ARCH_USE_MMU + bool "Target CPU has a memory management unit (MMU)" + depends on !ARCH_HAS_NO_MMU + default y +@@ -102,13 +102,6 @@ config ARCH_HAS_MMU + then answer N here. Normally, Linux runs on systems with an MMU. + If you are building a uClinux system, answer N. + +- Most people will answer Y. +- +-config ARCH_USE_MMU +- bool "Do you want to utilize the MMU?" +- depends on ARCH_HAS_MMU +- default y +- help + If your target CPU has a MMU, and you wish to actually utilize it, + then answer Y here. Normal Linux requires an MMU. + +diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc +index 84c4423..6b09f47 100644 +--- a/extra/Configs/Config.powerpc ++++ b/extra/Configs/Config.powerpc +@@ -11,7 +11,6 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_BIG_ENDIAN +- select ARCH_HAS_MMU + + choice + prompt "Target Processor Type" +diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh +index 10e9d8b..ce86ef3 100644 +--- a/extra/Configs/Config.sh ++++ b/extra/Configs/Config.sh +@@ -37,7 +37,6 @@ config CONFIG_SH2 + bool "SH2" + + config CONFIG_SH3 +- select ARCH_HAS_MMU + bool "SH3" + + config CONFIG_SH4 +diff --git a/extra/Configs/Config.sh64 b/extra/Configs/Config.sh64 +index 02535b9..a8c22bd 100644 +--- a/extra/Configs/Config.sh64 ++++ b/extra/Configs/Config.sh64 +@@ -25,7 +25,6 @@ choice + - "SH5" SuperH SH-5 101, 103 + + config CONFIG_SH5 +- select ARCH_HAS_MMU + select UCLIBC_HAS_LFS + bool "SH5" + +diff --git a/extra/Configs/Config.x86_64 b/extra/Configs/Config.x86_64 +index 1b28088..80c9e08 100644 +--- a/extra/Configs/Config.x86_64 ++++ b/extra/Configs/Config.x86_64 +@@ -11,4 +11,3 @@ config FORCE_OPTIONS_FOR_ARCH + bool + default y + select ARCH_LITTLE_ENDIAN +- select ARCH_HAS_MMU