Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1801 → Rev 1802

/trunk/kernel/tools/config.py
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/trunk/kernel/kernel.config
7,29 → 7,15
@ "mips32" MIPS 32-bit
@ "ppc32" PowerPC 32-bit
@ "ppc64" PowerPC 64-bit
@ "sparc64" Sun UltraSPARC
@ "sparc64" Sun UltraSPARC 64-bit
@ "xen32" Xen 32-bit
! ARCH (choice)
 
# IA32 Compiler
@ "cross" Cross-compiler
@ "native" Native
! [ARCH=ia32] IA32_COMPILER (choice)
% [ARCH=ia32] SAVEAS IA32_COMPILER COMPILER
 
# AMD64 Compiler
@ "cross" Cross-compiler
@ "native" Native
! [ARCH=amd64] AMD64_COMPILER (choice)
% [ARCH=amd64] SAVEAS AMD64_COMPILER COMPILER
 
# Compiler
@ "cross" Cross-compiler
@ "native" Native
! [(ARCH!=amd64)&(ARCH!=ia32)] OTHER_COMPILER (choice)
% [(ARCH!=amd64)&(ARCH!=ia32)] SAVEAS OTHER_COMPILER COMPILER
! COMPILER (choice)
 
 
# CPU type
@ "pentium4" Pentium 4
@ "pentium3" Pentium 3
36,21 → 22,24
@ "athlon-xp" Athlon XP
@ "athlon-mp" Athlon MP
@ "prescott" Prescott
! [ARCH=ia32|ARCH=xen32] IA32_CPU (choice)
! [ARCH=ia32|ARCH=xen32] MACHINE (choice)
 
# MIPS Machine type
# CPU type
@ "opteron" Opteron
! [ARCH=amd64] MACHINE (choice)
 
# Machine type
@ "msim" MSIM Simulator
@ "simics" Virtutech Simics simulator
@ "lgxemul" GXEmul Little Endian
@ "bgxemul" GXEmul Big Endian
@ "indy" SGI Indy
! [ARCH=mips32] MIPS_MACHINE (choice)
! [ARCH=mips32] MACHINE (choice)
 
# Framebuffer support
! [(ARCH=mips32&MIPS_MACHINE=lgxemul)|(ARCH=mips32&MIPS_MACHINE=bgxemul)|(ARCH=ia32)|(ARCH=amd64)|(ARCH=xen32)] CONFIG_FB (y/n)
! [(ARCH=mips32&MACHINE=lgxemul)|(ARCH=mips32&MACHINE=bgxemul)|(ARCH=ia32)|(ARCH=amd64)|(ARCH=xen32)] CONFIG_FB (y/n)
 
# Framebuffer width
@ "320"
@ "640"
@ "800"
@ "1024"
63,9 → 52,6
! [(ARCH=ia32|ARCH=amd64|ARCH=xen32)&CONFIG_FB=y] CONFIG_VESA_WIDTH (choice)
 
# Framebuffer height
@ "200"
@ "240"
@ "400"
@ "480"
@ "600"
@ "768"
84,8 → 70,6
@ "24"
! [(ARCH=ia32|ARCH=amd64|ARCH=xen32)&CONFIG_FB=y] CONFIG_VESA_BPP (choice)
 
 
 
# Support for SMP
! [ARCH=ia32|ARCH=amd64|ARCH=xen32] CONFIG_SMP (y/n)
 
96,7 → 80,7
! [(ARCH=ia32|ARCH=amd64|ARCH=xen32)&CONFIG_SMP=y] CONFIG_SIMICS_FIX (y/n)
 
# Lazy FPU context switching
! [(ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics)|ARCH=amd64|ARCH=ia32|ARCH=ia64|ARCH=xen32] CONFIG_FPU_LAZY (y/n)
! [(ARCH=mips32&MACHINE!=msim&MACHINE!=simics)|ARCH=amd64|ARCH=ia32|ARCH=ia64|ARCH=xen32] CONFIG_FPU_LAZY (y/n)
 
# Power off on halt
! [ARCH=ppc32] CONFIG_POWEROFF (n/y)
116,7 → 100,7
! [CONFIG_DEBUG=y&(ARCH=amd64|ARCH=mips32|ARCH=ia32|ARCH=xen32)] CONFIG_DEBUG_ALLREGS (y/n)
 
# Use VHPT
! [ARCH=ia64] CONFIG_VHPT (y/n)
! [ARCH=ia64] CONFIG_VHPT (n/y)
 
## Run-time configuration directives
 
