On 9 December 2011 05:27, Christoffer Dall <c.dall at virtualopensystems.com> wrote: > ?%: force > + ? ? ? $(warning ehehehehh $@) > ? ? ? ?$(MAKE) -C $(KERNEL_SRC) $@ Stray debug tracing? > diff --git a/boot.S b/boot.S > index e1c8d78..d1c766d 100644 > --- a/boot.S > +++ b/boot.S > @@ -142,30 +142,8 @@ 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) > - > -#ifdef USE_INITRD > - ? ? ? .asciz ?"console=ttyAMA0 mem=512M mem=512M at 0x880000000 earlyprintk ip=192.168.27.200::192.168.27.1:255.255.255.0:angstrom:eth0:off" > -#else /* VEXPRESS && !USE_INITRD */ > - ? ? ? .asciz ?"console=ttyAMA0 mem=512M mem=512M at 0x880000000 earlyprintk root=/dev/nfs nfsroot=192.168.27.93:/srv/nfs_root,tcp rw ip=dhcp nfsrootdebug" > -#endif > - > -#else /* ! VEXPRESS && ! MACH_MPS */ > - > -#ifdef USE_INITRD > - ? ? ? .asciz ?"console=ttyAMA0 mem=256M earlyprintk" > -#else > - ? ? ? .asciz ?"root=/dev/nfs nfsroot=10.1.77.43:/work/debootstrap/arm ip=dhcp console=ttyAMA0 mem=256M earlyprintk" > -#endif > - > -#endif > -#endif > + ? ? ? ?/* Use the C-define for the kernel boot command */ > + ? ? ? .ascii ?KCMD > ? ? ? ?.align ?2 > ?1: This is an unrelated change, really. > +USE_INITRD ?= no > +ifeq ($(USE_INITRD),yes) > +CPPFLAGS ? ? ? += -DUSE_INITRD > +FILESYSTEM ? ? = filesystem.cpio.gz This should be a "?=", so you can set USE_INITRD and also override FILESYSTEM. > +# Default NFS root > +NFS_ROOT ? ? ? ?= /srv/nfsroot > +NFS_SERVER ? ? ?= $(shell ./get_ip.sh) > --- /dev/null > +++ b/get_ip.sh > @@ -0,0 +1,7 @@ > +#/bin/bash > + > +ifconfig | \ > + ? ? ? grep 'inet addr:'| \ > + ? ? ? grep -v '127.0.0.1' | \ > + ? ? ? cut -d: -f2 | \ > + ? ? ? awk '{ print $1}' This doesn't work on systems with more than one non-loopback network interface (it prints the IP addresses for all of them). How about this instead? # there's no shorthand := equivalent of ?= and we don't want # to run the shell every time we use the variable ifeq ($(origin NFS_SERVER), undefined) NFS_SERVER := $(shell ip addr show scope global | sed -ne '/inet/{s/ *inet \([^/]*\)\/.*/\1/p;q}') endif (also saves having to have an external script) -- PMM