diff --git a/CMakeLists.txt b/CMakeLists.txt index c285c7a..2c67361 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ set(QEMU_CMD qemu-system-x86_64 -d guest_errors -m 1G -serial stdio -hda disk.im add_custom_command( OUTPUT disk.img COMMAND sudo sh ../scripts/build_image.sh disk.img - DEPENDS zion test test2 + DEPENDS zion yellowstone test2 USES_TERMINAL ) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index a02047d..19c5bc4 100644 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -37,7 +37,7 @@ cp /usr/share/limine/limine.sys efi/ cp ../zion/boot/limine.cfg efi/ cp zion/zion efi/ mkdir -p efi/sys -cp sys/test efi/sys/test +cp sys/yellowstone/yellowstone efi/sys/yellowstone cp sys/test2 efi/sys/test2 chown drew:drew $1 diff --git a/sys/CMakeLists.txt b/sys/CMakeLists.txt index 851f633..4c16dab 100644 --- a/sys/CMakeLists.txt +++ b/sys/CMakeLists.txt @@ -1,17 +1,6 @@ set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") -add_executable(test - test.cpp - ) - -target_link_libraries(test - mammoth_lib) - -set_target_properties(test - PROPERTIES - COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}" - LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}" - ) +add_subdirectory(yellowstone) add_executable(test2 test2.cpp) diff --git a/sys/README.md b/sys/README.md new file mode 100644 index 0000000..5988c48 --- /dev/null +++ b/sys/README.md @@ -0,0 +1,5 @@ +# System Processes + +Current Processes; + +- **yellowstone**: System Initialization diff --git a/sys/yellowstone/CMakeLists.txt b/sys/yellowstone/CMakeLists.txt new file mode 100644 index 0000000..99b4023 --- /dev/null +++ b/sys/yellowstone/CMakeLists.txt @@ -0,0 +1,12 @@ +add_executable(yellowstone + yellowstone.cpp) + +target_link_libraries(yellowstone + cxx + mammoth_lib + ) + +set_target_properties(yellowstone PROPERTIES + COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}" + LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}" + ) diff --git a/sys/test.cpp b/sys/yellowstone/yellowstone.cpp similarity index 68% rename from sys/test.cpp rename to sys/yellowstone/yellowstone.cpp index d7f2841..a9afe28 100644 --- a/sys/test.cpp +++ b/sys/yellowstone/yellowstone.cpp @@ -2,11 +2,12 @@ #include #include -int main() { - dbgln("Testing"); +uint64_t main() { + dbgln("Yellowstone Initializing."); uint64_t vaddr; check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, Z_INIT_BOOT_VMMO, &vaddr)); check(SpawnProcessFromElfRegion(vaddr)); - dbgln("Return"); + + dbgln("Yellowstone Finished Successfully."); return 0; } diff --git a/zion/boot/limine.cfg b/zion/boot/limine.cfg index 3a85003..6634ce4 100644 --- a/zion/boot/limine.cfg +++ b/zion/boot/limine.cfg @@ -6,5 +6,5 @@ TIMEOUT=0 PROTOCOL=limine KERNEL_PATH=boot:///zion - MODULE_PATH=boot:///sys/test + MODULE_PATH=boot:///sys/yellowstone MODULE_PATH=boot:///sys/test2 diff --git a/zion/loader/init_loader.cpp b/zion/loader/init_loader.cpp index f8a1ddf..71033a4 100644 --- a/zion/loader/init_loader.cpp +++ b/zion/loader/init_loader.cpp @@ -107,7 +107,7 @@ const limine_file& GetInitProgram(const char* path) { void LoadInitProgram() { DumpModules(); - const limine_file& init_prog = GetInitProgram("/sys/test"); + const limine_file& init_prog = GetInitProgram("/sys/yellowstone"); RefPtr proc = Process::Create(); gProcMan->InsertProcess(proc);