Allow HAL choice during first stage setup
Modified: trunk/reactos/bootdata/txtsetup.sif
Modified: trunk/reactos/subsys/system/usetup/infcache.c
Modified: trunk/reactos/subsys/system/usetup/settings.c
Modified: trunk/reactos/subsys/system/usetup/settings.h
Modified: trunk/reactos/subsys/system/usetup/usetup.c
Modified: trunk/reactos/tools/helper.mk
_____
Modified: trunk/reactos/bootdata/txtsetup.sif
--- trunk/reactos/bootdata/txtsetup.sif 2005-02-20 20:46:59 UTC (rev
13697)
+++ trunk/reactos/bootdata/txtsetup.sif 2005-02-20 22:40:30 UTC (rev
13698)
@@ -22,7 +22,6 @@
class2.sys = 3
disk.sys = 3
floppy.sys = 3
-hal.dll = 2
keyboard.sys = 3
l_intl.nls = 2
ntfs.sys = 3
@@ -48,7 +47,16 @@
[Computer]
pci_up = "Standard-PC"
+pci_mp = "Standard-PC Multiprocessor"
+[Files.pci_up]
+; <filename> = <directory_id>,<new name>
+hal.dll = 2
+
+[Files.pci_mp]
+; <filename> = <directory_id>,<new name>
+halmp.dll = 2,hal.dll
+
[Display]
;<id> = <user friendly name>,<spare>,<service key name>
vga = "VGA Display",,Vga
_____
Modified: trunk/reactos/subsys/system/usetup/infcache.c
--- trunk/reactos/subsys/system/usetup/infcache.c 2005-02-20
20:46:59 UTC (rev 13697)
+++ trunk/reactos/subsys/system/usetup/infcache.c 2005-02-20
22:40:30 UTC (rev 13698)
@@ -1294,7 +1294,7 @@
/* Iterate through list of sections */
CacheSection = Cache->FirstSection;
- while (Section != NULL)
+ while (CacheSection != NULL)
{
DPRINT("Comparing '%S' and '%S'\n",
CacheSection->Name, Section);
_____
Modified: trunk/reactos/subsys/system/usetup/settings.c
--- trunk/reactos/subsys/system/usetup/settings.c 2005-02-20
20:46:59 UTC (rev 13697)
+++ trunk/reactos/subsys/system/usetup/settings.c 2005-02-20
22:40:30 UTC (rev 13698)
@@ -29,6 +29,7 @@
#include "precomp.h"
#include <ntdll/rtl.h>
#include <ntos/minmax.h>
+#include <rosrtl/string.h>
#include "usetup.h"
#include "infcache.h"
@@ -352,7 +353,29 @@
return List;
}
+BOOLEAN
+ProcessComputerFiles(HINF InfFile, PGENERIC_LIST List, PWCHAR*
AdditionalSectionName)
+{
+ PGENERIC_LIST_ENTRY Entry;
+ static WCHAR SectionName[128];
+
+ DPRINT("ProcessComputerFiles() called\n");
+
+ Entry = GetGenericListEntry(List);
+ if (Entry == NULL)
+ {
+ DPRINT("GetGenericListEntry() failed\n");
+ return FALSE;
+ }
+
+ wcscpy(SectionName, L"Files.");
+ wcscat(SectionName, Entry->UserData);
+ *AdditionalSectionName = SectionName;
+
+ return TRUE;
+}
+
BOOLEAN
ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
{
_____
Modified: trunk/reactos/subsys/system/usetup/settings.h
--- trunk/reactos/subsys/system/usetup/settings.h 2005-02-20
20:46:59 UTC (rev 13697)
+++ trunk/reactos/subsys/system/usetup/settings.h 2005-02-20
22:40:30 UTC (rev 13698)
@@ -34,6 +34,11 @@
CreateDisplayDriverList(HINF InfFile);
BOOLEAN
+ProcessComputerFiles(HINF InfFile,
+ PGENERIC_LIST List,
+ PWCHAR* AdditionalSectionName);
+
+BOOLEAN
ProcessDisplayRegistry(HINF InfFile,
PGENERIC_LIST List);
_____
Modified: trunk/reactos/subsys/system/usetup/usetup.c
--- trunk/reactos/subsys/system/usetup/usetup.c 2005-02-20 20:46:59 UTC
(rev 13697)
+++ trunk/reactos/subsys/system/usetup/usetup.c 2005-02-20 22:40:30 UTC
(rev 13698)
@@ -2301,6 +2301,7 @@
#ifndef NDEBUG
ULONG Line;
ULONG i;
+ PLIST_ENTRY Entry;
#endif
@@ -2761,27 +2762,24 @@
static BOOLEAN
-PrepareCopyPageInfFile(HINF InfFile,
+AddSectionToCopyQueue(HINF InfFile,
+ PWCHAR SectionName,
PWCHAR SourceCabinet,
PINPUT_RECORD Ir)
{
- WCHAR PathBuffer[MAX_PATH];
INFCONTEXT FilesContext;
INFCONTEXT DirContext;
- PWCHAR KeyValue;
- ULONG Length;
- NTSTATUS Status;
PWCHAR FileKeyName;
PWCHAR FileKeyValue;
PWCHAR DirKeyValue;
PWCHAR TargetFileName;
-
- /* Search for the 'SourceFiles' section */
- if (!InfFindFirstLine (InfFile, L"SourceFiles", NULL, &FilesContext))
+
+ /* Search for the SectionName section */
+ if (!InfFindFirstLine (InfFile, SectionName, NULL, &FilesContext))
{
- PopupError("Setup failed to find the 'SourceFiles' section\n"
- "in TXTSETUP.SIF.\n", // FIXME
- "ENTER = Reboot computer");
+ char Buffer[128];
+ sprintf(Buffer, "Setup failed to find the '%S' section\nin
TXTSETUP.SIF.\n", SectionName);
+ PopupError(Buffer, "ENTER = Reboot computer");
while(TRUE)
{
@@ -2795,7 +2793,7 @@
}
/*
- * Enumerate the files in the 'SourceFiles' section
+ * Enumerate the files in the section
* and add them to the file queue.
*/
do
@@ -2842,8 +2840,38 @@
}
}
while (InfFindNextLine(&FilesContext, &FilesContext));
+
+ return TRUE;
+}
+static BOOLEAN
+PrepareCopyPageInfFile(HINF InfFile,
+ PWCHAR SourceCabinet,
+ PINPUT_RECORD Ir)
+{
+ WCHAR PathBuffer[MAX_PATH];
+ INFCONTEXT DirContext;
+ PWCHAR AdditionalSectionName;
+ PWCHAR KeyValue;
+ ULONG Length;
+ NTSTATUS Status;
+ /* Add common files */
+ if (!AddSectionToCopyQueue(InfFile, L"SourceFiles", SourceCabinet,
Ir))
+ return FALSE;
+
+ /* Add specific files depending of computer type */
+ if (SourceCabinet == NULL)
+ {
+ if (!ProcessComputerFiles(InfFile, ComputerList,
&AdditionalSectionName))
+ return FALSE;
+ if (AdditionalSectionName)
+ {
+ if (!AddSectionToCopyQueue(InfFile, AdditionalSectionName,
SourceCabinet, Ir))
+ return FALSE;
+ }
+ }
+
/* Create directories */
/*
_____
Modified: trunk/reactos/tools/helper.mk
--- trunk/reactos/tools/helper.mk 2005-02-20 20:46:59 UTC (rev
13697)
+++ trunk/reactos/tools/helper.mk 2005-02-20 22:40:30 UTC (rev
13698)
@@ -295,6 +295,12 @@
MK_RES_BASE := $(TARGET_NAME)
MK_INSTALL_BASENAME := hal
MK_INSTALL_FULLNAME := hal.dll
+ ifeq ($(TARGET_BOOTSTRAP),yes)
+ TARGET_BOOTSTRAP_NAME := hal.dll
+ else
+ TARGET_BOOTSTRAP_NAME := $(TARGET_NAME)$(MK_DEFEXT)
+ endif
+ TARGET_BOOTSTRAP := yes
endif
ifeq ($(TARGET_TYPE),bootpgm)