Store all configuration in a linked list, read config from INI file and EFI shell
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 46s
Builds / ExectOS (i686) (push) Successful in 25s

This commit is contained in:
2023-12-11 16:31:15 +01:00
parent 6ffedf6302
commit 0cea10ad42
9 changed files with 344 additions and 124 deletions

View File

@@ -38,7 +38,13 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Parse configuration options passed from UEFI shell */
BlpParseCommandLine();
Status = BlpParseCommandLine();
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to parse command line options */
BlConsolePrint(L"ERROR: Failed to parse command line options\n");
BlSleepExecution(3000);
}
/* Attempt to early initialize debug console */
if(DEBUG)
@@ -52,6 +58,27 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
}
}
/* Load XTLDR configuration file */
Status = BlpLoadConfiguration();
if(Status != STATUS_EFI_SUCCESS)
{
/* Failed to load/parse config file */
BlConsolePrint(L"ERROR: Failed to load configuration file\n");
BlSleepExecution(3000);
}
/* Reinitialize debug console if it was not initialized earlier */
if(DEBUG)
{
Status = BlpInitializeDebugConsole();
if(Status != STATUS_EFI_SUCCESS)
{
/* Initialization failed, notify user on stdout */
BlConsolePrint(L"ERROR: Failed to initialize debug console\n");
BlSleepExecution(3000);
}
}
/* Disable watchdog timer */
Status = EfiSystemTable->BootServices->SetWatchdogTimer(0, 0x10000, 0, NULL);
if(Status != STATUS_EFI_SUCCESS)