Subversion Repositories HelenOS-historic

Compare Revisions

No changes between revisions

Ignore whitespace Rev 375 → Rev 376

/SPARTAN/trunk/clean.ia32
0,0 → 1,5
#! /bin/sh
 
make dist-clean ARCH=ia32
 
rm arch/ia32/_link.ld
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/Makefile.config
0,0 → 1,42
#ARCH=ia32
#ARCH=mips32
#ARCH=ia64
#ARCH=ppc32
#ARCH=amd64
 
# If this is yes, then cross compiler will be used instead of host compiler
CROSS_COMPILER=no
 
# Support for symetric multiprocessors
SMP=__SMP__
 
# Improved support for hyperthreading
HT=__HT__
 
# General debuging and assert checking disable
#NDEBUG=__NDEBUG__
 
# Deadlock detection support for spinlocks.
DEBUG_SPINLOCK=DEBUG_SPINLOCK
 
# Uncomment if you want to compile in userspace support
#USERSPACE=__USERSPACE__
 
# Uncomment if you want to run in the test mode
#TEST=__TEST__
 
TEST_FILE=test.c
 
# Select what test do you want to run
#TEST_DIR=synch/rwlock1/
#TEST_DIR=synch/rwlock2/
#TEST_DIR=synch/rwlock3/
#TEST_DIR=synch/rwlock4/
#TEST_DIR=synch/rwlock5/
#TEST_DIR=synch/semaphore1/
#TEST_DIR=synch/semaphore2/
#TEST_DIR=fpu/fpu1/
#TEST_DIR=fpu/sse1/
#TEST_DIR=fpu/mips1/
#TEST_DIR=print/print1/
#TEST_DIR=thread/thread1/
/SPARTAN/trunk/clean.ia64
0,0 → 1,3
#! /bin/sh
 
make dist-clean ARCH=ia64
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/build.ppc32
0,0 → 1,3
#! /bin/sh
 
make all ARCH=ppc32
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/src/clean.ia64
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/clean.amd64
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/clean.mips32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/clean.ppc32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/build.ia32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/build.ia64
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/build.amd64
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/build.mips32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/Makefile.config
File deleted
/SPARTAN/trunk/src/build.ppc32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/clean.ia32
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/SPARTAN/trunk/src/Makefile
File deleted
/SPARTAN/trunk/clean.amd64
0,0 → 1,9
#! /bin/sh
 
make dist-clean ARCH=amd64
make dist-clean ARCH=ia32
 
find arch/amd64 -type l | xargs rm
rm arch/amd64/include/context_offset.h
rm arch/amd64/_link.ld
rm tools/amd64/gencontext
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/build.ia32
0,0 → 1,10
#! /bin/sh
 
COMPILER=""
 
if [ $1 == "cross" ];
then
COMPILER="CROSS_COMPILER=yes";
fi;
 
make all ARCH=ia32 $COMPILER
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/clean.mips32
0,0 → 1,7
#! /bin/sh
 
make dist-clean ARCH=mips32
 
rm tools/mips32/gencontext
rm arch/mips32/include/context_offset.h
rm arch/mips32/_link.ld
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/contrib/conf/SPMIPS.simics
3,7 → 3,7
add-directory ../../import/mips
read-configuration spmips.conf
 
set-pc (cpu0.load-binary ../../../SPARTAN/src/kernel.bin)
set-pc (cpu0.load-binary ../../../SPARTAN/kernel.bin)
 
# Setup uart to use 8 bits
@conf.tty0.lcr = 0xf;
/SPARTAN/trunk/contrib/conf/dot.bochsrc
130,7 → 130,7
# drive letters such as a: or b: as the path. Raw floppy access is not
# supported on Windows 95 and 98.
#=======================================================================
floppya: 1_44=SPARTAN/src/image.bin, status=inserted
floppya: 1_44=SPARTAN/image.bin, status=inserted
#floppya: 1_44=/dev/fd0, status=inserted
 
