ia64/xen-unstable

changeset 793:04ff2912ebc2

bitkeeper revision 1.484 (3f81a9e9NHEXcbdhSQY4okBiJfC9XA)

mini-os Makefile improvements
author iap10@labyrinth.cl.cam.ac.uk
date Mon Oct 06 17:44:09 2003 +0000 (2003-10-06)
parents 34473973889b
children 3a4eb84cc402
files .bk-to-hg .hg-to-bk .rootkeys extras/mini-os/Makefile
line diff
     1.1 --- a/.bk-to-hg	Mon Oct 06 17:18:26 2003 +0000
     1.2 +++ b/.bk-to-hg	Mon Oct 06 17:44:09 2003 +0000
     1.3 @@ -1,13 +1,5 @@
     1.4  #!/bin/sh -x
     1.5  set -e
     1.6 -test -L extras/mini-os/h/hypervisor-ifs/block.h
     1.7 -rm      extras/mini-os/h/hypervisor-ifs/block.h
     1.8 -test -L extras/mini-os/h/hypervisor-ifs/hypervisor-if.h
     1.9 -rm      extras/mini-os/h/hypervisor-ifs/hypervisor-if.h
    1.10 -test -L extras/mini-os/h/hypervisor-ifs/kbd.h
    1.11 -rm      extras/mini-os/h/hypervisor-ifs/kbd.h
    1.12 -test -L extras/mini-os/h/hypervisor-ifs/network.h
    1.13 -rm      extras/mini-os/h/hypervisor-ifs/network.h
    1.14  test -L xenolinux-sparse
    1.15  rm      xenolinux-sparse
    1.16  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
     2.1 --- a/.hg-to-bk	Mon Oct 06 17:18:26 2003 +0000
     2.2 +++ b/.hg-to-bk	Mon Oct 06 17:44:09 2003 +0000
     2.3 @@ -1,13 +1,5 @@
     2.4  #!/bin/sh -x
     2.5  set -e
     2.6 -mkdir -p extras
     2.7 -mkdir -p extras/mini-os
     2.8 -mkdir -p extras/mini-os/h
     2.9 -mkdir -p extras/mini-os/h/hypervisor-ifs
    2.10 -ln -s ../../../xen/include/hypervisor-ifs/block.h extras/mini-os/h/hypervisor-ifs/block.h
    2.11 -ln -s ../../../xen/include/hypervisor-ifs/hypervisor-if.h extras/mini-os/h/hypervisor-ifs/hypervisor-if.h
    2.12 -ln -s ../../../xen/include/hypervisor-ifs/kbd.h extras/mini-os/h/hypervisor-ifs/kbd.h
    2.13 -ln -s ../../../xen/include/hypervisor-ifs/network.h extras/mini-os/h/hypervisor-ifs/network.h
    2.14  ln -s xenolinux-2.4.22-sparse xenolinux-sparse
    2.15  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
    2.16  exit 0
     3.1 --- a/.rootkeys	Mon Oct 06 17:18:26 2003 +0000
     3.2 +++ b/.rootkeys	Mon Oct 06 17:44:09 2003 +0000
     3.3 @@ -11,10 +11,6 @@ 3f815144zTnCV5591ulIJQrpe5b-5Q extras/mi
     3.4  3f815144wiiDekmfMl9LIPIvhR83Uw extras/mini-os/entry.S
     3.5  3f815144r7AHj8GPvc3Nl1L9OSsWIg extras/mini-os/events.c
     3.6  3f815144h-Chna6E38yo40jqU95G1Q extras/mini-os/h/events.h
     3.7 -3f815144oqr2OlUDzE2GfkKX5Hcxqg extras/mini-os/h/hypervisor-ifs/block.h
     3.8 -3f8151443nGXvfUTFG67VXOIH8P4lg extras/mini-os/h/hypervisor-ifs/hypervisor-if.h
     3.9 -3f81514417ZlYqiRdM_AHPy7G11htA extras/mini-os/h/hypervisor-ifs/kbd.h
    3.10 -3f815144J3ZfU5am03Td7Wjfrz30qQ extras/mini-os/h/hypervisor-ifs/network.h
    3.11  3f8151445bYdgThGHQPeOW49PsrJ_A extras/mini-os/h/hypervisor.h
    3.12  3f815144f2Vg3qb6tiwt2VZad-DWsg extras/mini-os/h/lib.h
    3.13  3f815144iqXtdYup_pyfPSmDZuvZcg extras/mini-os/h/list.h
     4.1 --- a/extras/mini-os/Makefile	Mon Oct 06 17:18:26 2003 +0000
     4.2 +++ b/extras/mini-os/Makefile	Mon Oct 06 17:44:09 2003 +0000
     4.3 @@ -5,7 +5,7 @@ LD := ld
     4.4  MONITOR_BASE := 0xE0100000
     4.5  CFLAGS  := -fno-builtin -O3 -Wall -Ih/
     4.6  
     4.7 -TARGET := image.final
     4.8 +TARGET := mini-os
     4.9  
    4.10  LOBJS:= lib/malloc.o lib/math.o lib/printf.o lib/string.o 
    4.11  OBJS := entry.o kernel.o traps.o hypervisor.o mm.o events.o time.o ${LOBJS}
    4.12 @@ -15,22 +15,26 @@ HDRS :=  h/os.h h/types.h h/hypervisor.h
    4.13  
    4.14  default: $(TARGET)
    4.15  
    4.16 -$(TARGET): head.o $(OBJS)
    4.17 +hypervisor-ifs:
    4.18 +	ln -sf ../../../xen/include/hypervisor-ifs h/hypervisor-ifs
    4.19 +
    4.20 +$(TARGET): hypervisor-ifs head.o $(OBJS)
    4.21  	# Image will load at 0xC0000000. First bytes from head.o
    4.22 -	#$(LD) -N -Ttext 0xC0000000 head.o $(OBJS) -o image.elf
    4.23 -	$(LD) -N -T vmlinux.lds head.o $(OBJS) -o image.elf
    4.24 +	#$(LD) -N -Ttext 0xC0000000 head.o $(OBJS) -o $@.elf
    4.25 +	$(LD) -N -T vmlinux.lds head.o $(OBJS) -o $@.elf
    4.26  	# Guest OS header -- first 8 bytes are identifier 'XenoGues'.
    4.27  	echo -e -n 'XenoGues' >$@ 
    4.28  	# Guest OS header -- next 4 bytes are load address (0xC0000000).
    4.29  	echo -e -n '\000\000\000\300' >>$@
    4.30  	# Create a raw bag of bytes from the ELF image.
    4.31 -	objcopy -O binary -R .note -R .comment image.elf image.raw
    4.32 +	objcopy -O binary -R .note -R .comment $@.elf $@.raw
    4.33  	# Guest OS header is immediately followed by raw OS image.
    4.34 -	cat image.raw >>$@
    4.35 -	#gzip -f -9 $@
    4.36 +	cat $@.raw >>$@
    4.37 +	gzip -f -9 -c $@ >$@.gz
    4.38  
    4.39  clean:
    4.40 -	rm -f *.o *~ core image.elf image.raw image.final image.final.gz
    4.41 +	find . -type f -name '*.o' | xargs rm -f
    4.42 +	rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
    4.43  
    4.44  %.o: %.c $(HDRS) Makefile
    4.45  	$(CC) $(CFLAGS) -c $< -o $@