133,16 → 117,16
@ "synch/semaphore2" Sempahore test 2
@ [ARCH=ia32|ARCH=amd64|ARCH=ia64|ARCH=xen32] "fpu/fpu1" Intel fpu test 1
@ [ARCH=ia32|ARCH=amd64|ARCH=xen32] "fpu/sse1" Intel Sse test 1
@ [ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=simics] "fpu/mips1" Mips FPU test 1
@ [ARCH=mips32&MACHINE!=msim&MACHINE!=simics] "fpu/mips1" MIPS FPU test 1
@ "print/print1" Printf test 1
@ "thread/thread1" Thread test 1
@ "mm/mapping1" Mapping test 1
@ "mm/falloc1" Frame Allocation test 1
@ "mm/falloc2" Frame Allocation test 2
@ "mm/slab1" SLAB test1 - No CPU-cache
@ "mm/slab1" SLAB test1 - No CPU cache
@ "mm/slab2" SLAB test2 - SMP CPU cache
@ "fault/fault1" Write to NULL (maybe page fault)
@ "sysinfo" Sysinfo fill and dump test
@ [ARCH=ia64] "mm/purge1" Itanium TLB purge test
@ [ARCH=mips32] "debug/mips1" Mips breakpoint-debug test
@ [ARCH=mips32] "debug/mips1" MIPS breakpoint-debug test
! CONFIG_TEST (choice)
/trunk/kernel/Makefile
26,23 → 26,11
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
## Kernel release
#
 
VERSION = 0
PATCHLEVEL = 2
SUBLEVEL = 0
EXTRAVERSION = 2
NAME = Daylight
ifdef EXTRAVERSION
RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION)
else
RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
endif
 
## Include configuration
#
 
-include ../version
-include Makefile.config
 
## Common compiler flags
49,7 → 37,7
#
 
DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" -DKERNEL
CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
CFLAGS = -fno-builtin -fomit-frame-pointer -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
LFLAGS = -M
AFLAGS =
 
70,41 → 58,50
ifeq ($(CONFIG_DEBUG),y)
DEFS += -DCONFIG_DEBUG
endif
 
ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
DEFS += -DCONFIG_DEBUG_SPINLOCK
endif
 
ifeq ($(CONFIG_DEBUG_AS_WATCHPOINT),y)
DEFS += -DCONFIG_DEBUG_AS_WATCHPOINT
endif
 
ifeq ($(CONFIG_FPU_LAZY),y)
DEFS += -DCONFIG_FPU_LAZY
endif
 
ifeq ($(CONFIG_DEBUG_ALLREGS),y)
DEFS += -DCONFIG_DEBUG_ALLREGS
endif
 
ifeq ($(CONFIG_VHPT),y)
DEFS += -DCONFIG_VHPT
endif
 
ifeq ($(CONFIG_POWEROFF),y)
DEFS += -DCONFIG_POWEROFF
endif
 
ifeq ($(CONFIG_FB),y)
ifeq ($(ARCH),ia32)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
ifeq ($(ARCH),ia32)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
endif
ifeq ($(ARCH),amd64)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
endif
ifeq ($(ARCH),xen32)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
endif
endif
ifeq ($(ARCH),amd64)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
endif
ifeq ($(ARCH),xen32)
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH)
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT)
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP)
endif
endif
 
## Toolchain configuration
#
204,12 → 201,7
.PHONY: all build config distclean clean archlinks depend disasm
 
all:
tools/config.py default $(NARCH)
ifdef NARCH
ifneq ($(ARCH), $(NARCH))
$(MAKE) -C . clean
endif
endif
../tools/config.py kernel.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(MACHINE)
$(MAKE) -C . build
 
build: kernel.bin disasm
216,7 → 208,7
 
config:
-rm Makefile.depend
tools/config.py
tools/config.py kernel.config
 
-include Makefile.depend
 
