Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ boot/Makefile.common	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -173,5 +173,4 @@
 	$(USPACE_PATH)/app/mkexfat/mkexfat \
 	$(USPACE_PATH)/app/mkmfs/mkmfs \
-	$(USPACE_PATH)/app/lsusb/lsusb \
 	$(USPACE_PATH)/app/sbi/sbi \
 	$(USPACE_PATH)/app/sportdmp/sportdmp \
Index: boot/arch/ppc32/_link.ld.in
===================================================================
--- boot/arch/ppc32/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ boot/arch/ppc32/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -2,5 +2,5 @@
 
 SECTIONS {
-	. = 0x01000000;
+	. = 0x02000000;
 	.text : {
 		*(BOOTSTRAP);
Index: boot/arch/ppc32/include/arch.h
===================================================================
--- boot/arch/ppc32/include/arch.h	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ boot/arch/ppc32/include/arch.h	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -35,5 +35,5 @@
 #define BOOT_OFFSET  0x8000
 
-#define LOADER_ADDRESS  0x01000000
+#define LOADER_ADDRESS  0x02000000
 
 #ifndef __ASM__
Index: boot/arch/ppc32/src/main.c
===================================================================
--- boot/arch/ppc32/src/main.c	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ boot/arch/ppc32/src/main.c	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -103,4 +103,10 @@
 	}
 	
+	if (top >= (size_t) loader_address_pa) {
+		printf("Inflated components overlap loader area.\n");
+		printf("The boot image is too large. Halting.\n");
+		halt();
+	}
+	
 	void *balloc_base;
 	void *balloc_base_pa;
Index: kernel/arch/arm32/src/exception.c
===================================================================
--- kernel/arch/arm32/src/exception.c	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ kernel/arch/arm32/src/exception.c	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -142,5 +142,5 @@
 #elif defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
 	asm volatile (
-		"mrc p15, 0, %[control_reg], c1, c1"
+		"mrc p15, 0, %[control_reg], c1, c0"
 		: [control_reg] "=r" (control_reg)
 	);
@@ -157,5 +157,5 @@
 #elif defined(PROCESSOR_armv4) | defined(PROCESSOR_armv5)
 	asm volatile (
-		"mcr p15, 0, %[control_reg], c1, c1"
+		"mcr p15, 0, %[control_reg], c1, c0"
 		:: [control_reg] "r" (control_reg)
 	);
Index: kernel/genarch/src/drivers/arm926_uart/arm926_uart.c
===================================================================
--- kernel/genarch/src/drivers/arm926_uart/arm926_uart.c	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ kernel/genarch/src/drivers/arm926_uart/arm926_uart.c	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -83,5 +83,5 @@
 	arm926_uart_t *uart = irq->instance;
 
-	// TODO make pio_read accept consts pointers and remove the cast
+	// TODO make pio_read accept const pointers and remove the cast
 	while ((pio_read_32((ioport32_t*)&uart->regs->flag) & ARM926_UART_FLAG_RXFE_FLAG) == 0) {
 		/* We ignore all error flags here */
@@ -109,5 +109,5 @@
 
 	/* Mask all interrupts */
-	uart->regs->interrupt_mask = ARM926_UART_INTERRUPT_ALL;
+	uart->regs->interrupt_mask = 0;
 
 	outdev_initialize("arm926_uart_dev", &uart->outdev, &arm926_uart_ops);
@@ -133,5 +133,5 @@
 	irq_register(&uart->irq);
 	/* Enable receive interrupt */
-	uart->regs->interrupt_mask &= ~ARM926_UART_INTERRUPT_RX_FLAG;
+	uart->regs->interrupt_mask |= ARM926_UART_INTERRUPT_RX_FLAG;
 }
 
Index: kernel/generic/include/lib/elf_load.h
===================================================================
--- kernel/generic/include/lib/elf_load.h	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ kernel/generic/include/lib/elf_load.h	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -42,16 +42,15 @@
  * ELF error return codes
  */
-#define EE_OK			0	/* No error */
-#define EE_INVALID		1	/* Invalid ELF image */
-#define	EE_MEMORY		2	/* Cannot allocate address space */
-#define EE_INCOMPATIBLE		3	/* ELF image is not compatible with current architecture */
-#define EE_UNSUPPORTED		4	/* Non-supported ELF (e.g. dynamic ELFs) */
-#define EE_LOADER		5	/* The image is actually a program loader. */
-#define EE_IRRECOVERABLE	6
+#define EE_OK             0  /* No error */
+#define EE_INVALID        1  /* Invalid ELF image */
+#define EE_MEMORY         2  /* Cannot allocate address space */
+#define EE_INCOMPATIBLE   3  /* ELF image is not compatible with current architecture */
+#define EE_UNSUPPORTED    4  /* Non-supported ELF (e.g. dynamic ELFs) */
+#define EE_LOADER         5  /* The image is actually a program loader. */
+#define EE_IRRECOVERABLE  6  /* Irrecoverable error. */
 
 /**
  * This flags is passed when running the loader, otherwise elf_load()
  * would return with a EE_LOADER error code.
- *
  */
 #define ELD_F_NONE    0
Index: uspace/lib/c/arch/abs32le/_link.ld.in
===================================================================
--- uspace/lib/c/arch/abs32le/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/abs32le/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -15,14 +15,7 @@
 #ifdef LOADER
 	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.text : {
@@ -30,4 +23,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x1000;
Index: uspace/lib/c/arch/amd64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/amd64/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/amd64/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -16,14 +16,7 @@
 #ifdef LOADER
 	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.init : {
@@ -35,4 +28,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x1000;
Index: uspace/lib/c/arch/arm32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/arm32/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/arm32/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -15,14 +15,7 @@
 #ifdef LOADER
 	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 8);
 	
 	.init : {
@@ -34,4 +27,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x1000;
Index: uspace/lib/c/arch/ia32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia32/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/ia32/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -24,13 +24,4 @@
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
-	
-#if defined(LOADER) || defined(DLEXE)
-	.interp : {
-		*(.interp);
-	} :interp :text
-#endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.init : {
@@ -71,4 +62,11 @@
 	} :text
 #endif
+	
+#if defined(LOADER) || defined(DLEXE)
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
+	
 	. = . + 0x1000;
 	
Index: uspace/lib/c/arch/ia64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia64/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/ia64/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -15,13 +15,9 @@
 #ifdef LOADER
 	. = 0x800000000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
 	
-	/* Make sure the code is aligned reasonably */
+	/* Workaround proper alignment of the .init section */
 	. = ALIGN(., 16);
 	
@@ -34,4 +30,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x4000;
Index: uspace/lib/c/arch/mips32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips32/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/mips32/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -15,14 +15,7 @@
 #ifdef LOADER
 	. = 0x70004000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.init : {
@@ -34,4 +27,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x4000;
Index: uspace/lib/c/arch/mips64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips64/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/mips64/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -16,14 +16,7 @@
 #ifdef LOADER
 	. = 0x70004000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.init : {
@@ -35,4 +28,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x4000;
Index: uspace/lib/c/arch/ppc32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ppc32/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/ppc32/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -16,14 +16,7 @@
 #ifdef LOADER
 	. = 0x70001000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 4);
 	
 	.init : {
@@ -35,4 +28,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x1000;
Index: uspace/lib/c/arch/sparc64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/sparc64/_link.ld.in	(revision ecd1a0aa0746649b810764037fa03dca950f5122)
+++ uspace/lib/c/arch/sparc64/_link.ld.in	(revision cc250b3af35039f28df79b2120b0af9079f5966c)
@@ -15,14 +15,7 @@
 #ifdef LOADER
 	. = 0x70004000 + SIZEOF_HEADERS;
-	
-	.interp : {
-		*(.interp);
-	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
-	
-	/* Make sure the code is aligned reasonably */
-	. = ALIGN(., 16);
 	
 	.init : {
@@ -34,4 +27,10 @@
 		*(.rodata .rodata.*);
 	} :text
+	
+#ifdef LOADER
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
 	
 	. = . + 0x4000;
