From 9c403f063823510017ceed6579900559456969d9 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Tue, 8 Dec 2009 18:05:18 +0000 Subject: Add some ifdefs in boot.S for easy changing between NFS and INITRD configurations. --- Makefile | 4 ++-- boot.S | 13 ++++++++++++- 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 -- cgit v1.2.3