mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
Merge fixes for LiveCD (25746, 25747 plus corresponding changes in ex/init.c).
LiveCD now works. svn path=/branches/ros-branch-0_3_1/; revision=25748
This commit is contained in:
parent
aaba4e8b8c
commit
f56e85deb7
|
@ -33,6 +33,7 @@ ULONG ExpInitializationPhase;
|
|||
BOOLEAN ExpInTextModeSetup;
|
||||
BOOLEAN IoRemoteBootClient;
|
||||
ULONG InitSafeBootMode;
|
||||
BOOLEAN InitIsWinPEMode, InitWinPEModeType;
|
||||
|
||||
BOOLEAN NoGuiBoot = FALSE;
|
||||
|
||||
|
@ -820,6 +821,7 @@ NTAPI
|
|||
ExPhase2Init(PVOID Context)
|
||||
{
|
||||
LARGE_INTEGER Timeout;
|
||||
PCHAR CommandLine;
|
||||
HANDLE ProcessHandle;
|
||||
HANDLE ThreadHandle;
|
||||
NTSTATUS Status;
|
||||
|
@ -835,8 +837,11 @@ ExPhase2Init(PVOID Context)
|
|||
/* Do Phase 1 HAL Initialization */
|
||||
HalInitSystem(1, KeLoaderBlock);
|
||||
|
||||
/* Get the command line and upcase it */
|
||||
CommandLine = _strupr(KeLoaderBlock->LoadOptions);
|
||||
|
||||
/* Check if GUI Boot is enabled */
|
||||
if (strstr(KeLoaderBlock->LoadOptions, "NOGUIBOOT")) NoGuiBoot = TRUE;
|
||||
if (strstr(CommandLine, "NOGUIBOOT")) NoGuiBoot = TRUE;
|
||||
|
||||
/* Display the boot screen image if not disabled */
|
||||
if (!ExpInTextModeSetup) InbvDisplayInitialize2(NoGuiBoot);
|
||||
|
@ -846,6 +851,14 @@ ExPhase2Init(PVOID Context)
|
|||
if (NoGuiBoot) ExpDisplayNotice();
|
||||
KdInitSystem(2, KeLoaderBlock);
|
||||
|
||||
/* Check if this is LiveCD (WinPE) mode */
|
||||
if (strstr(CommandLine, "MININT"))
|
||||
{
|
||||
/* Setup WinPE Settings */
|
||||
InitIsWinPEMode = TRUE;
|
||||
InitWinPEModeType |= (strstr(CommandLine, "INRAM")) ? 0x80000000 : 1;
|
||||
}
|
||||
|
||||
/* Initialize Power Subsystem in Phase 0 */
|
||||
PoInit(0, AcpiTableDetected);
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ ShutdownThreadMain(PVOID Context)
|
|||
InbvSetTextColor(15);
|
||||
InbvInstallDisplayStringFilter(NULL);
|
||||
InbvEnableDisplayString(TRUE);
|
||||
InbvSetScrollRegion(0, 0, 639, 479);
|
||||
//InbvSetScrollRegion(0, 0, 639, 479);
|
||||
}
|
||||
|
||||
if (Action == ShutdownNoReboot)
|
||||
|
|
|
@ -33,6 +33,8 @@ IopApplyRosCdromArcHack(IN ULONG i)
|
|||
FILE_BASIC_INFORMATION FileInfo;
|
||||
NTSTATUS Status;
|
||||
PCHAR p, q;
|
||||
PCONFIGURATION_INFORMATION ConfigInfo = IoGetConfigurationInformation();
|
||||
extern BOOLEAN InitIsWinPEMode, ExpInTextModeSetup;
|
||||
|
||||
/* Only ARC Name left - Build full ARC Name */
|
||||
p = strstr(KeLoaderBlock->ArcBootDeviceName, "cdrom");
|
||||
|
@ -86,26 +88,32 @@ IopApplyRosCdromArcHack(IN ULONG i)
|
|||
RtlFreeUnicodeString(&DeviceName);
|
||||
}
|
||||
|
||||
/* Build the name */
|
||||
sprintf(p, "cdrom(%lu)", DeviceNumber);
|
||||
|
||||
/* Adjust original command line */
|
||||
q = strchr(p, ')');
|
||||
if (q)
|
||||
if (!InitIsWinPEMode)
|
||||
{
|
||||
q++;
|
||||
strcpy(Buffer, q);
|
||||
/* Build the name */
|
||||
sprintf(p, "cdrom(%lu)", DeviceNumber);
|
||||
strcat(p, Buffer);
|
||||
|
||||
/* Adjust original command line */
|
||||
q = strchr(p, ')');
|
||||
if (q)
|
||||
{
|
||||
q++;
|
||||
strcpy(Buffer, q);
|
||||
sprintf(p, "cdrom(%lu)", DeviceNumber);
|
||||
strcat(p, Buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* OK, how many disks are there? */
|
||||
DeviceNumber += ConfigInfo->DiskCount;
|
||||
|
||||
/* Return whether this is the CD or not */
|
||||
if (DeviceNumber != 1)
|
||||
if ((InitIsWinPEMode) || (ExpInTextModeSetup))
|
||||
{
|
||||
/* Hack until IoAssignDriveLetters is fixed */
|
||||
swprintf(SharedUserData->NtSystemRoot, L"D:\\reactos");
|
||||
return TRUE;
|
||||
swprintf(SharedUserData->NtSystemRoot, L"%c:\\reactos", 'C' + DeviceNumber);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Failed */
|
||||
|
|
|
@ -482,7 +482,7 @@ MmInit3(VOID)
|
|||
/*
|
||||
* Initialise the modified page writer.
|
||||
*/
|
||||
MmInitMpwThread();
|
||||
if (!strstr(KeLoaderBlock->LoadOptions, "MININT")) MmInitMpwThread();
|
||||
|
||||
/* FIXME: Read parameters from memory */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue