diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-12-05 17:47:42 +0000 |
---|---|---|
committer | Christoffer Dall <cdall@cs.columbia.edu> | 2011-12-08 22:11:24 -0500 |
commit | 9f0bfe3851c3a72c137e7552d4972b941c5c12aa (patch) | |
tree | 14ac10c8c660d397585fd1f9b619f667ed3e359f | |
parent | 9586ab48898bbce3b9b84b661de5ea501527307b (diff) |
Makefile, boot.S: Allow kernel command line to be set in makefile
Allow the kernel command line to be set in the makefile rather
than forcing the user to edit boot.S every time.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | boot.S | 5 |
2 files changed, 18 insertions, 1 deletions
@@ -24,6 +24,18 @@ endif #CPPFLAGS += -march=armv7-m #CPPFLAGS += -mthumb -Wa,-mthumb -Wa,-mimplicit-it=always +# Kernel command line +# MPS: +# KCMD = "rdinit=/bin/sh console=ttyAMA3 mem=4M earlyprintk" +# not-vexpress (ie EB, RealviewPB, etc), with initrd +# KCMD = "console=ttyAMA0 mem=256M earlyprintk" +# not-vexpress, without initrd: +# KCMD = "root=/dev/nfs nfsroot=10.1.77.43:/work/debootstrap/arm ip=dhcp console=ttyAMA0 mem=256M earlyprintk" +# Vexpress, with initrd: +# KCMD = "console=ttyAMA0 mem=512M mem=512M@0x880000000 earlyprintk ip=192.168.27.200::192.168.27.1:255.255.255.0:angstrom:eth0:off" +# VExpress, without initrd: +KCMD ?= "console=ttyAMA0 mem=512M mem=512M@0x880000000 earlyprintk root=/dev/nfs nfsroot=172.31.252.250:/srv/arm-oneiric-root,tcp rw ip=dhcp nfsrootdebug" + MONITOR = monitor.S BOOTLOADER = boot.S KERNEL_SRC = ../linux-kvm-arm @@ -54,7 +66,7 @@ $(IMAGE): boot.o monitor.o model.lds $(KERNEL) $(FILESYSTEM) Makefile $(LD) -o $@ --script=model.lds boot.o: $(BOOTLOADER) - $(CC) $(CPPFLAGS) -c -o $@ $< + $(CC) $(CPPFLAGS) -DKCMD='$(KCMD)' -c -o $@ $< monitor.o: $(MONITOR) $(CC) $(CPPFLAGS) -c -o $@ $< @@ -142,6 +142,10 @@ atags: @ ATAG_CMDLINE .long (1f - .) >> 2 .long 0x54410009 +#ifdef KCMD + /* User-specified command line always overrides */ + .asciz KCMD +#else #ifdef MACH_MPS .asciz "rdinit=/bin/sh console=ttyAMA3 mem=4M earlyprintk" #elif defined(VEXPRESS) @@ -161,6 +165,7 @@ atags: #endif #endif +#endif .align 2 1: |