added x86_64 support
This commit is contained in:
parent
0cd3ab3fdb
commit
ba8f73277c
6 changed files with 13 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,3 +8,5 @@ config.h
|
||||||
gen*.h
|
gen*.h
|
||||||
build/
|
build/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
kernel
|
||||||
|
*.iso
|
||||||
|
|
3
iso/grub2/grub.cfg
Normal file
3
iso/grub2/grub.cfg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
menuentry "MTGos" {
|
||||||
|
multiboot /kernel
|
||||||
|
}
|
|
@ -29,8 +29,8 @@ FILE(GLOB_RECURSE GENERIC_SRCS src/*.c src/*.cpp ${DRIVER_SRCS})
|
||||||
LOAD_PROFILE(${ARCH} ${SYSTEM})
|
LOAD_PROFILE(${ARCH} ${SYSTEM})
|
||||||
ADD_EXECUTABLE(kernel ${PLATFORM_SRCS} ${ISA_SRCS} ${GENERIC_SRCS})
|
ADD_EXECUTABLE(kernel ${PLATFORM_SRCS} ${ISA_SRCS} ${GENERIC_SRCS})
|
||||||
SET(CMAKE_ASM-ATT_COMPILE_OBJECT
|
SET(CMAKE_ASM-ATT_COMPILE_OBJECT
|
||||||
"<CMAKE_C_COMPILER> -g -m32 -x assembler-with-cpp -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_ASM_FLAGS} ${PLATFORM_ASM_FLAGS} -c -o <OBJECT> <SOURCE>")
|
"<CMAKE_C_COMPILER> -g -x assembler-with-cpp -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_ASM_FLAGS} ${PLATFORM_ASM_FLAGS} -c -o <OBJECT> <SOURCE>")
|
||||||
SET(CMAKE_C_FLAGS "-g -m32 -w -Werror -Wno-unused -Wno-unused-variable -fno-use-cxa-atexit -std=c11 -ffreestanding -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_C_FLAGS} ${PLATFORM_C_FLAGS}")
|
SET(CMAKE_C_FLAGS "-g -w -Werror -Wno-unused -Wno-unused-variable -fno-use-cxa-atexit -std=c11 -ffreestanding -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_C_FLAGS} ${PLATFORM_C_FLAGS}")
|
||||||
SET(CMAKE_CXX_FLAGS "-g -m32 -w -Werror -Wno-unused -Wno-unused-variable -fno-use-cxa-atexit -ffreestanding -fno-rtti -fno-exceptions -std=gnu++17 -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_CXX_FLAGS} ${PLATFORM_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS "-g -w -Werror -Wno-unused -Wno-unused-variable -fno-use-cxa-atexit -ffreestanding -fno-rtti -fno-exceptions -std=gnu++17 -I../../ -I../../libk/include/ -I../../kernel/src/include/ ${ISA_CXX_FLAGS} ${PLATFORM_CXX_FLAGS}")
|
||||||
SET_TARGET_PROPERTIES(kernel PROPERTIES LINK_FLAGS
|
SET_TARGET_PROPERTIES(kernel PROPERTIES LINK_FLAGS
|
||||||
"-T ../../kernel/${PLATFORM_LAYOUT} -N ${ISA_LINKER_FLAGS} ${PLATFORM_LINKER_FLAGS} -nostdlib -nodefaultlibs -lgcc -Wl,--gc-sections")
|
"-T ../../kernel/${PLATFORM_LAYOUT} -N ${ISA_LINKER_FLAGS} ${PLATFORM_LINKER_FLAGS} -nostdlib -nodefaultlibs -lgcc -Wl,--gc-sections")
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
SET(ISA_C_FLAGS "-m32 -I../../kernel/arch/x86/include/")
|
SET(ISA_C_FLAGS "-m32 -I../../kernel/arch/x86/include/")
|
||||||
SET(ISA_CXX_FLAGS "${ISA_C_FLAGS}")
|
SET(ISA_CXX_FLAGS "${ISA_C_FLAGS}")
|
||||||
|
SET(ISA_ASM_FLAGS "${ISA_C_FLAGS}")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
config["SYSTEM"] = get_from_list("System", ["pc"])
|
config["SYSTEM"] = get_from_list("System", ["pc"])
|
||||||
if not get_yes_no("Build for generic x86_64"):
|
if not get_yes_no("Build for generic x86_64"):
|
||||||
config["LOWEST_CPU"] = get_from_list("Lowest supported CPU", ["pentium4", "core2", "nehalem", "westmere", "sandybridge", "ivybridge", "haswell", "broadwell", "skylake", "kabylake"])
|
config["LOWEST_CPU"] = get_from_list("Lowest supported CPU", ["pentium4", "core2", "nehalem", "westmere", "sandybridge", "ivybridge", "haswell", "broadwell", "skylake", "kabylake"])
|
||||||
|
else:
|
||||||
|
config["LOWEST_CPU"] = "pentium4"
|
||||||
|
|
|
@ -4,8 +4,8 @@ bool tty_set = false;
|
||||||
void setMainTTY(Kobject *obj) {
|
void setMainTTY(Kobject *obj) {
|
||||||
if(obj->type == kobjectType::TTY) {
|
if(obj->type == kobjectType::TTY) {
|
||||||
++*obj;
|
++*obj;
|
||||||
if(tty_set)
|
// if(tty_set)
|
||||||
--*out;
|
// --*out;
|
||||||
out=(TTY*)obj;
|
out=(TTY*)obj;
|
||||||
tty_set=true;
|
tty_set=true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue