X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fbuild%2FMakefile;h=87bc7dfeb9aefc94b97ab8e7d9fcd1297169a684;hb=19963ec00c85aea5e9f3511101b7b3312708500d;hp=541221d5a6b50bf7655a598df7795cdf0cfac514;hpb=b6c7009abd8e269d9860eb21f4aaba385ed78276;p=palacios.git diff --git a/palacios/build/Makefile b/palacios/build/Makefile index 541221d..87bc7df 100644 --- a/palacios/build/Makefile +++ b/palacios/build/Makefile @@ -1,6 +1,6 @@ # Makefile for GeekOS kernel, userspace, and tools # Copyright (c) 2004,2005 David H. Hovemeyer -# $Revision: 1.4 $ +# $Revision: 1.6 $ # This is free software. You are permitted to use, # redistribute, and modify it as specified in the file "COPYING". @@ -31,7 +31,7 @@ VM_START := 0x0 # THE KERNEL, SETUP, BOOTPACKAGE MUST BE SMALLER THAN THIS # MUST BE INTEGRAL NUMBER OF PAGES # define -MAX_VMM := 0x60000 +MAX_VMM := 0x160000 # Base address of kernel # @@ -85,7 +85,7 @@ VMM_SIZES = ../include/geekos/vmm_sizes.h # List of targets to build by default. # These targets encompass everything needed to boot # and run GeekOS. -ALL_TARGETS := fd.img rombios vgabios vmxassist +ALL_TARGETS := fd.img VM_linux_kernel # Kernel source files @@ -164,6 +164,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 := /opt/vmm-tools/bin/nasm AS = as --32 @@ -253,11 +254,10 @@ geekos/test: geekos/test.o geekos/vmcs.o geekos/vmx_lowlevel.o $(CC) geekos/test.o geekos/vmcs.o geekos/vmx_lowlevel.o -o geekos/test # Standard floppy image - just boots the kernel -fd.img : geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin rombios vgabios vmxassist +fd.img : geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin VM_linux_kernel cat geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin > _temp $(PAD) _temp 512 -# Note - second copy of rombios is intentional - cat _temp rombios vgabios vmxassist rombios > $@ + cat _temp VM_linux_kernel > $@ # make ready to boot over PXE pxe: fd.img @@ -282,14 +282,12 @@ pxe-discovery-bjp600: fd.img # Floppy boot sector (first stage boot loader). -geekos/fd_boot.bin : geekos/setup.bin geekos/kernel.bin $(PROJECT_ROOT)/src/geekos/fd_boot.asm rombios vgabios vmxassist +geekos/fd_boot.bin : geekos/setup.bin geekos/kernel.bin $(PROJECT_ROOT)/src/geekos/fd_boot.asm VM_linux_kernel $(NASM) -f bin \ -I$(PROJECT_ROOT)/src/geekos/ \ -DNUM_SETUP_SECTORS=`$(NUMSECS) geekos/setup.bin` \ -DNUM_KERN_SECTORS=`$(NUMSECS) geekos/kernel.bin` \ - -DNUM_BIOS_SECTORS=`$(NUMSECS) rombios` \ - -DNUM_VGA_BIOS_SECTORS=`$(NUMSECS) vgabios` \ - -DNUM_VMXASSIST_SECTORS=`$(NUMSECS) vmxassist` \ + -DNUM_VM_KERNEL_SECTORS=`$(NUMSECS) VM_linux_kernel` \ $(PROJECT_ROOT)/src/geekos/fd_boot.asm \ -o $@ @@ -320,20 +318,15 @@ generate_sizes: force echo "#ifndef __vmm_sizes" > $(VMM_SIZES) echo "#define __vmm_sizes" >> $(VMM_SIZES) echo "#define KERNEL_LOAD_ADDRESS " $(KERNEL_BASE_ADDR) >> $(VMM_SIZES) - echo "#define KERNEL_SETUP_LENGTH (" `$(NUMSECS) geekos/setup.bin` "*512)" >> $(VMM_SIZES) - echo "#define KERNEL_CORE_LENGTH (" `$(NUMSECS) geekos/kernel.bin` "*512)" >> $(VMM_SIZES) + echo "#define KERNEL_START (KERNEL_LOAD_ADDRESS)" >> $(VMM_SIZES) + echo "#define KERNEL_CORE_LENGTH (" `$(NUMSECS) geekos/kernel.bin` "*512)" >> $(VMM_SIZES) echo "#define KERNEL_END (KERNEL_LOAD_ADDRESS+KERNEL_CORE_LENGTH-1)" >> $(VMM_SIZES) - echo "#define BIOS_LENGTH (" `$(NUMSECS) rombios` "*512)" >> $(VMM_SIZES) - echo "#define VGA_BIOS_LENGTH (" `$(NUMSECS) vgabios` "*512)" >> $(VMM_SIZES) - echo "#define VMXASSIST_LENGTH (" `$(NUMSECS) vmxassist` "*512)" >> $(VMM_SIZES) - echo "#define BIOS_START (KERNEL_LOAD_ADDRESS+KERNEL_CORE_LENGTH)" >> $(VMM_SIZES) - echo "#define VGA_BIOS_START (BIOS_START+BIOS_LENGTH)" >> $(VMM_SIZES) - echo "#define VMXASSIST_START (VGA_BIOS_START+VGA_BIOS_LENGTH)" >> $(VMM_SIZES) - echo "//Note this is a second copy of the rom bios for debug" >> $(VMM_SIZES) - echo "#define BIOS2_START (VMXASSIST_START+VMXASSIST_LENGTH)" >> $(VMM_SIZES) - echo "#define VM_BOOT_PACKAGE_START (BIOS_START) " >> $(VMM_SIZES) - echo "#define VM_BOOT_PACKAGE_END (BIOS2_START+BIOS_LENGTH-1) " >> $(VMM_SIZES) + + echo "#define VM_KERNEL_LENGTH (" `$(NUMSECS) VM_linux_kernel` "*512)" >> $(VMM_SIZES) + echo "#define VM_KERNEL_START (KERNEL_LOAD_ADDRESS + KERNEL_CORE_LENGTH)" >> $(VMM_SIZES) + echo "#define VM_BOOT_PACKAGE_START (VM_KERNEL_START) " >> $(VMM_SIZES) + echo "#define VM_BOOT_PACKAGE_END (VM_KERNEL_START+VM_KERNEL_LENGTH-1) " >> $(VMM_SIZES) echo "#endif" >> $(VMM_SIZES) make_show_sizes: generate_sizes ../src/geekos/show_sizes.c @@ -349,31 +342,13 @@ get_kernel_size: make_show_sizes force: -rombios: force - (cd ../src/vmboot/rombios; make) - cp ../src/vmboot/rombios/BIOS-bochs-latest rombios - $(PAD) rombios 512 - @echo "Rom bios lives at f000:0000 and is" `$(NUMSECS) rombios` "sectors long" - - -vgabios: force - (cd ../src/vmboot/vgabios; make) - cp ../src/vmboot/vgabios/vgabios.bin vgabios - $(PAD) vgabios 512 - @echo "Vga bios lives at c000:0000 and is" `$(NUMSECS) vgabios` "sectors long" +VM_linux_kernel: force + $(PAD) VM_linux_kernel 512 + @echo "VM kernel lives at 0x100000 and is" `$(NUMSECS) VM_linux_kernel` "sectors long" -vmxassist: force - (cd ../src/vmboot/vmxassist; make) - cp ../src/vmboot/vmxassist/vmxassist.bin vmxassist - $(PAD) vmxassist 512 - @echo "vmxassist lives at d000:0000 and is" `$(NUMSECS) vmxassist` "sectors long" # Clean build directories of generated files clean : - rm -f rombios vgabios vmxassist - (cd ../src/vmboot/rombios; make clean) - (cd ../src/vmboot/vgabios; make clean) - (cd ../src/vmboot/vmxassist; make clean) for d in geekos common libc user tools; do \ (cd $$d && rm -f *); \ done