Index: kernel/arch/mips32/include/smp/dorder.h
===================================================================
--- kernel/arch/mips32/include/smp/dorder.h	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
+++ kernel/arch/mips32/include/smp/dorder.h	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup mips32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_mips32_DORDER_H_
+#define KERN_mips32_DORDER_H_
+
+#include <typedefs.h>
+
+extern uint32_t dorder_cpuid(void);
+extern void dorder_ipi_ack(uint32_t);
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision 753bca36deef6be542a11061ac60bd262f76f43f)
+++ kernel/arch/mips32/src/interrupt.c	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
@@ -38,4 +38,5 @@
 #include <arch.h>
 #include <arch/cp0.h>
+#include <arch/smp/dorder.h>
 #include <time/clock.h>
 #include <ipc/sysipc.h>
@@ -48,4 +49,5 @@
 function virtual_timer_fnc = NULL;
 static irq_t timer_irq;
+static irq_t dorder_irq;
 
 // TODO: This is SMP unsafe!!!
@@ -149,4 +151,14 @@
 }
 
+static irq_ownership_t dorder_claim(irq_t *irq)
+{
+	return IRQ_ACCEPT;
+}
+
+static void dorder_irq_handler(irq_t *irq)
+{
+	dorder_ipi_ack(1 << dorder_cpuid());
+}
+
 /* Initialize basic tables for exception dispatching */
 void interrupt_init(void)
@@ -163,4 +175,13 @@
 	timer_start();
 	cp0_unmask_int(TIMER_IRQ);
+	
+	irq_initialize(&dorder_irq);
+	dorder_irq.devno = device_assign_devno();
+	dorder_irq.inr = DORDER_IRQ;
+	dorder_irq.claim = dorder_claim;
+	dorder_irq.handler = dorder_irq_handler;
+	irq_register(&dorder_irq);
+	
+	cp0_unmask_int(DORDER_IRQ);
 }
 
Index: kernel/arch/mips32/src/smp/dorder.c
===================================================================
--- kernel/arch/mips32/src/smp/dorder.c	(revision 753bca36deef6be542a11061ac60bd262f76f43f)
+++ kernel/arch/mips32/src/smp/dorder.c	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
@@ -33,17 +33,29 @@
  */
 
+#include <typedefs.h>
 #include <smp/ipi.h>
+#include <arch/smp/dorder.h>
+
+#define MSIM_DORDER_ADDRESS  0xB0000004
 
 #ifdef CONFIG_SMP
 
