From c4f77f4809ba9fc3be3f7931a519550391c0993f Mon Sep 17 00:00:00 2001 From: Jozef Nagy Date: Wed, 10 Jan 2024 18:22:13 +0100 Subject: [PATCH] Rename elf_o to elf --- xtldr/modules/CMakeLists.txt | 1 + xtldr/modules/elf/CMakeLists.txt | 26 +++++++++++++++++++++ xtldr/modules/{elf_o => elf}/elf.c | 2 +- xtldr/modules/{elf_o => elf}/includes/elf.h | 2 +- xtldr/modules/elf_o/CMakeLists.txt | 26 --------------------- 5 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 xtldr/modules/elf/CMakeLists.txt rename xtldr/modules/{elf_o => elf}/elf.c (99%) rename xtldr/modules/{elf_o => elf}/includes/elf.h (95%) delete mode 100644 xtldr/modules/elf_o/CMakeLists.txt diff --git a/xtldr/modules/CMakeLists.txt b/xtldr/modules/CMakeLists.txt index 375c1d7..e329643 100644 --- a/xtldr/modules/CMakeLists.txt +++ b/xtldr/modules/CMakeLists.txt @@ -1,5 +1,6 @@ add_subdirectory(beep) add_subdirectory(dummy) +add_subdirectory(elf) add_subdirectory(fb_o) add_subdirectory(pecoff_o) add_subdirectory(xtos_o) diff --git a/xtldr/modules/elf/CMakeLists.txt b/xtldr/modules/elf/CMakeLists.txt new file mode 100644 index 0000000..b705b69 --- /dev/null +++ b/xtldr/modules/elf/CMakeLists.txt @@ -0,0 +1,26 @@ +# XT Boot Loader +PROJECT(XTLDR_ELF) + +# Specify include directories +include_directories( + ${EXECTOS_SOURCE_DIR}/sdk/xtdk + ${XTLDR_ELF_SOURCE_DIR}/includes) + +# Specify list of source code files +list(APPEND XTLDR_ELF_SOURCE + ${XTLDR_ELF_SOURCE_DIR}/elf.c) + +# Link bootloader executable +add_executable(elf ${XTLDR_ELF_SOURCE}) + +# Add linker libraries +target_link_libraries(elf libxtos libxtldr) + +# Set proper binary name and install target +set_target_properties(elf PROPERTIES SUFFIX .efi) +set_install_target(elf efi/boot/xtldr/modules) + +# Set module entrypoint and subsystem +set_entrypoint(elf "XtLdrModuleMain") +set_linker_map(elf TRUE) +set_subsystem(elf efi_boot_service_driver) diff --git a/xtldr/modules/elf_o/elf.c b/xtldr/modules/elf/elf.c similarity index 99% rename from xtldr/modules/elf_o/elf.c rename to xtldr/modules/elf/elf.c index bf5282e..dc63e3c 100644 --- a/xtldr/modules/elf_o/elf.c +++ b/xtldr/modules/elf/elf.c @@ -1,7 +1,7 @@ /** * PROJECT: ExectOS * COPYRIGHT: See COPYING.md in the top level directory - * FILE: xtldr/modules/elf_o/elf.c + * FILE: xtldr/modules/elf/elf.c * DESCRIPTION: ELF executable file format support module * DEVELOPERS: Jozef Nagy */ diff --git a/xtldr/modules/elf_o/includes/elf.h b/xtldr/modules/elf/includes/elf.h similarity index 95% rename from xtldr/modules/elf_o/includes/elf.h rename to xtldr/modules/elf/includes/elf.h index c234f0e..56d6ee4 100644 --- a/xtldr/modules/elf_o/includes/elf.h +++ b/xtldr/modules/elf/includes/elf.h @@ -1,7 +1,7 @@ /** * PROJECT: ExectOS * COPYRIGHT: See COPYING.md in the top level directory - * FILE: xtldr/modules/elf_o/includes/elf.h + * FILE: xtldr/modules/elf/includes/elf.h * DESCRIPTION: ELF executable file format support header * DEVELOPERS: Jozef Nagy */ diff --git a/xtldr/modules/elf_o/CMakeLists.txt b/xtldr/modules/elf_o/CMakeLists.txt deleted file mode 100644 index 2cf25fb..0000000 --- a/xtldr/modules/elf_o/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# XT Boot Loader -PROJECT(XTLDR_ELF_O) - -# Specify include directories -include_directories( - ${EXECTOS_SOURCE_DIR}/sdk/xtdk - ${XTLDR_ELF_O_SOURCE_DIR}/includes) - -# Specify list of source code files -list(APPEND XTLDR_ELF_O_SOURCE - ${XTLDR_ELF_O_SOURCE_DIR}/elf.c) - -# Link bootloader executable -add_executable(elf_o ${XTLDR_ELF_O_SOURCE}) - -# Add linker libraries -target_link_libraries(elf_o libxtos libxtldr) - -# Set proper binary name and install target -set_target_properties(elf_o PROPERTIES SUFFIX .efi) -set_install_target(elf_o efi/boot/xtldr/modules) - -# Set module entrypoint and subsystem -set_entrypoint(elf_o "XtLdrModuleMain") -set_linker_map(elf_o TRUE) -set_subsystem(elf_o efi_boot_service_driver)