Author: hbelusca
Date: Fri Jun 2 16:22:45 2017
New Revision: 74749
URL: http://svn.reactos.org/svn/reactos?rev=74749&view=rev
Log:
[CMAKE]: Make the mkhive commands actually depend on the generated UTF16 INF files since the latter are those actually used as input to mkhive. Otherwise, the mkhive calls & the UTF16 INF file conversion is not serialized and we can generate "corrupted" hives due to the fact that mkhive is using INF files that are in the process of being (and therefore, only partially) generated.
Modified:
branches/setup_improvements/sdk/cmake/CMakeMacros.cmake
Modified: branches/setup_improvements/sdk/cmake/CMakeMacros.cmake
URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/cmake/CM…
==============================================================================
--- branches/setup_improvements/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/setup_improvements/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Fri Jun 2 16:22:45 2017
@@ -766,7 +766,7 @@
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/boot/bootdata/SETUPREG.HIV
COMMAND native-mkhive -h:SETUPREG -d:${CMAKE_BINARY_DIR}/boot/bootdata ${CMAKE_BINARY_DIR}/boot/bootdata/hivesys_utf16.inf
- DEPENDS native-mkhive ${CMAKE_SOURCE_DIR}/boot/bootdata/hivesys.inf)
+ DEPENDS native-mkhive ${CMAKE_BINARY_DIR}/boot/bootdata/hivesys_utf16.inf)
add_custom_target(bootcd_hives
DEPENDS ${CMAKE_BINARY_DIR}/boot/bootdata/SETUPREG.HIV)
@@ -814,7 +814,7 @@
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/boot/bootdata/BCD
COMMAND native-mkhive -h:BCD -d:${CMAKE_BINARY_DIR}/boot/bootdata ${CMAKE_BINARY_DIR}/boot/bootdata/hivebcd_utf16.inf
- DEPENDS native-mkhive ${CMAKE_SOURCE_DIR}/boot/bootdata/hivebcd.inf)
+ DEPENDS native-mkhive ${CMAKE_BINARY_DIR}/boot/bootdata/hivebcd_utf16.inf)
add_custom_target(bcd_hive
DEPENDS ${CMAKE_BINARY_DIR}/boot/bootdata/BCD)
Author: hbelusca
Date: Fri Jun 2 15:49:12 2017
New Revision: 74748
URL: http://svn.reactos.org/svn/reactos?rev=74748&view=rev
Log:
[NTOS]: Add some dprints in IopLoadServiceModule() and IopOpenRegistryKeyEx() to investigate why these 1st-stage text-mode hacks may, or are (respectively) still needed.
Modified:
branches/setup_improvements/ntoskrnl/io/iomgr/driver.c
Modified: branches/setup_improvements/ntoskrnl/io/iomgr/driver.c
URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/ntoskrnl/io/…
==============================================================================
--- branches/setup_improvements/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ branches/setup_improvements/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Fri Jun 2 15:49:12 2017
@@ -322,6 +322,7 @@
if (ExpInTextModeSetup)
{
/* We have no registry, but luckily we know where all the drivers are */
+ DPRINT1("IopLoadServiceModule(%wZ, 0x%p) called in ExpInTextModeSetup mode...\n", ServiceName, ModuleObject);
/* ServiceStart < 4 is all that matters */
ServiceStart = 0;
@@ -1127,8 +1128,13 @@
NULL,
&BootEntry->RegistryPath,
KEY_READ);
+ DPRINT1("IopOpenRegistryKeyEx(%wZ) returned 0x%08lx\n", &BootEntry->RegistryPath, Status);
+#if 0
+ if (NT_SUCCESS(Status))
+#else // Hack still needed...
if ((NT_SUCCESS(Status)) || /* ReactOS HACK for SETUPLDR */
((KeLoaderBlock->SetupLdrBlock) && ((KeyHandle = (PVOID)1)))) // yes, it's an assignment!
+#endif
{
/* Save the handle */
DriverInfo->ServiceHandle = KeyHandle;
@@ -1205,7 +1211,7 @@
PUNICODE_STRING *DriverList, *SavedList;
/* No system drivers on the boot cd */
- if (KeLoaderBlock->SetupLdrBlock) return;
+ if (KeLoaderBlock->SetupLdrBlock) return; // ExpInTextModeSetup
/* Get the driver list */
SavedList = DriverList = CmGetSystemDriverList();
Author: hbelusca
Date: Fri Jun 2 00:44:04 2017
New Revision: 74742
URL: http://svn.reactos.org/svn/reactos?rev=74742&view=rev
Log:
[USETUP]: Creating a registry key with zero access is just plainly invalid. Fix it. It was not caught before because, we never ever booted a 1st-stage setup with a valid mounted existing SYSTEM key (as Windows does).
Modified:
trunk/reactos/base/setup/usetup/interface/devinst.c
Modified: trunk/reactos/base/setup/usetup/interface/devinst.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/devinst.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/devinst.c [iso-8859-1] Fri Jun 2 00:44:04 2017
@@ -341,7 +341,7 @@
}
InitializeObjectAttributes(&ObjectAttributes, &ServicesU, OBJ_CASE_INSENSITIVE, NULL, NULL);
- Status = NtCreateKey(&hServices, 0, &ObjectAttributes, 0, NULL, 0, NULL);
+ Status = NtCreateKey(&hServices, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL, 0, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateKey('%wZ') failed with status 0x%08lx\n", &ServicesU, Status);