summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-12-08 18:05:18 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2009-12-08 18:05:18 +0000
commit9c403f063823510017ceed6579900559456969d9 (patch)
tree659087b816b82c38bb042304b8b5d34cfbc18a28
parented347494514c314cb4efd12c245aa595303c7ae9 (diff)
Add some ifdefs in boot.S for easy changing between NFS and INITRD
configurations.
-rw-r--r--Makefile4
-rw-r--r--boot.S13
2 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1606f6a..4ba311b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ LD_SCRIPT = model.lds
CROSS_COMPILE = arm-none-linux-gnueabi-
-AS = $(CROSS_COMPILE)as
+CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
all: $(IMAGE)
@@ -21,4 +21,4 @@ $(IMAGE): boot.o $(LD_SCRIPT) $(KERNEL) $(FILESYSTEM)
$(LD) -o $@ --script=$(LD_SCRIPT)
boot.o: $(BOOTLOADER)
- $(AS) -o $@ $<
+ $(CC) -c -o $@ $<
diff --git a/boot.S b/boot.S
index 884e46b..a88d642 100644
--- a/boot.S
+++ b/boot.S
@@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define USE_INITRD
+#undef THUMB2_KERNEL
+
.text
.globl _start
@@ -61,7 +64,9 @@ _start:
adr r2, atags
mov r3, #0
ldr lr, =kernel
-@ orr lr, lr, #1 @ Thumb-2 kernel
+#ifdef THUMB2_KERNEL
+ orr lr, lr, #1 @ Thumb-2 kernel
+#endif
mov pc, lr @ jump to the kernel
.org 0x100
@@ -73,15 +78,21 @@ atags:
@ ATAG_CMDLINE
.long (1f - .) >> 2
.long 0x54410009
+#ifdef USE_INITRD
.asciz "console=ttyAMA0 mem=256M earlyprintk"
+#else
+ .asciz "root=/dev/nfs nfsroot=10.1.68.81:/work/nfsroot ip=dhcp console=ttyAMA0 mem=256M earlyprintk"
+#endif
.align 2
1:
+#ifdef USE_INITRD
@ ATAG_INITRD2
.long 4
.long 0x54420005
.long filesystem
.long fs_size
+#endif
@ ATAG_NONE
.long 0