diff --git a/CMakeLists.txt b/CMakeLists.txt index 65f4f5d..5cedbe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ add_subdirectory(sys) add_custom_command( OUTPUT disk.img COMMAND sudo sh ../scripts/build_image.sh disk.img - DEPENDS zion test + DEPENDS zion test test2 USES_TERMINAL ) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 150022c..a02047d 100644 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -38,5 +38,6 @@ cp ../zion/boot/limine.cfg efi/ cp zion/zion efi/ mkdir -p efi/sys cp sys/test efi/sys/test +cp sys/test2 efi/sys/test2 chown drew:drew $1 diff --git a/sys/CMakeLists.txt b/sys/CMakeLists.txt index 6884a8e..19eb698 100644 --- a/sys/CMakeLists.txt +++ b/sys/CMakeLists.txt @@ -15,3 +15,15 @@ set_target_properties(test COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${_COMPILE_FLAGS}" LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${_LINK_FLAGS}" ) + +add_executable(test2 + test2.cpp) + +target_link_libraries(test2 + zion_lib) + +set_target_properties(test2 + PROPERTIES + COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${_COMPILE_FLAGS}" + LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${_LINK_FLAGS}" + ) diff --git a/sys/test2.cpp b/sys/test2.cpp new file mode 100644 index 0000000..02b5700 --- /dev/null +++ b/sys/test2.cpp @@ -0,0 +1,8 @@ + + +#include "zcall.h" + +int main() { + ZDebug("Testing"); + return 0; +} diff --git a/zion/boot/limine.cfg b/zion/boot/limine.cfg index 3470793..3a85003 100644 --- a/zion/boot/limine.cfg +++ b/zion/boot/limine.cfg @@ -7,3 +7,4 @@ TIMEOUT=0 KERNEL_PATH=boot:///zion MODULE_PATH=boot:///sys/test + MODULE_PATH=boot:///sys/test2