Add a second process to be loaded by the bootloader.

This commit is contained in:
Drew Galbraith 2023-05-30 20:54:37 -07:00
parent b9b45c5e45
commit 5bcf1f4e4a
5 changed files with 23 additions and 1 deletions

View File

@ -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
)

View File

@ -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

View File

@ -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}"
)

8
sys/test2.cpp Normal file
View File

@ -0,0 +1,8 @@
#include "zcall.h"
int main() {
ZDebug("Testing");
return 0;
}

View File

@ -7,3 +7,4 @@ TIMEOUT=0
KERNEL_PATH=boot:///zion
MODULE_PATH=boot:///sys/test
MODULE_PATH=boot:///sys/test2