Author: hpoussin Date: Wed Jan 10 22:48:35 2007 New Revision: 25417
URL: http://svn.reactos.org/svn/reactos?rev=25417&view=rev Log: Disable some boot options on non-x86 platforms. You can enable them again for specific platforms if needed.
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c trunk/reactos/boot/freeldr/freeldr/custom.c trunk/reactos/boot/freeldr/freeldr/drivemap.c trunk/reactos/boot/freeldr/freeldr/include/drivemap.h trunk/reactos/boot/freeldr/freeldr/include/linux.h trunk/reactos/boot/freeldr/freeldr/include/miscboot.h trunk/reactos/boot/freeldr/freeldr/include/options.h trunk/reactos/boot/freeldr/freeldr/linuxboot.c trunk/reactos/boot/freeldr/freeldr/miscboot.c
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootmg... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/bootmgr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c Wed Jan 10 22:48:35 2007 @@ -119,11 +119,14 @@ }
// Install the drive mapper according to this sections drive mappings +#ifdef __i386__ DriveMapMapDrivesInSection(OperatingSystemSectionNames[SelectedOperatingSystem]); +#endif if (_stricmp(SettingValue, "ReactOS") == 0) { LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem]); } +#ifdef __i386__ else if (_stricmp(SettingValue, "WindowsNT40") == 0) { LoadAndBootWindows(OperatingSystemSectionNames[SelectedOperatingSystem], _WIN32_WINNT_NT4); @@ -156,6 +159,7 @@ { LoadAndBootDrive(OperatingSystemSectionNames[SelectedOperatingSystem]); } +#endif }
Modified: trunk/reactos/boot/freeldr/freeldr/custom.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/custom... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/custom.c (original) +++ trunk/reactos/boot/freeldr/freeldr/custom.c Wed Jan 10 22:48:35 2007 @@ -33,7 +33,15 @@
VOID OptionMenuCustomBoot(VOID) { - PCSTR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; + PCSTR CustomBootMenuList[] = { +#ifdef __i386__ + "Disk", + "Partition", + "Boot Sector File", + "ReactOS", + "Linux" +#endif /* __i386__ */ + }; ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); ULONG SelectedMenuItem;
@@ -45,6 +53,7 @@
switch (SelectedMenuItem) { +#ifdef __i386__ case 0: // Disk OptionMenuCustomBootDisk(); break; @@ -60,9 +69,11 @@ case 4: // Linux OptionMenuCustomBootLinux(); break; - } -} - +#endif /* __i386__ */ + } +} + +#ifdef __i386__ VOID OptionMenuCustomBootDisk(VOID) { CHAR SectionName[100]; @@ -397,3 +408,4 @@
LoadAndBootLinux(SectionName, "Custom Linux Setup"); } +#endif /* __i386__ */
Modified: trunk/reactos/boot/freeldr/freeldr/drivemap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/drivem... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/drivemap.c (original) +++ trunk/reactos/boot/freeldr/freeldr/drivemap.c Wed Jan 10 22:48:35 2007 @@ -22,6 +22,7 @@ #define NDEBUG #include <debug.h>
+#ifdef __i386__ BOOLEAN DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code ULONG OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler ULONG DriveMapHandlerAddress = 0; // Linear address of our drive map handler @@ -222,3 +223,4 @@ DriveMapInstalled = FALSE; } } +#endif /* __i386__ */
Modified: trunk/reactos/boot/freeldr/freeldr/include/drivemap.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/drivemap.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/drivemap.h Wed Jan 10 22:48:35 2007 @@ -20,7 +20,7 @@ #ifndef __DRIVEMAP_H #define __DRIVEMAP_H
- +#ifdef __i386__ typedef struct { UCHAR DriveMapCount; // Count of drives currently mapped @@ -39,5 +39,6 @@ extern PVOID DriveMapInt13HandlerEnd; extern ULONG DriveMapOldInt13HandlerAddress; extern DRIVE_MAP_LIST DriveMapInt13HandlerMapList; +#endif /* __i386__ */
#endif // #defined __DRIVEMAP_H
Modified: trunk/reactos/boot/freeldr/freeldr/include/linux.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/linux.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/linux.h Wed Jan 10 22:48:35 2007 @@ -22,7 +22,7 @@ #ifndef __LINUX_H #define __LINUX_H
- +#ifdef __i386__ #define LINUX_LOADER_TYPE_LILO 0x01 #define LINUX_LOADER_TYPE_LOADLIN 0x11 #define LINUX_LOADER_TYPE_BOOTSECT 0x21 @@ -135,5 +135,6 @@ BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile); BOOLEAN LinuxCheckKernelVersion(VOID); BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile); +#endif /* __i386__ */
#endif // defined __LINUX_H
Modified: trunk/reactos/boot/freeldr/freeldr/include/miscboot.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/miscboot.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/miscboot.h Wed Jan 10 22:48:35 2007 @@ -20,8 +20,10 @@ #ifndef __BOOT_H #define __BOOT_H
+#ifdef __i386__ VOID LoadAndBootBootSector(PCSTR OperatingSystemName); VOID LoadAndBootPartition(PCSTR OperatingSystemName); VOID LoadAndBootDrive(PCSTR OperatingSystemName); +#endif /* __i386__ */
#endif // defined __BOOT_H
Modified: trunk/reactos/boot/freeldr/freeldr/include/options.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/options.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/options.h Wed Jan 10 22:48:35 2007 @@ -25,10 +25,12 @@ VOID OptionMenuReboot(VOID);
VOID OptionMenuCustomBoot(VOID); +#ifdef __i386__ VOID OptionMenuCustomBootDisk(VOID); VOID OptionMenuCustomBootPartition(VOID); VOID OptionMenuCustomBootBootSectorFile(VOID); VOID OptionMenuCustomBootReactOS(VOID); VOID OptionMenuCustomBootLinux(VOID); +#endif /* __i386__ */
#endif // #defined __OPTIONS_H
Modified: trunk/reactos/boot/freeldr/freeldr/linuxboot.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/linuxb... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/linuxboot.c (original) +++ trunk/reactos/boot/freeldr/freeldr/linuxboot.c Wed Jan 10 22:48:35 2007 @@ -23,6 +23,7 @@ #define NDEBUG #include <debug.h>
+#ifdef __i386__ #define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
@@ -491,3 +492,4 @@
return TRUE; } +#endif /* __i386__ */
Modified: trunk/reactos/boot/freeldr/freeldr/miscboot.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/miscbo... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/miscboot.c (original) +++ trunk/reactos/boot/freeldr/freeldr/miscboot.c Wed Jan 10 22:48:35 2007 @@ -19,6 +19,7 @@
#include <freeldr.h>
+#ifdef __i386__ VOID LoadAndBootBootSector(PCSTR OperatingSystemName) { PFILE FilePointer; @@ -213,3 +214,4 @@ //DisableA20(); ChainLoadBiosBootSectorCode(); } +#endif /* __i386__ */