#=======================================================================
/SPARTAN/trunk/contrib/conf/ski.conf
1,2 → 1,2
load SPARTAN/src/kernel.bin
load SPARTAN/src/load.bin
load SPARTAN/kernel.bin
load SPARTAN/load.bin
/SPARTAN/trunk/build.ia64
0,0 → 1,3
#! /bin/sh
 
make all ARCH=ia64
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/clean.ppc32
0,0 → 1,3
#! /bin/sh
 
make dist-clean ARCH=ppc32
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/build.amd64
0,0 → 1,26
#! /bin/sh
 
set -e
# Generate context_offset.h
(cd tools/amd64/;make gencontext;./gencontext)
# Create links to ia32 architecture
 
(
set -e
cd arch
for a in drivers bios fmath.c mm/frame.c mm/tlb.c mm/memory_init.c boot/memmap.S smp/apic.c smp/ipi.c smp/mps.c smp/smp.c acpi; do
if [ \! -e amd64/src/$a ]; then
echo ln -sf `pwd`/ia32/src/$a amd64/src/$a
ln -sf `pwd`/ia32/src/$a amd64/src/$a
fi
done
 
for a in atomic.h ega.h fpu_context.h i8042.h i8259.h i8254.h interrupt.h bios mm/memory_init.h boot/memmap.h boot/memmapasm.h smp acpi barrier.h; do
if [ \! -e amd64/include/$a ]; then
echo ln -sf `pwd`/ia32/include/$a amd64/include/$a
ln -sf `pwd`/ia32/include/$a amd64/include/$a
fi
done
)
make dist-clean ARCH=ia32
make all ARCH=amd64
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/build.mips32
0,0 → 1,13
#! /bin/sh
 
if [ -z "$1" ]; then
echo "Usage: $0 [msim|msim4kc|simics|lgxemul|bgxemul|indy]"
exit 1
else
MACHINE=$1
fi
 
# Generate context_offset.h
(cd tools/mips32/;make gencontext;./gencontext)
 
make all ARCH=mips32 MACHINE=$MACHINE
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/SPARTAN/trunk/Makefile
0,0 → 1,105
include Makefile.config
include arch/$(ARCH)/Makefile.inc
 
sources=src/cpu/cpu.c \
src/main/main.c \
src/main/kinit.c \
src/main/uinit.c \
src/proc/scheduler.c \
src/proc/thread.c \
src/proc/task.c \
src/proc/the.c \
src/mm/heap.c \
src/mm/frame.c \
src/mm/page.c \
src/mm/tlb.c \
src/mm/vm.c \
src/lib/func.c \
src/lib/list.c \
src/lib/memstr.c \
src/lib/sort.c \
src/debug/print.c \
src/debug/symtab.c \
src/time/clock.c \
src/time/timeout.c \
src/time/delay.c \
src/preempt/preemption.c \
src/synch/spinlock.c \
src/synch/condvar.c \
src/synch/rwlock.c \
src/synch/mutex.c \
src/synch/semaphore.c \
src/synch/waitq.c \
src/smp/ipi.c \
src/fb/font-8x16.c
 
# CFLAGS options same for all targets
CFLAGS+=-nostdinc -Iinclude/ -Werror-implicit-function-declaration -Wmissing-prototypes -Werror
 
ifdef DEBUG_SPINLOCK
CFLAGS+=-D$(DEBUG_SPINLOCK)
endif
 
ifdef USERSPACE
CFLAGS+=-D$(USERSPACE)
endif
 
ifdef TEST
test_objects:=$(addsuffix .o,$(basename test/$(TEST_DIR)/$(TEST_FILE)))
CFLAGS+=-D$(TEST)
endif
arch_objects:=$(addsuffix .o,$(basename $(arch_sources)))
objects:=$(addsuffix .o,$(basename $(sources)))
 
.PHONY : all config depend build clean dist-clean boot
 
all: dist-clean config depend build
 
-include Makefile.depend
 
config:
find src/ include/ -name arch -type l -exec rm \{\} \;
ln -s ../arch/$(ARCH)/src/ src/arch
ln -s ../arch/$(ARCH)/include/ include/arch
 
