diff options
author | Russ Cox <[email protected]> | 2011-01-11 13:27:45 -0500 |
---|---|---|
committer | Russ Cox <[email protected]> | 2011-01-11 13:27:45 -0500 |
commit | 89bfdd4db183cbe75a3a0c2254ca48a50e37276f (patch) | |
tree | 2c5148cda4d8a5aa29ce23003ccbb5d7283e1ff4 /Makefile | |
parent | af6a6a477531aefa6e961c464de495e0c09af673 (diff) | |
download | xv6-labs-89bfdd4db183cbe75a3a0c2254ca48a50e37276f.tar.gz xv6-labs-89bfdd4db183cbe75a3a0c2254ca48a50e37276f.tar.bz2 xv6-labs-89bfdd4db183cbe75a3a0c2254ca48a50e37276f.zip |
multiboot support and memory-only (no disk) kernel
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -82,6 +82,11 @@ xv6.img: bootblock kernel fs.img dd if=bootblock of=xv6.img conv=notrunc dd if=kernel of=xv6.img seek=1 conv=notrunc +xv6memfs.img: bootblock kernelmemfs + dd if=/dev/zero of=xv6memfs.img count=10000 + dd if=bootblock of=xv6memfs.img conv=notrunc + dd if=kernelmemfs of=xv6memfs.img seek=1 conv=notrunc + bootblock: bootasm.S bootmain.c $(CC) $(CFLAGS) -fno-pic -O -nostdinc -I. -c bootmain.c $(CC) $(CFLAGS) -fno-pic -nostdinc -I. -c bootasm.S @@ -102,11 +107,23 @@ initcode: initcode.S $(OBJCOPY) -S -O binary initcode.out initcode $(OBJDUMP) -S initcode.o > initcode.asm -kernel: $(OBJS) bootother initcode - $(LD) $(LDFLAGS) -Ttext 0x100000 -e main -o kernel $(OBJS) -b binary initcode bootother +kernel: $(OBJS) multiboot.o bootother initcode + $(LD) $(LDFLAGS) -Ttext 0x100000 -e main -o kernel multiboot.o $(OBJS) -b binary initcode bootother fs.img $(OBJDUMP) -S kernel > kernel.asm $(OBJDUMP) -t kernel | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernel.sym +# kernelmemfs is a copy of kernel that maintains the +# disk image in memory instead of writing to a disk. +# This is not so useful for testing persistent storage or +# exploring disk buffering implementations, but it is +# great for testing the kernel on real hardware without +# needing a scratch disk. +MEMFSOBJS = $(filter-out ide.o,$(OBJS)) memide.o +kernelmemfs: $(MEMFSOBJS) multiboot.o bootother initcode fs.img + $(LD) $(LDFLAGS) -Ttext 0x100000 -e main -o kernelmemfs multiboot.o $(MEMFSOBJS) -b binary initcode bootother fs.img + $(OBJDUMP) -S kernelmemfs > kernelmemfs.asm + $(OBJDUMP) -t kernelmemfs | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernelmemfs.sym + tags: $(OBJS) bootother.S _init etags *.S *.c @@ -187,6 +204,9 @@ QEMUOPTS = -hdb fs.img xv6.img -smp $(CPUS) qemu: fs.img xv6.img $(QEMU) -serial mon:stdio $(QEMUOPTS) +qemu-memfs: xv6memfs.img + $(QEMU) xv6memfs.img -smp $(CPUS) + qemu-nox: fs.img xv6.img $(QEMU) -nographic $(QEMUOPTS) |