- Fix selection of the active partition
- Running 1st stage setup to a USB drive now results in a bootable USB drive that successfully runs FreeLoader which can load the ROS kernel, HAL, and other critical boot executables from the USB drive but ROS fails early in boot after FreeLoader hands control to the kernel

svn path=/branches/usb-bringup-trunk/; revision=55316
This commit is contained in:
Cameron Gutman 2012-01-30 04:52:37 +00:00
parent 2b79f855e1
commit c6e7f39b35

View file

@ -1465,8 +1465,6 @@ SelectPartitionPage(PINPUT_RECORD Ir)
} }
} }
CheckActiveBootPartition(PartitionList);
DrawPartitionList(PartitionList); DrawPartitionList(PartitionList);
/* Warn about partitions created by Linux Fdisk */ /* Warn about partitions created by Linux Fdisk */
@ -2381,8 +2379,6 @@ FormatPartitionPage(PINPUT_RECORD Ir)
else if (!FileSystemList->Selected->FormatFunc) else if (!FileSystemList->Selected->FormatFunc)
return QUIT_PAGE; return QUIT_PAGE;
CheckActiveBootPartition(PartitionList);
#ifndef NDEBUG #ifndef NDEBUG
CONSOLE_PrintTextXY(6, 12, CONSOLE_PrintTextXY(6, 12,
"Disk: %I64u Cylinder: %I64u Track: %I64u", "Disk: %I64u Cylinder: %I64u Track: %I64u",
@ -2442,19 +2438,6 @@ FormatPartitionPage(PINPUT_RECORD Ir)
PathBuffer); PathBuffer);
DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath); DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
/* Set SystemRootPath */
RtlFreeUnicodeString(&SystemRootPath);
swprintf(PathBuffer,
L"\\Device\\Harddisk%lu\\Partition%lu",
PartitionList->ActiveBootDisk->DiskNumber,
PartitionList->ActiveBootPartition->
PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionNumber);
RtlCreateUnicodeString(&SystemRootPath,
PathBuffer);
DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
if (FileSystemList->Selected->FormatFunc) if (FileSystemList->Selected->FormatFunc)
{ {
Status = FormatPartition(&DestinationRootPath, Status = FormatPartition(&DestinationRootPath,
@ -2505,15 +2488,6 @@ CheckFileSystemPage(PINPUT_RECORD Ir)
RtlCreateUnicodeString(&DestinationRootPath, PathBuffer); RtlCreateUnicodeString(&DestinationRootPath, PathBuffer);
DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath); DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
/* Set SystemRootPath */
RtlFreeUnicodeString(&SystemRootPath);
swprintf(PathBuffer,
L"\\Device\\Harddisk%lu\\Partition%lu",
PartitionList->ActiveBootDisk->DiskNumber,
PartitionList->ActiveBootPartition->PartInfo[PartNum].PartitionNumber);
RtlCreateUnicodeString(&SystemRootPath, PathBuffer);
DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHECKINGPART)); CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHECKINGPART));
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
@ -3371,9 +3345,22 @@ BootLoaderPage(PINPUT_RECORD Ir)
UCHAR PartitionType; UCHAR PartitionType;
BOOLEAN InstallOnFloppy; BOOLEAN InstallOnFloppy;
USHORT Line = 12; USHORT Line = 12;
WCHAR PathBuffer[MAX_PATH];
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
CheckActiveBootPartition(PartitionList);
RtlFreeUnicodeString(&SystemRootPath);
swprintf(PathBuffer,
L"\\Device\\Harddisk%lu\\Partition%lu",
PartitionList->ActiveBootDisk->DiskNumber,
PartitionList->ActiveBootPartition->
PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionNumber);
RtlCreateUnicodeString(&SystemRootPath,
PathBuffer);
DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
PartitionType = PartitionList->ActiveBootPartition-> PartitionType = PartitionList->ActiveBootPartition->
PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType; PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType;