Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel' into ide
[palacios.git] / misc / test_vm / build / Makefile
index 381ef25..c38b9f4 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for GeekOS kernel, userspace, and tools
 # Copyright (c) 2004,2005 David H. Hovemeyer <daveho@cs.umd.edu>
-# $Revision: 1.1 $
+# $Revision: 1.2 $
 
 # This is free software.  You are permitted to use,
 # redistribute, and modify it as specified in the file "COPYING".
@@ -29,7 +29,6 @@
 #
 # The setup code needs to copy it up to this address and jump there
 #
-#KERNEL_BASE_ADDR := $(shell perl -e 'print sprintf("0x%x",$(TOP_OF_MEM)-4096*3-$(MAX_VMM));')
 KERNEL_BASE_ADDR := 0x100000
 
 # Kernel entry point function
@@ -39,14 +38,14 @@ KERNEL_ENTRY = $(SYM_PFX)Main
 PROJECT_ROOT := ..
 VPATH := $(PROJECT_ROOT)/src
 
-#when -DNDEBUG is set the kassert functions are disabled
-#JRLDEBUG=-DNDEBUG
-JRLDEBUG= -DSERIAL_PRINT_DEBUG=1 -DSERIAL_PRINT_DEBUG_LEVEL=1000 -DSERIAL_PRINT=1
 
-#
-#
-#Peter's compile flags
-PAD= 
+
+ifeq ($(SERIAL_DEBUG), 1)
+JRLDEBUG= -DDEBUG_SERIAL
+else 
+JRLDEBUG= 
+endif
+
 
 # Figure out if we're compiling with cygwin, http://cygwin.com
 SYSTEM_NAME := $(shell uname -s)
@@ -82,6 +81,8 @@ KERNEL_C_SRCS := idt.c int.c trap.c irq.c io.c \
        gdt.c tss.c segment.c \
        bget.c malloc.c \
        synch.c kthread.c \
+       vm_cons.c debug.c \
+       pci.c \
        serial.c  reboot.c \
         paging.c \
        main.c
@@ -123,10 +124,11 @@ COMMON_C_OBJS := $(COMMON_C_SRCS:%.c=common/%.o)
 
 # Uncomment if cross compiling
 #TARGET_CC_PREFIX := i386-elf-
+TARGET_CC_PREFIX :=  $(PROJECT_ROOT)/../../devtools/i386/bin/i386-elf-
 
 # Target C compiler.  gcc 2.95.2 or later should work.
 TARGET_CC := $(TARGET_CC_PREFIX)gcc
-#TARGET_CC := $(TARGET_CC_PREFIX)gcc34 -m32
+
 
 # Host C compiler.  This is used to compile programs to execute on
 # the host platform, not the target (x86) platform.  On x86/ELF
@@ -150,7 +152,7 @@ TARGET_NM := $(TARGET_CC_PREFIX)nm
 TARGET_OBJCOPY := $(TARGET_CC_PREFIX)objcopy
 
 # Nasm (http://nasm.sourceforge.net)
-NASM := $(PROJECT_ROOT)/../devtools/bin/nasm
+NASM := $(PROJECT_ROOT)/../../devtools/bin/nasm
 #NASM := /opt/vmm-tools/bin/nasm
 
 AS = as --32
@@ -177,7 +179,8 @@ NUMSECS := $(PERL) $(PROJECT_ROOT)/scripts/numsecs
 # ----------------------------------------------------------------------
 
 # Flags used for all C source files
-GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(JRLDEBUG) $(PADFLAGS)
+
+GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(JRLDEBUG)
 CC_GENERAL_OPTS := $(GENERAL_OPTS) -Werror 
 
 # Flags used for kernel C source files
@@ -232,17 +235,13 @@ fd.img : geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin
        cat geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin > $@
 
 
-# make ready to boot over PXE
-pxe:   fd.img
-       cp fd.img /tftpboot/vmm.img
-       $(PAD) /tftpboot/vmm.img 1474560
-
 
-vm:    geekos/kernel.bin
-       cp geekos/kernel.bin ../../vmm-hack1/build/vm_kernel
+guest-img: fd.img
+       cp fd.img guest.img
+       $(PAD) guest.img 1474560
 
-geekos/test: geekos/test.o
-       $(CC) geekos/test.o -o geekos/test
+guest-iso: guest-img
+       mkisofs -pad -b guest.img -R -o guest.iso guest.img