Index: boot/arch/arm32/Makefile.inc
===================================================================
--- boot/arch/arm32/Makefile.inc	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/Makefile.inc	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -43,4 +43,12 @@
 endif
 
+ifeq ($(MACHINE), raspberrypi)
+	BOOT_OUTPUT = image.boot
+	POST_OUTPUT = $(ROOT_PATH)/uImage.bin	
+	LADDR = 0x00008000
+	SADDR = 0x00008000
+	POSTBUILD = Makefile.uboot	     
+endif
+
 BFD_NAME = elf32-littlearm
 BFD_OUTPUT = $(BFD_NAME)
Index: boot/arch/arm32/include/arch.h
===================================================================
--- boot/arch/arm32/include/arch.h	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/include/arch.h	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -46,4 +46,6 @@
 #elif defined MACHINE_beaglebone
 #define BOOT_BASE       0x80000000
+#elif defined MACHINE_raspberrypi
+#define BOOT_BASE	0x00008000
 #else
 #define BOOT_BASE	0x00000000
Index: boot/arch/arm32/include/main.h
===================================================================
--- boot/arch/arm32/include/main.h	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/include/main.h	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -75,4 +75,24 @@
 #define ICP_SCONS_ADDR		0x16000000
 
+/** Raspberry PI serial console registers */
+#define BCM2835_UART0_BASE	0x20201000
+#define BCM2835_UART0_DR	(BCM2835_UART0_BASE + 0x00)
+#define BCM2835_UART0_FR	(BCM2835_UART0_BASE + 0x18)
+#define BCM2835_UART0_ILPR	(BCM2835_UART0_BASE + 0x20)
+#define BCM2835_UART0_IBRD	(BCM2835_UART0_BASE + 0x24)
+#define BCM2835_UART0_FBRD	(BCM2835_UART0_BASE + 0x28)
+#define BCM2835_UART0_LCRH	(BCM2835_UART0_BASE + 0x2C)
+#define BCM2835_UART0_CR	(BCM2835_UART0_BASE + 0x30)
+#define BCM2835_UART0_ICR	(BCM2835_UART0_BASE + 0x44)
+
+#define BCM2835_UART0_FR_TXFF	(1 << 5)
+#define BCM2835_UART0_LCRH_FEN	(1 << 4)
+#define BCM2835_UART0_LCRH_WL8	((1 << 5) | (1 << 6))
+#define BCM2835_UART0_CR_UARTEN	(1 << 0)
+#define BCM2835_UART0_CR_TXE	(1 << 8)
+#define BCM2835_UART0_CR_RXE	(1 << 9)
+
+
+
 extern void bootstrap(void);
 
Index: boot/arch/arm32/include/mm.h
===================================================================
--- boot/arch/arm32/include/mm.h	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/include/mm.h	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -68,4 +68,8 @@
 #define AM335x_RAM_END     0xC0000000
 
+/** Start of ram memory on BCM2835 */
+#define BCM2835_RAM_START   0
+/** End of ram memory on BCM2835 */
+#define BCM2835_RAM_END     0x20000000
 
 /* Page table level 0 entry - "section" format is used
Index: boot/arch/arm32/src/mm.c
===================================================================
--- boot/arch/arm32/src/mm.c	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/src/mm.c	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -75,4 +75,8 @@
 	if (address >= AM335x_RAM_START && address < AM335x_RAM_END)
 		return 1;
+#elif defined MACHINE_raspberrypi
+	const unsigned long address = section << PTE_SECTION_SHIFT;
+	if (address < BCM2835_RAM_END)
+		return 1;
 #endif
 	return 0;
@@ -113,10 +117,19 @@
 static void init_boot_pt(void)
 {
+#if defined MACHINE_raspberrypi
+	const pfn_t split_page = 2048;
+#else
 	const pfn_t split_page = PTL0_ENTRIES;
+#endif
+
 	/* Create 1:1 virtual-physical mapping (in lower 2 GB). */
 	pfn_t page;
 	for (page = 0; page < split_page; page++)
 		init_ptl0_section(&boot_pt[page], page);
-	
+
+#if defined MACHINE_raspberrypi
+	for (; page < PTL0_ENTRIES; page++)
+		init_ptl0_section(&boot_pt[page], page - split_page);
+#endif	
 	asm volatile (
 		"mcr p15, 0, %[pt], c2, c0, 0\n"
Index: boot/arch/arm32/src/putchar.c
===================================================================
--- boot/arch/arm32/src/putchar.c	(revision b696cbff4a24376d6e6be1b86817a2cf94bab1e3)
+++ boot/arch/arm32/src/putchar.c	(revision 8f9d70b5498ff71a9096be68b3f615349ee58ed3)
@@ -122,4 +122,46 @@
 #endif
 
+#ifdef MACHINE_raspberrypi
+
+static int raspi_init;
+
+static inline void write32(uint32_t addr, uint32_t data)
+{
+	*(volatile uint32_t *)(addr) = data;
+}
+
+static inline uint32_t read32(uint32_t addr)
+{
+	return *(volatile uint32_t *)(addr);
+}
+
+static void scons_init_raspi(void)
+{
+	write32(BCM2835_UART0_CR, 0x0);		/* Disable UART */
+	write32(BCM2835_UART0_ICR, 0x7f);	/* Clear interrupts */
+	write32(BCM2835_UART0_IBRD, 1);		/* Set integer baud rate */
+	write32(BCM2835_UART0_FBRD, 40);	/* Set fractional baud rate */
+	write32(BCM2835_UART0_LCRH,
+		BCM2835_UART0_LCRH_FEN |	/* Enable FIFOs */
+		BCM2835_UART0_LCRH_WL8);	/* Word length: 8 */
+	write32(BCM2835_UART0_CR,
+		BCM2835_UART0_CR_UARTEN |	/* Enable UART */
+		BCM2835_UART0_CR_TXE |		/* Enable TX */
+		BCM2835_UART0_CR_RXE);		/* Enable RX */
+}
+
+static void scons_sendb_raspi(uint8_t byte)
+{
+	if (!raspi_init) {
+		scons_init_raspi();
+		raspi_init = 1;
+	}
+
+	while (read32(BCM2835_UART0_FR) & BCM2835_UART0_FR_TXFF);
+
+	write32(BCM2835_UART0_DR, byte);
+}
+#endif
+
 /** Send a byte to the serial console.
  *
@@ -139,4 +181,7 @@
 #ifdef MACHINE_integratorcp
 	scons_sendb_icp(byte);
+#endif
+#ifdef MACHINE_raspberrypi
+	scons_sendb_raspi(byte);
 #endif
 }
