Index: boot/arch/arm32/Makefile.inc
===================================================================
--- boot/arch/arm32/Makefile.inc	(revision fc14438a8dd4f64269a9db0d8db45f35450495dd)
+++ boot/arch/arm32/Makefile.inc	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
@@ -27,4 +27,10 @@
 #
 
+ifeq ($(MACHINE), gta02)
+	BOOT_OUTPUT = image.boot
+	POST_OUTPUT = $(ROOT_PATH)/uImage.bin
+	POSTBUILD = Makefile.uboot
+endif
+
 BFD_NAME = elf32-littlearm
 BFD_OUTPUT = $(BFD_NAME)
Index: boot/arch/arm32/_link.ld.in
===================================================================
--- boot/arch/arm32/_link.ld.in	(revision fc14438a8dd4f64269a9db0d8db45f35450495dd)
+++ boot/arch/arm32/_link.ld.in	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
@@ -1,11 +1,13 @@
+#include <arch/arch.h>
+
 ENTRY(start)
 
 SECTIONS {
-	. = 0x0000;
+	. = BOOT_BASE;
 	.text : {
 		*(BOOTSTRAP);
 		*(.text);
 	}
-	. = 0x8000;
+	. = BOOT_BASE + 0x8000;
 	.data : {
 		*(BOOTPT);      /* bootstrap page table */
Index: boot/arch/arm32/include/arch.h
===================================================================
--- boot/arch/arm32/include/arch.h	(revision fc14438a8dd4f64269a9db0d8db45f35450495dd)
+++ boot/arch/arm32/include/arch.h	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
@@ -36,5 +36,15 @@
 #define PTL0_ENTRY_SIZE  4
 
-#define BOOT_OFFSET  0xa00000
+/*
+ * Address where the boot stage image starts (beginning of usable physical
+ * memory).
+ */
+#ifdef MACHINE_gta02
+#define BOOT_BASE	0x30008000
+#else
+#define BOOT_BASE	0x00000000
+#endif
+
+#define BOOT_OFFSET	(BOOT_BASE + 0xa00000)
 
 #ifndef __ASM__
Index: boot/arch/arm32/include/main.h
===================================================================
--- boot/arch/arm32/include/main.h	(revision fc14438a8dd4f64269a9db0d8db45f35450495dd)
+++ boot/arch/arm32/include/main.h	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
@@ -1,4 +1,5 @@
 /*
  * Copyright (c) 2007 Michal Kebrt
+ * Copyright (c) 2010 Jiri Svoboda
  * All rights reserved.
  *
@@ -38,11 +39,21 @@
 
 /** Address where characters to be printed are expected. */
-#ifdef MACHINE_testarm
-	#define VIDEORAM_ADDRESS  0x10000000
-#endif
 
-#ifdef MACHINE_integratorcp
-	#define VIDEORAM_ADDRESS  0x16000000
-#endif
+/** GTA02 serial console UART register addresses.
+ *
+ * This is UART channel 2 of the S3C24xx CPU
+ */
+#define GTA02_SCONS_UTRSTAT	0x50008010
+#define GTA02_SCONS_UTXH	0x50008020
+
+/* Bits in UTXH register */
+#define S3C24XX_UTXH_TX_EMPTY	0x00000004
+
+
+/** GXemul testarm serial console output register */
+#define TESTARM_SCONS_ADDR 	0x10000000
+
+/** IntegratorCP serial console output register */
+#define ICP_SCONS_ADDR 		0x16000000
 
 extern void bootstrap(void);
Index: boot/arch/arm32/src/putchar.c
===================================================================
--- boot/arch/arm32/src/putchar.c	(revision fc14438a8dd4f64269a9db0d8db45f35450495dd)
+++ boot/arch/arm32/src/putchar.c	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
@@ -2,4 +2,5 @@
  * Copyright (c) 2007 Michal Kebrt
  * Copyright (c) 2009 Vineeth Pillai
+ * Copyright (c) 2010 Jiri Svoboda
  * All rights reserved.
  *
@@ -40,13 +41,84 @@
 #include <str.h>
 
+#ifdef MACHINE_gta02
+
+/** Send a byte to the gta02 serial console.
+ *
+ * @param byte		Byte to send.
+ */
+static void scons_sendb_gta02(uint8_t byte)
+{
+	volatile uint32_t *utrstat;
+	volatile uint32_t *utxh;
+
+	utrstat = (volatile uint32_t *) GTA02_SCONS_UTRSTAT;
+	utxh    = (volatile uint32_t *) GTA02_SCONS_UTXH;
+
+	/* Wait until transmitter is empty. */
+	while ((*utrstat & S3C24XX_UTXH_TX_EMPTY) == 0)
+		;
+
+	/* Transmit byte. */
+	*utxh = (uint32_t) byte;
+}
+
+#endif
+
+#ifdef MACHINE_testarm
+
+/** Send a byte to the GXemul testarm serial console.
+ *
+ * @param byte		Byte to send.
+ */
+static void scons_sendb_testarm(uint8_t byte)
+{
+	*((volatile uint8_t *) TESTARM_SCONS_ADDR) = byte;
+}
+
+#endif
+
+#ifdef MACHINE_integratorcp
+
+/** Send a byte to the IntegratorCP serial console.
+ *
+ * @param byte		Byte to send.
+ */
+static void scons_sendb_icp(uint8_t byte)
+{
+	*((volatile uint8_t *) ICP_SCONS_ADDR) = byte;
+}
+
+#endif
+
+/** Send a byte to the serial console.
+ *
+ * @param byte		Byte to send.
+ */
+static void scons_sendb(uint8_t byte)
+{
+#ifdef MACHINE_gta02
+	scons_sendb_gta02(byte);
+#endif
+#ifdef MACHINE_testarm
+	scons_sendb_testarm(byte);
+#endif
+#ifdef MACHINE_integratorcp
+	scons_sendb_icp(byte);
+#endif
+}
+
+/** Display a character
+ *
+ * @param ch	Character to display
+ */
 void putchar(const wchar_t ch)
 {
 	if (ch == '\n')
-		*((volatile char *) VIDEORAM_ADDRESS) = '\r';
-	
+		scons_sendb('\r');
+
 	if (ascii_check(ch))
-		*((volatile char *) VIDEORAM_ADDRESS) = ch;
+		scons_sendb((uint8_t) ch);
 	else
-		*((volatile char *) VIDEORAM_ADDRESS) = U_SPECIAL;
+		scons_sendb(U_SPECIAL);
 }
 