depend:
$(CC) $(CFLAGS) -M $(arch_sources) $(sources) >Makefile.depend
 
build: kernel.bin boot
 
clean:
find src/ arch/$(ARCH)/src/ test/ -name '*.o' -exec rm \{\} \;
-rm *.bin kernel.map kernel.map.pre kernel.objdump src/debug/real_map.bin
$(MAKE) -C arch/$(ARCH)/boot/ clean
 
dist-clean:
find src/ include/ -name arch -type l -exec rm \{\} \;
-rm Makefile.depend
-$(MAKE) clean
 
src/debug/real_map.bin: $(arch_objects) $(objects) $(test_objects) arch/$(ARCH)/_link.ld
$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab Makefile src/debug/empty_map.o
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(arch_objects) $(objects) $(test_objects) src/debug/empty_map.o -o $@ -Map kernel.map.pre
$(OBJDUMP) -t $(arch_objects) $(objects) $(test_objects) > kernel.objdump
tools/genmap.py kernel.map.pre kernel.objdump src/debug/real_map.bin
 
src/debug/real_map.o: src/debug/real_map.bin
$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) --prefix-sections=symtab $< $@
 
 
kernel.bin: $(arch_objects) $(objects) $(test_objects) arch/$(ARCH)/_link.ld src/debug/real_map.o
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(arch_objects) $(objects) $(test_objects) src/debug/real_map.o -o $@ -Map kernel.map
 
%.o: %.S
$(CC) $(ASFLAGS) $(CFLAGS) -c $< -o $@
 
%.o: %.s
$(AS) $(ASFLAGS) $< -o $@
 
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
 
KS=`cat kernel.bin | wc -c`
 
boot:
$(MAKE) -C arch/$(ARCH)/boot build KERNEL_SIZE=$(KS)
/SPARTAN/trunk/arch/ia64/boot/Makefile
6,7 → 6,7
nothing:
 
build: boot.bin
cp boot.bin ../../../src/load.bin
cp boot.bin ../../../load.bin
 
AS=$(IA-64_BINUTILS_DIR)/$(IA-64_TARGET)-as
LD=$(IA-64_BINUTILS_DIR)/$(IA-64_TARGET)-ld
/SPARTAN/trunk/arch/ia64/Makefile.inc
21,16 → 21,16
 
 
arch_sources= \
arch/start.S \
arch/asm.S \
arch/dummy.s \
arch/putchar.c \
arch/ia64.c \
arch/fpu_context.c \
arch/context.S \
arch/ski/ski.c \
arch/cpu/cpu.c \
arch/ivt.S \
arch/interrupt_handler.c \
arch/fmath.c \
arch/mm/frame.c
src/arch/start.S \
src/arch/asm.S \
src/arch/dummy.s \
src/arch/putchar.c \
src/arch/ia64.c \
src/arch/fpu_context.c \
src/arch/context.S \
src/arch/ski/ski.c \
src/arch/cpu/cpu.c \
src/arch/ivt.S \
src/arch/interrupt_handler.c \
src/arch/fmath.c \
src/arch/mm/frame.c
/SPARTAN/trunk/arch/ppc32/boot/Makefile
6,7 → 6,7
nothing:
 
build: boot.bin
cp boot.bin ../../../src/load.bin
cp boot.bin ../../../load.bin
 
CC=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-gcc
AS=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-as
/SPARTAN/trunk/arch/ppc32/Makefile.inc
18,16 → 18,16
LFLAGS=-M -no-check-sections -N
 
arch_sources= \
arch/context.S \
arch/debug/panic.s \
arch/fpu_context.c \
arch/ppc32.c \
arch/dummy.s \
arch/start.S \
arch/asm.S \
arch/cpu/cpu.c \
arch/mm/frame.c \
arch/mm/memory_init.c \
arch/mm/page.c \
arch/drivers/ofw.c \
arch/fmath.c
src/arch/context.S \
src/arch/debug/panic.s \
src/arch/fpu_context.c \
src/arch/ppc32.c \
src/arch/dummy.s \
src/arch/start.S \
src/arch/asm.S \
src/arch/cpu/cpu.c \
src/arch/mm/frame.c \
src/arch/mm/memory_init.c \
src/arch/mm/page.c \
src/arch/drivers/ofw.c \
src/arch/fmath.c
/SPARTAN/trunk/arch/amd64/boot/Makefile
3,9 → 3,9
nothing:
 
build: boot.bin
dd if=boot.bin of=../../../src/image.bin bs=512 conv=sync
-cat ../../../src/kernel.bin >>../../../src/image.bin
dd if=/dev/zero of=../../../src/image.bin bs=1 seek=1474559 count=1
dd if=boot.bin of=../../../image.bin bs=512 conv=sync
-cat ../../../kernel.bin >>../../../image.bin
dd if=/dev/zero of=../../../image.bin bs=1 seek=1474559 count=1
 
boot.bin: boot.o
ld -T boot.ld -entry _start_0x7c00 --oformat binary boot.o -o $@
/SPARTAN/trunk/arch/amd64/Makefile.inc
24,40 → 24,41
CFLAGS=$(DEFS) -nostdlib -fno-builtin -fno-unwind-tables -O3 -march=opteron -m64 -mcmodel=kernel -mno-red-zone
LFLAGS=-M
 
../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
$(CC) $(CFLAGS) -C -E -x c $< | grep -v "^\#" > $@
 
arch_sources = arch/dummy.s \
arch/fpu_context.c \
arch/boot/boot.S \
arch/boot/memmap.S \
arch/pm.c \
arch/context.S \
arch/drivers/ega.c \
arch/drivers/i8042.c \
arch/drivers/i8254.c \
arch/drivers/i8259.c \
arch/supplib.c \
arch/delay.S \
arch/amd64.c \
arch/bios/bios.c \
arch/interrupt.c \
arch/mm/frame.c \
arch/mm/page.c \
arch/mm/tlb.c \
arch/asm_utils.S \
arch/fmath.c \
arch/mm/memory_init.c \
arch/cpu/cpu.c \
arch/proc/scheduler.c \
arch/userspace.c \
arch/acpi/acpi.c \
arch/acpi/madt.c
arch_sources = \
src/arch/dummy.s \
src/arch/fpu_context.c \
src/arch/boot/boot.S \
src/arch/boot/memmap.S \
src/arch/pm.c \
src/arch/context.S \
src/arch/drivers/ega.c \
src/arch/drivers/i8042.c \
src/arch/drivers/i8254.c \
src/arch/drivers/i8259.c \
src/arch/supplib.c \
src/arch/delay.S \
src/arch/amd64.c \
src/arch/bios/bios.c \
src/arch/interrupt.c \
src/arch/mm/frame.c \
src/arch/mm/page.c \
src/arch/mm/tlb.c \
src/arch/asm_utils.S \
src/arch/fmath.c \
src/arch/mm/memory_init.c \
src/arch/cpu/cpu.c \
src/arch/proc/scheduler.c \
src/arch/userspace.c \
src/arch/acpi/acpi.c \
src/arch/acpi/madt.c
 
ifdef SMP
arch_sources += arch/smp/ap.S \
arch/smp/apic.c \
arch/smp/ipi.c \
arch/smp/mps.c \
arch/smp/smp.c
arch_sources += src/arch/smp/ap.S \
src/arch/smp/apic.c \
src/arch/smp/ipi.c \
src/arch/smp/mps.c \
src/arch/smp/smp.c
endif
/SPARTAN/trunk/arch/mips32/boot/Makefile
6,7 → 6,7
nothing:
 
build: boot.bin
cp boot.bin ../../../src/load.bin
cp boot.bin ../../../load.bin
 
AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as
CC=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-gcc
/SPARTAN/trunk/arch/mips32/Makefile.inc
71,24 → 71,24
BFD_NAME=elf32-little
endif
 
../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
$(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
 
arch_sources= \
arch/start.S \
arch/context.S \
arch/panic.S \
arch/mips32.c \
arch/dummy.S \
arch/console.c \
arch/asm.S \
arch/exception.c \
arch/interrupt.c \
arch/cache.c \
arch/cpu/cpu.c \
arch/mm/frame.c \
arch/mm/page.c \
arch/mm/tlb.c \
arch/fpu_context.c \
arch/fmath.c \
arch/drivers/arc.c
src/arch/start.S \
src/arch/context.S \
src/arch/panic.S \
src/arch/mips32.c \
src/arch/dummy.S \
src/arch/console.c \
src/arch/asm.S \
src/arch/exception.c \
src/arch/interrupt.c \
src/arch/cache.c \
src/arch/cpu/cpu.c \
src/arch/mm/frame.c \
src/arch/mm/page.c \
src/arch/mm/tlb.c \
src/arch/fpu_context.c \
src/arch/fmath.c \
src/arch/drivers/arc.c
/SPARTAN/trunk/arch/ia32/boot/Makefile
3,9 → 3,9
nothing:
 
build: boot.bin
dd if=boot.bin of=../../../src/image.bin bs=512 conv=sync
-cat ../../../src/kernel.bin >>../../../src/image.bin
dd if=/dev/zero of=../../../src/image.bin bs=1 seek=1474559 count=1
dd if=boot.bin of=../../../image.bin bs=512 conv=sync
-cat ../../../kernel.bin >>../../../image.bin
dd if=/dev/zero of=../../../image.bin bs=1 seek=1474559 count=1
 
boot.bin: boot.o
ld -T boot.ld -entry _start_0x7c00 --oformat binary boot.o -o $@
/SPARTAN/trunk/arch/ia32/Makefile.inc
30,43 → 30,43
DEFS+=-D$(HT)
endif
 
CPPFLAGS=$(DEFS) -nostdinc -I../include
CPPFLAGS=$(DEFS) -nostdinc -Iinclude/
CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -fomit-frame-pointer -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3
LFLAGS=-M
 
../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in
$(CC) $(CFLAGS) -E -x c $< | grep -v "^\#" > $@
 
arch_sources= \
arch/context.s \
arch/debug/panic.s \
arch/cpuid.s \
arch/delay.s \
arch/asm.S \
arch/proc/scheduler.c \
arch/acpi/acpi.c \
arch/acpi/madt.c \
arch/bios/bios.c \
arch/smp/ap.S \
arch/smp/apic.c \
arch/smp/mps.c \
arch/smp/smp.c \
arch/atomic.S \
arch/smp/ipi.c \
arch/ia32.c \
arch/interrupt.c \
arch/pm.c \
arch/userspace.c \
arch/cpu/cpu.c \
arch/mm/frame.c \
arch/mm/memory_init.c \
arch/mm/page.c \
arch/mm/tlb.c \
arch/drivers/i8042.c \
arch/drivers/i8254.c \
arch/drivers/i8259.c \
arch/drivers/ega.c \
arch/boot/boot.S \
arch/boot/memmap.S\
arch/fpu_context.c\
arch/fmath.c
src/arch/context.s \
src/arch/debug/panic.s \
src/arch/cpuid.s \
src/arch/delay.s \
src/arch/asm.S \
src/arch/proc/scheduler.c \
src/arch/acpi/acpi.c \
src/arch/acpi/madt.c \
src/arch/bios/bios.c \
src/arch/smp/ap.S \
src/arch/smp/apic.c \
src/arch/smp/mps.c \
src/arch/smp/smp.c \
src/arch/atomic.S \
src/arch/smp/ipi.c \
src/arch/ia32.c \
src/arch/interrupt.c \
src/arch/pm.c \
src/arch/userspace.c \
src/arch/cpu/cpu.c \
src/arch/mm/frame.c \
src/arch/mm/memory_init.c \
src/arch/mm/page.c \
src/arch/mm/tlb.c \
src/arch/drivers/i8042.c \
src/arch/drivers/i8254.c \
src/arch/drivers/i8259.c \
src/arch/drivers/ega.c \
src/arch/boot/boot.S \
src/arch/boot/memmap.S\
src/arch/fpu_context.c\
src/arch/fmath.c