kernel: Add a customizable configuration file system
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-06-18 20:18:19 +02:00
parent b7bdec9ece
commit 04322d9ff7
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ initrd/bin/**
initrd/tests/**
base/
.fakeroot
kernel/config.cmake

View File

@ -103,6 +103,10 @@ if(MOON_DEBUG)
include(debug.cmake)
endif()
if(EXISTS config.cmake)
include(config.cmake)
endif()
target_link_options(moon PRIVATE -lgcc -Wl,--build-id=none -z max-page-size=0x1000 -mcmodel=kernel)
set_target_properties(moon PROPERTIES CXX_STANDARD 20)

View File

@ -0,0 +1,12 @@
# Copy this file and rename it to 'config.cmake' before making your own changes.
# config.cmake: Configuration file for the kernel.
# Edit/add values to customize kernel compilation flags/defines.
# This file is automatically ignored by git.
# To use an example configuration line, just remove the hashtag '#' at the beginning.
# Example: Adding a compiler definition. This will define PCI_DEBUG in the kernel source.
# target_compile_definitions(moon PRIVATE PCI_DEBUG)
# Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion).
# target_compile_options(moon PRIVATE -O3)