Compare commits
2 Commits
102eabcb4b
...
70c6b78e35
Author | SHA1 | Date | |
---|---|---|---|
70c6b78e35 | |||
a44e2f41fe |
@ -1,8 +1,8 @@
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
src/Framebuffer.cpp
|
||||
src/MemoryManager.cpp
|
||||
src/Init.cpp
|
||||
src/video/Framebuffer.cpp
|
||||
src/memory/MemoryManager.cpp
|
||||
src/boot/Init.cpp
|
||||
src/arch/Serial.cpp
|
||||
)
|
||||
|
||||
@ -16,20 +16,13 @@ set(SOURCES
|
||||
)
|
||||
endif()
|
||||
|
||||
set(ASM_SOURCES)
|
||||
|
||||
if("${ARCH}" MATCHES "x86_64")
|
||||
set(ASM_SOURCES
|
||||
${ASM_SOURCES}
|
||||
src/arch/x86_64/CPU.asm
|
||||
)
|
||||
|
||||
add_library(moon-asm STATIC ${ASM_SOURCES})
|
||||
endif()
|
||||
|
||||
add_executable(moon ${SOURCES})
|
||||
|
||||
if("${ARCH}" MATCHES "x86_64")
|
||||
set(ASM_SOURCES
|
||||
src/arch/x86_64/CPU.asm
|
||||
)
|
||||
add_library(moon-asm STATIC ${ASM_SOURCES})
|
||||
target_link_libraries(moon moon-asm)
|
||||
endif()
|
||||
|
||||
@ -50,14 +43,11 @@ target_compile_options(moon PRIVATE -nostdlib -mcmodel=kernel)
|
||||
if("${ARCH}" MATCHES "x86_64")
|
||||
target_compile_options(moon PRIVATE -mno-red-zone)
|
||||
target_compile_options(moon PRIVATE -mno-80387 -mno-mmx -mno-sse -mno-sse2)
|
||||
target_link_options(moon PRIVATE -mno-red-zone)
|
||||
endif()
|
||||
|
||||
target_link_options(moon PRIVATE -lgcc -Wl,--build-id=none -z max-page-size=0x1000 -mcmodel=kernel)
|
||||
|
||||
if("${ARCH}" MATCHES "x86_64")
|
||||
target_link_options(moon PRIVATE -mno-red-zone)
|
||||
endif()
|
||||
|
||||
set_target_properties(moon PROPERTIES CXX_STANDARD 20)
|
||||
|
||||
target_include_directories(moon PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "arch/MMU.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "memory/MemoryManager.h"
|
||||
#include <String.h>
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "Init.h"
|
||||
#include "Framebuffer.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "boot/Init.h"
|
||||
#include "arch/CPU.h"
|
||||
#include "arch/Serial.h"
|
||||
#include "bootboot.h"
|
||||
#include "boot/bootboot.h"
|
||||
#include "memory/MemoryManager.h"
|
||||
#include "video/Framebuffer.h"
|
||||
#include <String.h>
|
||||
|
||||
extern BOOTBOOT bootboot;
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* bootboot.h
|
||||
* boot/bootboot.h
|
||||
* https://gitlab.com/bztsrc/bootboot
|
||||
*
|
||||
* Copyright (C) 2017 - 2021 bzt (bztsrc@gitlab)
|
@ -1,9 +1,9 @@
|
||||
#include "Framebuffer.h"
|
||||
#include "Init.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "arch/CPU.h"
|
||||
#include "arch/MMU.h"
|
||||
#include "arch/Serial.h"
|
||||
#include "boot/Init.h"
|
||||
#include "memory/MemoryManager.h"
|
||||
#include "video/Framebuffer.h"
|
||||
|
||||
extern u8 fb[1];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "memory/MemoryManager.h"
|
||||
#include "arch/MMU.h"
|
||||
#include "arch/Serial.h"
|
||||
#include "bootboot.h"
|
||||
#include "boot/bootboot.h"
|
||||
#include <Alignment.h>
|
||||
#include <String.h>
|
||||
#include <Types.h>
|
@ -1,5 +1,5 @@
|
||||
#include "Framebuffer.h"
|
||||
#include "bootboot.h"
|
||||
#include "video/Framebuffer.h"
|
||||
#include "boot/bootboot.h"
|
||||
|
||||
static u8* g_fb_ptr = nullptr;
|
||||
static u32 g_fb_size;
|
Loading…
Reference in New Issue
Block a user