Rewrite core of the XTLDR boot loader

Reviewed-on: xt-sys/exectos#7
Reviewed-by: Piotr Likoski <likoski@noreply.codingworkshop.git>
Co-authored-by: Rafal Kupiec <belliash@codingworkshop.eu.org>
Co-committed-by: Rafal Kupiec <belliash@codingworkshop.eu.org>
This commit is contained in:
2024-01-09 18:51:04 +01:00
committed by CodingWorkshop Signing Team
parent 44905bb71d
commit 4412d4fc98
63 changed files with 6282 additions and 2371 deletions

View File

@@ -9,19 +9,29 @@ include_directories(
${EXECTOS_SOURCE_DIR}/sdk/xtdk
${XTLDR_SOURCE_DIR}/includes)
# Specify list of library source code files
list(APPEND LIBXTLDR_SOURCE
${XTLDR_SOURCE_DIR}/library/modproto.c)
# Specify list of source code files
list(APPEND XTLDR_SOURCE
${XTLDR_SOURCE_DIR}/${ARCH}/memory.c
${XTLDR_SOURCE_DIR}/blproto.c
${XTLDR_SOURCE_DIR}/config.c
${XTLDR_SOURCE_DIR}/console.c
${XTLDR_SOURCE_DIR}/efiutil.c
${XTLDR_SOURCE_DIR}/debug.c
${XTLDR_SOURCE_DIR}/efiutils.c
${XTLDR_SOURCE_DIR}/globals.c
${XTLDR_SOURCE_DIR}/hardware.c
${XTLDR_SOURCE_DIR}/memory.c
${XTLDR_SOURCE_DIR}/protocol.c
${XTLDR_SOURCE_DIR}/shell.c
${XTLDR_SOURCE_DIR}/string.c
${XTLDR_SOURCE_DIR}/system.c
${XTLDR_SOURCE_DIR}/textui.c
${XTLDR_SOURCE_DIR}/volume.c
${XTLDR_SOURCE_DIR}/xtldr.c)
# Link static XTLDR library
add_library(libxtldr ${LIBXTLDR_SOURCE})
# Link bootloader executable
add_executable(xtldr ${XTLDR_SOURCE})
@@ -38,6 +48,7 @@ set_target_properties(xtldr PROPERTIES OUTPUT_NAME ${BINARY_NAME} SUFFIX .efi)
set_install_target(xtldr efi/boot)
# Set loader entrypoint and subsystem
set_imagebase(xtldr ${BASEADDRESS_XTLDR})
set_entrypoint(xtldr "BlStartXtLoader")
set_imagebase(xtldr ${BASEADDRESS_XTLDR})
set_linker_map(xtldr TRUE)
set_subsystem(xtldr efi_application)