diff -urN a/toolchain/Config.in b/toolchain/Config.in
--- a/toolchain/Config.in	2007-12-28 12:21:08.000000000 +0100
+++ b/toolchain/Config.in	2007-12-28 11:17:47.000000000 +0100
@@ -38,7 +38,7 @@
 	bool
 	prompt "Use software floating point by default" if TOOLCHAINOPTS
 	default n
-	depends on arm || armeb || powerpc
+	depends on arm || armeb || powerpc || mips || mipsel
 	help
 	  If your target CPU does not have a Floating Point Unit (FPU) or a
 	  kernel FPU emulator, but you still wish to support floating point
diff -urN a/toolchain/gcc/patches/4.2.2/101-soft-float.patch b/toolchain/gcc/patches/4.2.2/101-soft-float.patch
--- a/toolchain/gcc/patches/4.2.2/101-soft-float.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/toolchain/gcc/patches/4.2.2/101-soft-float.patch	2007-12-28 11:10:03.000000000 +0100
@@ -0,0 +1,12 @@
+--- gcc-4.2.1/gcc/config/t-linux.orig	2004-05-04 18:09:38.000000000 +0200
++++ gcc-4.2.1/gcc/config/t-linux	2007-12-28 11:08:34.000000000 +0100
+@@ -1,7 +1,8 @@
+ # Compile crtbeginS.o and crtendS.o with pic.
+ CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+ # Compile libgcc2.a with pic.
+-TARGET_LIBGCC2_CFLAGS = -fPIC
++# Compile libgcc with softfloat (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8765)
++TARGET_LIBGCC2_CFLAGS = -fPIC -msoft-float
+ 
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
diff -urN a/toolchain/uClibc/config/mipsel b/toolchain/uClibc/config/mipsel
--- a/toolchain/uClibc/config/mipsel	2007-12-28 12:21:06.000000000 +0100
+++ b/toolchain/uClibc/config/mipsel	2007-12-27 14:21:31.000000000 +0100
@@ -1,10 +1,3 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
 #
 # Automatically generated make config: don't edit
 #
@@ -49,9 +42,10 @@
 # ARCH_HAS_NO_MMU is not set
 ARCH_HAS_MMU=y
 UCLIBC_HAS_FLOATS=y
-HAS_FPU=y
-# DO_C99_MATH is not set
-KERNEL_SOURCE="./toolchain_build_mipsel/linux"
+# HAS_FPU is not set
+UCLIBC_HAS_SOFT_FLOAT=y
+DO_C99_MATH=y
+KERNEL_SOURCE="/openwrt/trunk/build_dir/toolchain-mipsel_gcc4.2.2/linux"
 C_SYMBOL_PREFIX=""
 HAVE_DOT_CONFIG=y
 
@@ -69,8 +63,8 @@
 LDSO_CACHE_SUPPORT=y
 # LDSO_PRELOAD_FILE_SUPPORT is not set
 LDSO_BASE_FILENAME="ld.so"
-LDSO_RUNPATH=y
-DL_FINI_CRT_COMPAT=y
+# LDSO_RUNPATH is not set
+# DL_FINI_CRT_COMPAT is not set
 UCLIBC_CTOR_DTOR=y
 # HAS_NO_THREADS is not set
 UCLIBC_HAS_THREADS=y
@@ -94,7 +88,7 @@
 #
 # Networking Support
 #
-UCLIBC_HAS_IPV6=y
+# UCLIBC_HAS_IPV6 is not set
 UCLIBC_HAS_RPC=y
 UCLIBC_HAS_FULL_RPC=y
 
@@ -108,10 +102,11 @@
 # UCLIBC_HAS_CTYPE_UNSAFE is not set
 UCLIBC_HAS_CTYPE_CHECKED=y
 # UCLIBC_HAS_CTYPE_ENFORCED is not set
-UCLIBC_HAS_WCHAR=y
+# UCLIBC_HAS_WCHAR is not set
 # UCLIBC_HAS_LOCALE is not set
 UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+# USE_OLD_VFPRINTF is not set
 UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
 # UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
@@ -142,7 +137,7 @@
 # Big and Tall
 #
 UCLIBC_HAS_REGEX=y
