Store all configuration in a linked list, read config from INI file and EFI shell
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user