-#define MSIM_DORDER_ADDRESS  0xB0000004
-
 void ipi_broadcast_arch(int ipi)
 {
-	*((volatile unsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF;
+	*((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff;
 }
 
 #endif
 
+uint32_t dorder_cpuid(void)
+{
+	return *((volatile uint32_t *) MSIM_DORDER_ADDRESS);
+}
+
+void dorder_ipi_ack(uint32_t mask)
+{
+	*((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask;
+}
+
 /** @}
  */
Index: tools/toolchain.sh
===================================================================
--- tools/toolchain.sh	(revision 753bca36deef6be542a11061ac60bd262f76f43f)
+++ tools/toolchain.sh	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
@@ -1,3 +1,3 @@
-#!/bin/bash
+#! /bin/bash
 
 #
@@ -33,4 +33,5 @@
 		echo
 		echo "Script failed: $2"
+		
 		exit 1
 	fi
@@ -45,4 +46,5 @@
 		echo
 		echo "Checksum of ${FILE} does not match."
+		
 		exit 2
 	fi
@@ -71,4 +73,52 @@
 }
 
+change_title() {
+	echo -en "\e]0;$1\a"
+}
+
+show_countdown() {
+	TM="$1"
+	
+	if [ "${TM}" -eq 0 ] ; then
+		echo
+		return 0
+	fi
+	
+	echo -n "${TM} "
+	change_title "${TM}"
+	sleep 1
+	
+	TM="`expr "${TM}" - 1`"
+	show_countdown "${TM}"
+}
+
+show_dependencies() {
+	echo "IMPORTANT NOTICE:"
+	echo
+	echo "For a successful compilation and use of the cross-compiler"
+	echo "toolchain you need at least the following dependencies."
+	echo
+	echo "Please make sure that the dependencies are present in your"
+	echo "system. Otherwise the compilation process might fail after"
+	echo "a few seconds or minutes."
+	echo
+	echo " - SED, AWK, Flex, Bison, gzip, bzip2, Bourne Shell"
+	echo " - gettext, zlib, Texinfo, libelf, libgomp"
+	echo " - GNU Multiple Precision Library (GMP)"
+	echo " - GNU Make"
+	echo " - GNU tar"
+	echo " - GNU Coreutils"
+	echo " - GNU Sharutils"
+	echo " - MPFR"
+	echo " - MPC"
+	echo " - Parma Polyhedra Library (PPL)"
+	echo " - ClooG-PPL"
+	echo " - native C compiler, assembler and linker"
+	echo " - native C library with headers"
+	echo
+	
+	show_countdown 10
+}
+
 download_check() {
 	SOURCE="$1"
@@ -77,4 +127,5 @@
 	
 	if [ ! -f "${FILE}" ]; then
+		change_title "Downloading ${FILE}"
 		wget -c "${SOURCE}${FILE}"
 		check_error $? "Error downloading ${FILE}."
@@ -88,4 +139,5 @@
 	
 	if [ -d "${DIR}" ]; then
+		change_title "Removing ${DIR}"
 		echo " >>> Removing ${DIR}"
 		rm -fr "${DIR}"
@@ -97,4 +149,5 @@
 	DESC="$2"
 	
+	change_title "Creating ${DESC}"
 	echo ">>> Creating ${DESC}"
 	
@@ -108,5 +161,6 @@
 	DESC="$2"
 	
-	echo " >>> ${DESC}"
+	change_title "Unpacking ${DESC}"
+	echo " >>> Unpacking ${DESC}"
 	
 	tar -xjf "${FILE}"
@@ -142,5 +196,5 @@
 	
 	BINUTILS_VERSION="2.20"
-	GCC_VERSION="4.5.0"
+	GCC_VERSION="4.5.1"
 	
 	BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2"
@@ -165,7 +219,7 @@
 	echo ">>> Downloading tarballs"
 	download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8"
-	download_check "${GCC_SOURCE}" "${GCC_CORE}" "58eda33c3184303628f91c42a7ab15b5"
-	download_check "${GCC_SOURCE}" "${GCC_OBJC}" "8d8c01b6631b020cc6c167860fde2398"
-	download_check "${GCC_SOURCE}" "${GCC_CPP}" "5ab93605af40def4844eda09ca769c2d"
+	download_check "${GCC_SOURCE}" "${GCC_CORE}" "dc8959e31b01a65ce10d269614815054"
+	download_check "${GCC_SOURCE}" "${GCC_OBJC}" "3c11b7037896e967eddf8178af2ddd98"
+	download_check "${GCC_SOURCE}" "${GCC_CPP}" "b294953ff0bb2f20c7acb2bf005d832a"
 	
 	echo ">>> Removing previous content"
@@ -184,18 +238,26 @@
 	unpack_tarball "${GCC_CPP}" "C++"
 	
-	echo ">>> Compiling and installing binutils"
+	echo ">>> Processing binutils (${PLATFORM})"
 	cd "${BINUTILSDIR}"
 	check_error $? "Change directory failed."
 	patch_binutils "${PLATFORM}"
-	./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls"
+	
+	change_title "binutils: configure (${PLATFORM})"
+	./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls
 	check_error $? "Error configuring binutils."
+	
+	change_title "binutils: make (${PLATFORM})"
 	make all install
 	check_error $? "Error compiling/installing binutils."
 	
-	echo ">>> Compiling and installing GCC"
+	echo ">>> Processing GCC (${PLATFORM})"
 	cd "${OBJDIR}"
 	check_error $? "Change directory failed."
+	
+	change_title "GCC: configure (${PLATFORM})"
 	"${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared --enable-lto
 	check_error $? "Error configuring GCC."
+	
+	change_title "GCC: make (${PLATFORM})"
 	PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
 	check_error $? "Error compiling/installing GCC."
@@ -216,4 +278,6 @@
 	show_usage
 fi
+
+show_dependencies
 
 case "$1" in
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 753bca36deef6be542a11061ac60bd262f76f43f)
+++ uspace/srv/vfs/vfs_ops.c	(revision 10056483ad392d0bac78518e04b2d07a4a811a56)
@@ -1355,4 +1355,5 @@
 		int ret = vfs_close_internal(newfile);
 		if (ret != EOK) {
+			fibril_mutex_unlock(&oldfile->lock);
 			ipc_answer_0(rid, ret);
 			return;
@@ -1361,4 +1362,5 @@
 		ret = vfs_fd_free(newfd);
 		if (ret != EOK) {
+			fibril_mutex_unlock(&oldfile->lock);
 			ipc_answer_0(rid, ret);
 			return;