-UCLIBC_HAS_WORDEXP=y
+# UCLIBC_HAS_WORDEXP is not set
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GLOB=y
 
@@ -167,5 +162,5 @@
 # DOASSERTS is not set
 # SUPPORT_LD_DEBUG is not set
 # SUPPORT_LD_DEBUG_EARLY is not set
-WARNINGS="-Wall"
+WARNINGS="-Wall -march=4kc -mtune=4kc"
 # UCLIBC_MJN3_ONLY is not set
diff -urN a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
--- a/toolchain/uClibc/Makefile	2007-12-28 12:21:06.000000000 +0100
+++ b/toolchain/uClibc/Makefile	2007-12-28 12:07:54.000000000 +0100
@@ -9,11 +9,11 @@
 
 PKG_NAME:=uClibc
 PKG_VERSION:=0.9.28
-PKG_EXTRAVERSION:=.2
+#PKG_EXTRAVERSION:=.2
 
 PKG_SOURCE:=uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.uclibc.org/downloads
-PKG_MD5SUM:=959f25286e317f0d9e2103445c5a14c2
+PKG_MD5SUM:=1ada58d919a82561061e4741fb6abd29
 PKG_CAT:=bzcat
 
 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
diff -urN a/toolchain/uClibc/patches/100-revert_broken_stuff.patch b/toolchain/uClibc/patches/100-revert_broken_stuff.patch
--- a/toolchain/uClibc/patches/100-revert_broken_stuff.patch	2007-12-28 12:21:06.000000000 +0100
+++ b/toolchain/uClibc/patches/100-revert_broken_stuff.patch	2007-12-28 12:25:58.882701943 +0100
@@ -1,51 +0,0 @@
-diff -ur uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h
---- uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2007-02-22 00:28:41.000000000 +0100
-+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2007-01-26 00:54:19.000000000 +0100
-@@ -24,27 +23,27 @@
- #define _UCLIBC_PTHREAD_H
- 
- #ifndef _PTHREAD_H
--# error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
-+#error Always include <pthread.h> rather than <bits/uClibc_pthread.h>
- #endif
- 
--#if defined _LIBC
--/* Threading functions internal to uClibc.  Make these thread functions
-- * weak so that we can elide them from single-threaded processes.  */
--extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
--		__const pthread_mutexattr_t *__mutex_attr);
--extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
--extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
--extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
--extern void __uclibc_mutex_unlock (void *) attribute_hidden;
--extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
--
--struct _pthread_cleanup_buffer;
--extern void weak_function _pthread_cleanup_push_defer (
--		struct _pthread_cleanup_buffer *__buffer,
--		void (*__routine) (void *), void *__arg);
--extern void weak_function _pthread_cleanup_pop_restore (
--		struct _pthread_cleanup_buffer *__buffer,
--		int __execute);
--#endif
-+#if defined _LIBC
-+/* Threading functions internal to uClibc.  Make these thread functions
-+ * weak so that we can elide them from single-threaded processes.  */
-+extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
-+		__const pthread_mutexattr_t *__mutex_attr);
-+extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-+extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
-+extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
-+extern void __uclibc_mutex_unlock (void *) attribute_hidden;
-+extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
-+
-+struct _pthread_cleanup_buffer;
-+extern void _pthread_cleanup_push_defer (
-+		struct _pthread_cleanup_buffer *__buffer,
-+		void (*__routine) (void *), void *__arg);
-+extern void _pthread_cleanup_pop_restore (
-+		struct _pthread_cleanup_buffer *__buffer,
-+		int __execute);
-+#endif
- 
- #endif
diff -urN a/toolchain/uClibc/patches/150-portability.patch b/toolchain/uClibc/patches/150-portability.patch
--- a/toolchain/uClibc/patches/150-portability.patch	2007-12-28 12:21:06.000000000 +0100
+++ b/toolchain/uClibc/patches/150-portability.patch	2007-12-28 12:26:00.878815695 +0100
@@ -1,29 +0,0 @@
-Fix portability of build infrastructure
-* cp -d -> cp -P
-* tar --exclude is a GNU tar feature
-
---- uClibc-0.9.28/Makefile.orig	Sun Jun 11 19:08:56 2006
-+++ uClibc-0.9.28/Makefile	Sun Jun 11 19:12:05 2006
-@@ -158,12 +158,7 @@ install_dev:
- 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
- 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
- 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
--	if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
--		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
--	else \
--		extra_exclude="" ; \
--	fi ; \
--	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
-+	tar -chf - include \
- 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
- ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
- 	# Remove floating point related headers since float support is disabled.
-@@ -253,7 +248,7 @@ ifeq ($(strip $(HAVE_SHARED)),y)
- 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
- 	$(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
- 		$(PREFIX)$(RUNTIME_PREFIX)lib
--	cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
-+	cp -pRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
- 	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
- 	    set -e; \
- 		$(SHELL_SET_X); \
diff -urN a/toolchain/uClibc/patches/230-cris-pagesize.patch b/toolchain/uClibc/patches/230-cris-pagesize.patch
--- a/toolchain/uClibc/patches/230-cris-pagesize.patch	2007-12-28 12:21:06.000000000 +0100
+++ b/toolchain/uClibc/patches/230-cris-pagesize.patch	2007-12-28 12:26:03.062940161 +0100
@@ -1,24 +0,0 @@
-diff -urN uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h uClibc-0.9.28.2/ldso/include/dl-syscall.h
---- uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h	2007-05-22 20:39:28.000000000 +0200
-+++ uClibc-0.9.28.2/ldso/include/dl-syscall.h	2007-05-22 20:41:30.000000000 +0200
-@@ -155,8 +155,9 @@
- static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
-                               int flags, int fd, unsigned long offset)
- {
--	if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
-+	if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)){
- 		return MAP_FAILED;
-+	}
- 	return __syscall_mmap2(addr, size, prot, flags,
- 	                       fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
- }
-diff -urN uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h
---- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h	2007-05-22 20:39:28.000000000 +0200
-+++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h	2007-05-22 20:42:25.000000000 +0200
-@@ -24,5 +24,5 @@
- #define PAGE_SHIFT	13
- #define PAGE_SIZE	(1UL << PAGE_SHIFT)
- #define PAGE_MASK	(~(PAGE_SIZE-1))
--
-+#define MMAP2_PAGE_SHIFT PAGE_SHIFT
- #endif /* _UCLIBC_PAGE_H */
diff -urN a/toolchain/uClibc/patches/orig/100-revert_broken_stuff.patch b/toolchain/uClibc/patches/orig/100-revert_broken_stuff.patch
--- a/toolchain/uClibc/patches/orig/100-revert_broken_stuff.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/toolchain/uClibc/patches/orig/100-revert_broken_stuff.patch	2007-12-28 10:52:35.000000000 +0100
@@ -0,0 +1,51 @@
+diff -ur uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h
+--- uClibc-0.9.28.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2007-02-22 00:28:41.000000000 +0100
++++ uClibc-0.9.28.1/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2007-01-26 00:54:19.000000000 +0100
+@@ -24,27 +23,27 @@
+ #define _UCLIBC_PTHREAD_H
+ 
+ #ifndef _PTHREAD_H
+-# error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
++#error Always include <pthread.h> rather than <bits/uClibc_pthread.h>
+ #endif
+ 
+-#if defined _LIBC
+-/* Threading functions internal to uClibc.  Make these thread functions
+- * weak so that we can elide them from single-threaded processes.  */
+-extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
+-		__const pthread_mutexattr_t *__mutex_attr);
+-extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
+-extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
+-extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+-extern void __uclibc_mutex_unlock (void *) attribute_hidden;
+-extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
+-
+-struct _pthread_cleanup_buffer;
+-extern void weak_function _pthread_cleanup_push_defer (
+-		struct _pthread_cleanup_buffer *__buffer,
+-		void (*__routine) (void *), void *__arg);
+-extern void weak_function _pthread_cleanup_pop_restore (
+-		struct _pthread_cleanup_buffer *__buffer,
+-		int __execute);
+-#endif
++#if defined _LIBC
++/* Threading functions internal to uClibc.  Make these thread functions
++ * weak so that we can elide them from single-threaded processes.  */
++extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
++		__const pthread_mutexattr_t *__mutex_attr);
++extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
++extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
++extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
++extern void __uclibc_mutex_unlock (void *) attribute_hidden;
++extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
++
++struct _pthread_cleanup_buffer;
++extern void _pthread_cleanup_push_defer (
++		struct _pthread_cleanup_buffer *__buffer,
++		void (*__routine) (void *), void *__arg);
++extern void _pthread_cleanup_pop_restore (
++		struct _pthread_cleanup_buffer *__buffer,
++		int __execute);
++#endif
+ 
+ #endif
diff -urN a/toolchain/uClibc/patches/orig/150-portability.patch b/toolchain/uClibc/patches/orig/150-portability.patch
--- a/toolchain/uClibc/patches/orig/150-portability.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/toolchain/uClibc/patches/orig/150-portability.patch	2007-12-28 10:52:35.000000000 +0100
@@ -0,0 +1,29 @@
+Fix portability of build infrastructure
+* cp -d -> cp -P
+* tar --exclude is a GNU tar feature
+
+--- uClibc-0.9.28/Makefile.orig	Sun Jun 11 19:08:56 2006
++++ uClibc-0.9.28/Makefile	Sun Jun 11 19:12:05 2006
+@@ -158,12 +158,7 @@ install_dev:
+ 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
+ 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
+ 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
+-	if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
+-		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
+-	else \
+-		extra_exclude="" ; \
+-	fi ; \
+-	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
++	tar -chf - include \
+ 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
+ ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ 	# Remove floating point related headers since float support is disabled.
+@@ -253,7 +248,7 @@ ifeq ($(strip $(HAVE_SHARED)),y)
+ 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
+ 	$(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+ 		$(PREFIX)$(RUNTIME_PREFIX)lib
+-	cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
++	cp -pRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib
+ 	@if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
+ 	    set -e; \
+ 		$(SHELL_SET_X); \
diff -urN a/toolchain/uClibc/patches/orig/230-cris-pagesize.patch b/toolchain/uClibc/patches/orig/230-cris-pagesize.patch
--- a/toolchain/uClibc/patches/orig/230-cris-pagesize.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/toolchain/uClibc/patches/orig/230-cris-pagesize.patch	2007-12-28 10:52:35.000000000 +0100
@@ -0,0 +1,24 @@
+diff -urN uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h uClibc-0.9.28.2/ldso/include/dl-syscall.h
+--- uClibc-0.9.28.2.orig/ldso/include/dl-syscall.h	2007-05-22 20:39:28.000000000 +0200
++++ uClibc-0.9.28.2/ldso/include/dl-syscall.h	2007-05-22 20:41:30.000000000 +0200
+@@ -155,8 +155,9 @@
+ static inline void * _dl_mmap(void * addr, unsigned long size, int prot,
+                               int flags, int fd, unsigned long offset)
+ {
+-	if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
++	if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)){
+ 		return MAP_FAILED;
++	}
+ 	return __syscall_mmap2(addr, size, prot, flags,
+ 	                       fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
+ }
+diff -urN uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h
+--- uClibc-0.9.28.2.orig/libc/sysdeps/linux/cris/bits/uClibc_page.h	2007-05-22 20:39:28.000000000 +0200
++++ uClibc-0.9.28.2/libc/sysdeps/linux/cris/bits/uClibc_page.h	2007-05-22 20:42:25.000000000 +0200
+@@ -24,5 +24,5 @@
+ #define PAGE_SHIFT	13
+ #define PAGE_SIZE	(1UL << PAGE_SHIFT)
+ #define PAGE_MASK	(~(PAGE_SIZE-1))
+-
++#define MMAP2_PAGE_SHIFT PAGE_SHIFT
+ #endif /* _UCLIBC_PAGE_H */
diff -urN a/toolchain/uClibc/patches/orig/conf_spb b/toolchain/uClibc/patches/orig/conf_spb
--- a/toolchain/uClibc/patches/orig/conf_spb	1970-01-01 01:00:00.000000000 +0100
+++ b/toolchain/uClibc/patches/orig/conf_spb	2007-12-28 11:47:51.000000000 +0100
@@ -0,0 +1,4 @@
+# avm fritzbox, currently 200712, uses uClibc-0.9.28
+# (0.9.28.2 is not compatible)
+# thus some patches must not be used
+#  100, 150, 230

