From: John Hodge Date: Mon, 17 Oct 2011 02:59:06 +0000 (+0800) Subject: Changed i386 build to x86 X-Git-Tag: rel0.13~50 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fad68a47fc99c28c0557c06631b95277c8ed9159;p=tpg%2Facess2.git Changed i386 build to x86 --- diff --git a/Kernel/arch/x86/Makefile b/Kernel/arch/x86/Makefile index 00a02ac3..10cd645b 100644 --- a/Kernel/arch/x86/Makefile +++ b/Kernel/arch/x86/Makefile @@ -11,9 +11,9 @@ ASFLAGS = -f elf USE_MP=0 -ifeq ($(ARCH),i386) +ifeq ($(ARCH),x86) USE_MP=0 -else ifeq ($(ARCH),i386-smp) +else ifeq ($(ARCH),x86-smp) USE_MP=1 endif diff --git a/Kernel/arch/x86/include/arch.h b/Kernel/arch/x86/include/arch.h index 755ecdfd..9a4f98d5 100644 --- a/Kernel/arch/x86/include/arch.h +++ b/Kernel/arch/x86/include/arch.h @@ -18,7 +18,7 @@ #define LOCK_DISABLE_INTS 1 // - Processor/Machine Specific Features -#if ARCH != i386 && ARCH != i486 && ARCH != i586 +#if ARCH != x86 && ARCH != x86_smp # error "Unknown architecture '" #ARCH "'" #endif diff --git a/Makefile.cfg b/Makefile.cfg index 83c593be..70570c86 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -25,7 +25,7 @@ ASSUFFIX = asm # Load Architecture settings ifeq ($(ARCH),) - ARCH := i386 + ARCH := x86 endif include $(ACESSDIR)/Makefile.$(ARCH).cfg ifeq ($(ARCHDIR),) diff --git a/Makefile.i386-smp.cfg b/Makefile.i386-smp.cfg deleted file mode 120000 index 5b8aab70..00000000 --- a/Makefile.i386-smp.cfg +++ /dev/null @@ -1 +0,0 @@ -Makefile.i386.cfg \ No newline at end of file diff --git a/Makefile.i386.cfg b/Makefile.i386.cfg deleted file mode 100644 index f72f0bbc..00000000 --- a/Makefile.i386.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# -# Acess2 Build Configuration -# - -CC = i586-elf-gcc -LD = i586-elf-ld -AS = nasm -OBJDUMP = i586-elf-objdump -RM = @rm -f -STRIP = strip - -ARCHDIR = x86 - -DYNMOD_FLAGS := -mcmodel=small -fPIC - diff --git a/Makefile.x86.cfg b/Makefile.x86.cfg index 705fe8a6..7b3d8a98 100644 --- a/Makefile.x86.cfg +++ b/Makefile.x86.cfg @@ -1,2 +1,17 @@ +# +# Acess2 Build Configuration +# + +CC = i586-elf-gcc +LD = i586-elf-ld +AS = nasm +OBJDUMP = i586-elf-objdump +RM = @rm -f +STRIP = strip + +ARCHDIR = x86 + +DYNMOD_FLAGS := -mcmodel=small -fPIC + ASFLAGS = -felf diff --git a/Usermode/Libraries/crt0.o_src/crt0.asm b/Usermode/Libraries/crt0.o_src/crt0.asm deleted file mode 100644 index 531a3783..00000000 --- a/Usermode/Libraries/crt0.o_src/crt0.asm +++ /dev/null @@ -1,30 +0,0 @@ -; -; Acess2 -; C Runtime 0 -; - crt0.asm - -[BITS 32] -[section .text] - - -[global _start] -[global start] -[extern main] -[extern _exit] -_start: -start: - call main - push eax - - mov eax, [_crt0_exit_handler] - test eax, eax - jz .exit - call eax - -.exit: - call _exit - jmp $ ; This should never be reached -[section .bss] -[global _crt0_exit_handler] -_crt0_exit_handler: - resd 1 diff --git a/Usermode/Libraries/crt0.o_src/crt0.x86.asm b/Usermode/Libraries/crt0.o_src/crt0.x86.asm deleted file mode 120000 index 084206aa..00000000 --- a/Usermode/Libraries/crt0.o_src/crt0.x86.asm +++ /dev/null @@ -1 +0,0 @@ -crt0.asm \ No newline at end of file diff --git a/Usermode/Libraries/crt0.o_src/crt0.x86.asm b/Usermode/Libraries/crt0.o_src/crt0.x86.asm new file mode 100644 index 00000000..531a3783 --- /dev/null +++ b/Usermode/Libraries/crt0.o_src/crt0.x86.asm @@ -0,0 +1,30 @@ +; +; Acess2 +; C Runtime 0 +; - crt0.asm + +[BITS 32] +[section .text] + + +[global _start] +[global start] +[extern main] +[extern _exit] +_start: +start: + call main + push eax + + mov eax, [_crt0_exit_handler] + test eax, eax + jz .exit + call eax + +.exit: + call _exit + jmp $ ; This should never be reached +[section .bss] +[global _crt0_exit_handler] +_crt0_exit_handler: + resd 1