summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2010-03-25 15:41:36 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2010-03-25 15:41:36 +0000
commitda08d4b816cb1ae13a23e1f063178d1decf4a776 (patch)
tree508f20bd4fdc7126c94e4187fb7604ad77829c34
parent6440df235ea863e2cd15356809d744364a4940ce (diff)
Added support for MPS
-rw-r--r--Makefile10
-rw-r--r--boot.S16
-rw-r--r--model.lds.S4
3 files changed, 26 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8e4648b..e0416f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,14 @@
# Build an ELF linux+filesystem image
-CPPFLAGS += -DSMP
+#CPPFLAGS += -DSMP
#CPPFLAGS += -DUSE_INITRD
-#CPPFLAGS += -DTHUMB2_KERNEL
+CPPFLAGS += -DTHUMB2_KERNEL
+CPPFLAGS += -march=armv7-a
+
+# MPS (Cortex-M3) definitions
+#CPPFLAGS += -DMACH_MPS
+#CPPFLAGS += -march=armv7-m
+#CPPFLAGS += -mthumb -Wa,-mthumb -Wa,-mimplicit-it=always
BOOTLOADER = boot.S
KERNEL = uImage
diff --git a/boot.S b/boot.S
index a200bc5..4986262 100644
--- a/boot.S
+++ b/boot.S
@@ -17,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+ .syntax unified
.text
.globl _start
@@ -48,7 +49,12 @@ _start:
@
@ UART initialisation (38400 8N1)
@
-2: ldr r0, =0x10009000 @ UART base (RealView/EB)
+2:
+#ifdef MACH_MPS
+ ldr r0, =0x1f005000 @ UART base (MPS)
+#else
+ ldr r0, =0x10009000 @ UART base (RealView/EB)
+#endif
mov r1, #0x10 @ ibrd
str r1, [r0, #0x24]
mov r1, #0xc300
@@ -59,7 +65,11 @@ _start:
@ Kernel parameters
@
mov r0, #0
+#ifdef MACH_MPS
+ ldr r1, =10000 @ MPS (temporary)
+#else
ldr r1, =827 @ RealView/EB
+#endif
adr r2, atags
mov r3, #0
ldr lr, =kernel
@@ -77,7 +87,9 @@ atags:
@ ATAG_CMDLINE
.long (1f - .) >> 2
.long 0x54410009
-#ifdef USE_INITRD
+#ifdef MACH_MPS
+ .asciz "rdinit=/bin/sh console=ttyAMA3 mem=8M earlyprintk"
+#elif defined(USE_INITRD)
.asciz "console=ttyAMA0 mem=256M earlyprintk"
#else
.asciz "root=/dev/nfs nfsroot=10.1.68.81:/work2/debootstrap/arm ip=dhcp console=ttyAMA0 mem=256M earlyprintk"
diff --git a/model.lds.S b/model.lds.S
index 02fb8fc..1e1f63c 100644
--- a/model.lds.S
+++ b/model.lds.S
@@ -27,7 +27,11 @@ INPUT(./uImage)
INPUT(./filesystem.cpio.gz)
#endif
+#ifdef MACH_MPS
+PHYS_OFFSET = 0x10000000;
+#else
PHYS_OFFSET = 0x70000000;
+#endif
SECTIONS
{