226,9 → 218,9
clean:
-rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld
find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
for arch in arch/*; do \
[ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null;\
done;exit 0
for arch in arch/* ; do \
[ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \
done ; exit 0
 
archlinks:
ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch
/trunk/kernel/arch/sparc64/Makefile.inc
35,9 → 35,6
TARGET = sparc64-linux-gnu
TOOLCHAIN_DIR = /usr/local/sparc64/bin
 
## Make some default assumptions
#
 
CFLAGS += -mcpu=ultrasparc -m64
LFLAGS += -no-check-sections -N
 
/trunk/kernel/arch/ia64/Makefile.inc
35,9 → 35,6
TARGET = ia64-pc-linux-gnu
TOOLCHAIN_DIR = /usr/local/ia64/bin
 
## Make some default assumptions
#
 
INIT0_ADDRESS = 0xe000000000400000
INIT0_SIZE = 0x100000
 
/trunk/kernel/arch/ppc32/Makefile.inc
35,9 → 35,6
TARGET = ppc-linux-gnu
TOOLCHAIN_DIR = /usr/local/ppc/bin
 
## Make some default assumptions
#
 
CFLAGS += -mcpu=powerpc -msoft-float -m32
AFLAGS += -a32
LFLAGS += -no-check-sections -N
/trunk/kernel/arch/amd64/Makefile.inc
35,20 → 35,13
TARGET = amd64-linux-gnu
TOOLCHAIN_DIR = /usr/local/amd64/bin
 
## Make some default assumptions
#
 
ifndef CPU
CPU = opteron
endif
 
CFLAGS += -fno-unwind-tables -m64 -mcmodel=kernel -mno-red-zone
DEFS += -D_CPU=${CPU} -D__64_BITS__
DEFS += -DMACHINE=$(MACHINE) -D__64_BITS__
 
## Accepted CPUs
#
 
ifeq ($(CPU),opteron)
ifeq ($(MACHINE),opteron)
CFLAGS += -march=opteron
DEFS += -DFENCES=p4
endif
/trunk/kernel/arch/ppc64/Makefile.inc
35,9 → 35,6
TARGET = ppc64-linux-gnu
TOOLCHAIN_DIR = /usr/local/ppc64/bin
 
## Make some default assumptions
#
 
CFLAGS += -mcpu=powerpc64 -msoft-float -m64
AFLAGS += -a64
LFLAGS += -no-check-sections -N
/trunk/kernel/arch/mips32/Makefile.inc
33,13 → 33,6
TARGET = mipsel-linux-gnu
TOOLCHAIN_DIR = /usr/local/mipsel/bin
 
## Make some default assumptions
#
 
ifndef MIPS_MACHINE
MIPS_MACHINE = msim
endif
 
KERNEL_LOAD_ADDRESS = 0x80100000
INIT_ADDRESS = 0x81000000
INIT_SIZE = 262144
46,7 → 39,7
 
CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss
 
DEFS += -D__32_BITS__ -DMACHINE=${MIPS_MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
DEFS += -D__32_BITS__ -DMACHINE=$(MACHINE) -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} -DINIT_ADDRESS=${INIT_ADDRESS} -DINIT_SIZE=${INIT_SIZE}
 
## Compile with hierarchical page tables support.
#
63,7 → 56,7
## Accepted MACHINEs
#
 
ifeq ($(MIPS_MACHINE),indy)
ifeq ($(MACHINE),indy)
# GCC 4.0.1 compiled for mipsEL has problems compiling in
# BigEndian mode with the swl/swr/lwl/lwr instructions.
# We have to compile it with mips-sgi-irix5 to get it right.
77,12 → 70,12
INIT_ADDRESS = 0
INIT_SIZE = 0
endif
ifeq ($(MIPS_MACHINE),lgxemul)
ifeq ($(MACHINE),lgxemul)
BFD_NAME = elf32-tradlittlemips
BFD = binary
CFLAGS += -DFB_BIG_ENDIAN -DARCH_HAS_FPU -mips3
endif
ifeq ($(MIPS_MACHINE),bgxemul)
ifeq ($(MACHINE),bgxemul)
BFD_NAME = elf32-bigmips
BFD = ecoff-bigmips
TARGET = mips-sgi-irix5
90,7 → 83,7
CFLAGS += -EB -DBIG_ENDIAN -DARCH_HAS_FPU -mips3
INIT_ADDRESS = 0x81800000
endif
ifeq ($(MIPS_MACHINE),simics)
ifeq ($(MACHINE),simics)
# SIMICS 4kc emulation is broken, although for instructions
# that do not bother us
99,7 → 92,7
CFLAGS += -mhard-float -mips3 -DTLBCNT=16
TLBCNT = 16
endif
ifeq ($(MIPS_MACHINE),msim)
ifeq ($(MACHINE),msim)
BFD_NAME = elf32-tradlittlemips
BFD = binary
CFLAGS += -mhard-float -mips3
/trunk/kernel/arch/ia32/Makefile.inc
35,39 → 35,32
TARGET = i686-pc-linux-gnu
TOOLCHAIN_DIR = /usr/local/i686/bin
 
## Make some default assumptions
#
DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__
 
ifndef IA32_CPU
IA32_CPU = pentium4
endif
 
DEFS += -D_CPU=${IA32_CPU} -D__32_BITS__
 
## Accepted CPUs
#
 
ifeq ($(IA32_CPU),athlon-xp)
ifeq ($(MACHINE),athlon-xp)
CFLAGS += -march=athlon-xp -mmmx -msse -m3dnow
DEFS += -DCONFIG_FENCES_P3
CONFIG_SMP = n
CONFIG_HT = n
endif
ifeq ($(IA32_CPU),athlon-mp)
ifeq ($(MACHINE),athlon-mp)
CFLAGS += -march=athlon-mp -mmmx -msse -m3dnow
DEFS += -DCONFIG_FENCES_P3
CONFIG_HT = n
endif
ifeq ($(IA32_CPU),pentium3)
ifeq ($(MACHINE),pentium3)
CFLAGS += -march=pentium3 -mmmx -msse
DEFS += -DCONFIG_FENCES_P3
CONFIG_HT = n
endif
ifeq ($(IA32_CPU),prescott)
ifeq ($(MACHINE),prescott)
CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -msse3
DEFS += -DCONFIG_FENCES_P4
endif
ifeq ($(IA32_CPU),pentium4)
ifeq ($(MACHINE),pentium4)
CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2
DEFS += -DCONFIG_FENCES_P4
endif