mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:16:17 +00:00
[FREELDR]
- Move architecture specific files all into arch/* - Rename setupldr2.c to setupldr.c - cleanup the mess in bootmgr.c svn path=/trunk/; revision=53422
This commit is contained in:
parent
e306e52267
commit
84ae0a0fa7
10 changed files with 21 additions and 46 deletions
|
@ -107,8 +107,8 @@ if(ARCH MATCHES i386)
|
||||||
arch/i386/xboxmem.c
|
arch/i386/xboxmem.c
|
||||||
arch/i386/xboxrtc.c
|
arch/i386/xboxrtc.c
|
||||||
arch/i386/xboxvideo.c
|
arch/i386/xboxvideo.c
|
||||||
windows/i386/ntsetup.c
|
arch/i386/ntsetup.c
|
||||||
windows/i386/wlmemory.c
|
arch/i386/wlmemory.c
|
||||||
windows/headless.c
|
windows/headless.c
|
||||||
disk/scsiport.c)
|
disk/scsiport.c)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
|
@ -134,8 +134,8 @@ elseif(ARCH MATCHES amd64)
|
||||||
arch/i386/pcmem.c
|
arch/i386/pcmem.c
|
||||||
arch/i386/pcrtc.c
|
arch/i386/pcrtc.c
|
||||||
arch/i386/pcvideo.c
|
arch/i386/pcvideo.c
|
||||||
windows/amd64/ntsetup.c
|
arch/amd64/ntsetup.c
|
||||||
windows/amd64/wlmemory.c)
|
arch/amd64/wlmemory.c)
|
||||||
else()
|
else()
|
||||||
#TBD
|
#TBD
|
||||||
endif()
|
endif()
|
||||||
|
@ -191,7 +191,7 @@ list(APPEND SETUPLDR_SOURCE
|
||||||
inffile/inffile.c)
|
inffile/inffile.c)
|
||||||
|
|
||||||
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
|
||||||
list(APPEND SETUPLDR_SOURCE windows/setupldr2.c)
|
list(APPEND SETUPLDR_SOURCE windows/setupldr.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
|
|
|
@ -213,7 +213,7 @@ VOID RunLoader(VOID)
|
||||||
if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL)
|
if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL)
|
||||||
{
|
{
|
||||||
// Try to infere boot type value
|
// Try to infere boot type value
|
||||||
#ifdef __i386__
|
#ifdef _M_IX86
|
||||||
ULONG FileId;
|
ULONG FileId;
|
||||||
if (ArcOpen((CHAR*)SectionName, OpenReadOnly, &FileId) == ESUCCESS)
|
if (ArcOpen((CHAR*)SectionName, OpenReadOnly, &FileId) == ESUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -231,20 +231,15 @@ VOID RunLoader(VOID)
|
||||||
IniOpenSection("Operating Systems", &SectionId);
|
IniOpenSection("Operating Systems", &SectionId);
|
||||||
IniReadSettingByName(SectionId, SectionName, SettingValue, sizeof(SettingValue));
|
IniReadSettingByName(SectionId, SectionName, SettingValue, sizeof(SettingValue));
|
||||||
|
|
||||||
#ifndef _M_ARM
|
|
||||||
// Install the drive mapper according to this sections drive mappings
|
// Install the drive mapper according to this sections drive mappings
|
||||||
#if defined(__i386__) && !defined(_MSC_VER)
|
#if defined(_M_IX86) && !defined(_MSC_VER)
|
||||||
DriveMapMapDrivesInSection(SectionName);
|
DriveMapMapDrivesInSection(SectionName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FREELDR_REACTOS_SETUP
|
#ifdef FREELDR_REACTOS_SETUP
|
||||||
if (_stricmp(BootType, "ReactOSSetup2") == 0)
|
|
||||||
{
|
|
||||||
// WinLdr-style boot
|
// WinLdr-style boot
|
||||||
LoadReactOSSetup2();
|
LoadReactOSSetup2();
|
||||||
}
|
#elif defined(_M_IX86)
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#ifdef __i386__
|
|
||||||
if (_stricmp(BootType, "Windows") == 0)
|
if (_stricmp(BootType, "Windows") == 0)
|
||||||
{
|
{
|
||||||
LoadAndBootWindows(SectionName, SettingValue, 0);
|
LoadAndBootWindows(SectionName, SettingValue, 0);
|
||||||
|
@ -273,13 +268,11 @@ VOID RunLoader(VOID)
|
||||||
{
|
{
|
||||||
LoadAndBootDrive(SectionName);
|
LoadAndBootDrive(SectionName);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03);
|
LoadAndBootWindows(SectionName, SettingValue, _WIN32_WINNT_WS03);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
reboot:
|
reboot:
|
||||||
UiUnInitialize("Rebooting...");
|
UiUnInitialize("Rebooting...");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
<file>xboxmem.c</file>
|
<file>xboxmem.c</file>
|
||||||
<file>xboxrtc.c</file>
|
<file>xboxrtc.c</file>
|
||||||
<file>xboxvideo.c</file>
|
<file>xboxvideo.c</file>
|
||||||
|
<file>ntsetup.c</file>
|
||||||
|
<file>wlmemory.c</file>
|
||||||
</if>
|
</if>
|
||||||
</directory>
|
</directory>
|
||||||
<directory name="powerpc">
|
<directory name="powerpc">
|
||||||
|
@ -69,6 +71,8 @@
|
||||||
<if property="ARCH" value="amd64">
|
<if property="ARCH" value="amd64">
|
||||||
<directory name="amd64">
|
<directory name="amd64">
|
||||||
<file>loader.c</file>
|
<file>loader.c</file>
|
||||||
|
<file>ntsetup.c</file>
|
||||||
|
<file>wlmemory.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
<directory name="i386">
|
<directory name="i386">
|
||||||
<file>hardware.c</file>
|
<file>hardware.c</file>
|
||||||
|
@ -87,25 +91,10 @@
|
||||||
</directory>
|
</directory>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</directory>
|
|
||||||
|
|
||||||
<directory name="windows">
|
|
||||||
<if property="ARCH" value="arm">
|
<if property="ARCH" value="arm">
|
||||||
<directory name="arm">
|
<directory name="arm">
|
||||||
<file>wlmemory.c</file>
|
<file>wlmemory.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
</if>
|
</if>
|
||||||
<if property="ARCH" value="i386">
|
|
||||||
<directory name="i386">
|
|
||||||
<file>ntsetup.c</file>
|
|
||||||
<file>wlmemory.c</file>
|
|
||||||
</directory>
|
|
||||||
</if>
|
|
||||||
<if property="ARCH" value="amd64">
|
|
||||||
<directory name="amd64">
|
|
||||||
<file>ntsetup.c</file>
|
|
||||||
<file>wlmemory.c</file>
|
|
||||||
</directory>
|
|
||||||
</if>
|
|
||||||
</directory>
|
</directory>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -9,14 +9,7 @@
|
||||||
<directory name="inffile">
|
<directory name="inffile">
|
||||||
<file>inffile.c</file>
|
<file>inffile.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
<if property="ARCH" value="i386">
|
|
||||||
<directory name="windows">
|
<directory name="windows">
|
||||||
<file>setupldr2.c</file>
|
<file>setupldr.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
</if>
|
|
||||||
<if property="ARCH" value="amd64">
|
|
||||||
<directory name="windows">
|
|
||||||
<file>setupldr2.c</file>
|
|
||||||
</directory>
|
|
||||||
</if>
|
|
||||||
</module>
|
</module>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue