Got iso-fs working again.
authorEric Kohl <eric.kohl@reactos.org>
Thu, 5 Sep 2002 15:31:45 +0000 (15:31 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Thu, 5 Sep 2002 15:31:45 +0000 (15:31 +0000)
Implemented very simple setup loader.

svn path=/trunk/; revision=3460

freeldr/freeldr/CHANGELOG
freeldr/freeldr/fs/iso.c
freeldr/freeldr/include/version.h
freeldr/freeldr/reactos/setupldr.c

index dfedc88..a3185f0 100644 (file)
@@ -1,3 +1,8 @@
+Changes in v1.7.7 (9/5/2002) (ekohl)
+
+- fs/iso.c: Got iso-fs working again.
+- reactos/setupldr.c: Implemented very simple setup loader.
+
 Changes in v1.7.6 (8/31/2002) (ekohl)
 
 - bootsect/isoboot.asm: Reduced read transfer size to ensure that
 Changes in v1.7.6 (8/31/2002) (ekohl)
 
 - bootsect/isoboot.asm: Reduced read transfer size to ensure that
index 61d2d70..a2a6dea 100644 (file)
 
 #include <freeldr.h>
 #include <fs.h>
 
 #include <freeldr.h>
 #include <fs.h>
-#include "iso.h"
 #include <disk.h>
 #include <rtl.h>
 #include <disk.h>
 #include <rtl.h>
-#include <ui.h>
 #include <arch.h>
 #include <mm.h>
 #include <debug.h>
 #include <cache.h>
 
 #include <arch.h>
 #include <mm.h>
 #include <debug.h>
 #include <cache.h>
 
+#include "iso.h"
+
 
 #define SECTORSIZE 2048
 
 
 #define SECTORSIZE 2048
 
@@ -39,7 +39,7 @@ U32                   IsoDriveNumber = 0;
 
 BOOL IsoOpenVolume(U32 DriveNumber)
 {
 
 BOOL IsoOpenVolume(U32 DriveNumber)
 {
-       PPVD Pvd;
+       PPVD Pvd = (PPVD)DISKREADBUFFER;
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoOpenVolume() DriveNumber = 0x%x VolumeStartSector = 16\n", DriveNumber));
 
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoOpenVolume() DriveNumber = 0x%x VolumeStartSector = 16\n", DriveNumber));
 
@@ -49,20 +49,15 @@ BOOL IsoOpenVolume(U32 DriveNumber)
        IsoRootSector = 0;
        IsoRootLength = 0;
 
        IsoRootSector = 0;
        IsoRootLength = 0;
 
-       Pvd = MmAllocateMemory(SECTORSIZE);
-
        if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Pvd))
        {
                FileSystemError("Failed to read the PVD.");
        if (!DiskReadLogicalSectors(DriveNumber, 16, 1, Pvd))
        {
                FileSystemError("Failed to read the PVD.");
-               MmFreeMemory(Pvd);
                return FALSE;
        }
 
        IsoRootSector = Pvd->RootDirRecord.ExtentLocationL;
        IsoRootLength = Pvd->RootDirRecord.DataLengthL;
 
                return FALSE;
        }
 
        IsoRootSector = Pvd->RootDirRecord.ExtentLocationL;
        IsoRootLength = Pvd->RootDirRecord.DataLengthL;
 
-       MmFreeMemory(Pvd);
-
        DbgPrint((DPRINT_FILESYSTEM, "IsoRootSector = %u  IsoRootLegth = %u\n", IsoRootSector, IsoRootLength));
 
        return TRUE;
        DbgPrint((DPRINT_FILESYSTEM, "IsoRootSector = %u  IsoRootLegth = %u\n", IsoRootSector, IsoRootLength));
 
        return TRUE;
@@ -72,13 +67,13 @@ BOOL IsoOpenVolume(U32 DriveNumber)
 static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
 {
        PDIR_RECORD     Record;
 static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
 {
        PDIR_RECORD     Record;
-       U32                     Offset;
+       U32             Offset;
        U32 i;
        UCHAR Name[32];
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
 
        U32 i;
        UCHAR Name[32];
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName));
 
-       memset(Name, 0, 32 * sizeof(UCHAR));
+       RtlZeroMemory(Name, 32 * sizeof(UCHAR));
 
        Offset = 0;
        Record = (PDIR_RECORD)DirectoryBuffer;
 
        Offset = 0;
        Record = (PDIR_RECORD)DirectoryBuffer;
@@ -123,21 +118,32 @@ static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 Directory
                if (Offset >= DirectoryLength)
                        return FALSE;
 
                if (Offset >= DirectoryLength)
                        return FALSE;
 
-               memset(Name, 0, 32 * sizeof(UCHAR));
+               RtlZeroMemory(Name, 32 * sizeof(UCHAR));
        }
 
        return FALSE;
 }
 
 
        }
 
        return FALSE;
 }
 
 
-
+/*
+ * IsoBufferDirectory()
+ * This function allocates a buffer, reads the specified directory
+ * and returns a pointer to that buffer. The function returns NULL
+ * if allocation or read fails. The directory is specified by its
+ * starting sector and length.
+ */
 static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength)
 {
        PVOID   DirectoryBuffer;
 static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength)
 {
        PVOID   DirectoryBuffer;
+       PVOID   Ptr;
        U32     SectorCount;
        U32     SectorCount;
+       U32     i;
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength));
 
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength));
 
+       SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
+       DbgPrint((DPRINT_FILESYSTEM, "Trying to read (DirectoryCount) %d sectors.\n", SectorCount));
+
        //
        // Attempt to allocate memory for directory buffer
        //
        //
        // Attempt to allocate memory for directory buffer
        //
@@ -149,16 +155,17 @@ static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength)
                return NULL;
        }
 
                return NULL;
        }
 
-       SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
-       DbgPrint((DPRINT_FILESYSTEM, "Trying to read (DirectoryCount) %d sectors.\n", SectorCount));
-
        //
        // Now read directory contents into DirectoryBuffer
        //
        //
        // Now read directory contents into DirectoryBuffer
        //
-       if (!DiskReadLogicalSectors(IsoDriveNumber, DirectoryStartSector, SectorCount, DirectoryBuffer))
+       for (i = 0, Ptr = DirectoryBuffer; i < SectorCount; i++, Ptr += SECTORSIZE)
        {
        {
-               MmFreeMemory(DirectoryBuffer);
-               return NULL;
+               if (!DiskReadLogicalSectors(IsoDriveNumber, DirectoryStartSector + i, 1, (PVOID)DISKREADBUFFER))
+               {
+                       MmFreeMemory(DirectoryBuffer);
+                       return NULL;
+               }
+               RtlCopyMemory(Ptr, (PVOID)DISKREADBUFFER, SECTORSIZE);
        }
 
        return DirectoryBuffer;
        }
 
        return DirectoryBuffer;
@@ -184,7 +191,7 @@ static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName));
 
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName));
 
-       memset(IsoFileInfoPointer, 0, sizeof(ISO_FILE_INFO));
+       RtlZeroMemory(IsoFileInfoPointer, sizeof(ISO_FILE_INFO));
 
        //
        // Figure out how many sub-directories we are nested in
 
        //
        // Figure out how many sub-directories we are nested in
@@ -244,7 +251,7 @@ static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
 
        }
 
 
        }
 
-       memcpy(IsoFileInfoPointer, &IsoFileInfo, sizeof(ISO_FILE_INFO));
+       RtlCopyMemory(IsoFileInfoPointer, &IsoFileInfo, sizeof(ISO_FILE_INFO));
 
        return TRUE;
 }
 
        return TRUE;
 }
@@ -274,42 +281,12 @@ FILE* IsoOpenFile(PUCHAR FileName)
                return NULL;
        }
 
                return NULL;
        }
 
-       memcpy(FileHandle, &TempFileInfo, sizeof(ISO_FILE_INFO));
+       RtlCopyMemory(FileHandle, &TempFileInfo, sizeof(ISO_FILE_INFO));
 
        return (FILE*)FileHandle;
 }
 
 
 
        return (FILE*)FileHandle;
 }
 
 
-/*
- * IsoReadPartialSector()
- * Reads part of a cluster into memory
- */
-static BOOL IsoReadPartialSector(U32 SectorNumber, U32 StartingOffset, U32 Length, PVOID Buffer)
-{
-       PUCHAR  SectorBuffer;
-
-       DbgPrint((DPRINT_FILESYSTEM, "IsoReadPartialSector() SectorNumber = %d StartingOffset = %d Length = %d Buffer = 0x%x\n", SectorNumber, StartingOffset, Length, Buffer));
-
-       SectorBuffer = MmAllocateMemory(SECTORSIZE);
-       if (SectorBuffer == NULL)
-       {
-               return FALSE;
-       }
-
-       if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, SectorBuffer))
-       {
-               MmFreeMemory(SectorBuffer);
-               return FALSE;
-       }
-
-       memcpy(Buffer, ((PVOID)SectorBuffer + StartingOffset), Length);
-
-       MmFreeMemory(SectorBuffer);
-
-       return TRUE;
-}
-
-
 /*
  * IsoReadFile()
  * Reads BytesToRead from open file and
 /*
  * IsoReadFile()
  * Reads BytesToRead from open file and
@@ -322,6 +299,7 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer
        U32             OffsetInSector;
        U32             LengthInSector;
        U32             NumberOfSectors;
        U32             OffsetInSector;
        U32             LengthInSector;
        U32             NumberOfSectors;
+       U32             i;
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer));
 
 
        DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer));
 
@@ -394,10 +372,11 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer
                //
                // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                //
                //
                // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                //
-               if (!IsoReadPartialSector(SectorNumber, OffsetInSector, LengthInSector, Buffer))
+               if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
                {
                        return FALSE;
                }
                {
                        return FALSE;
                }
+               RtlCopyMemory(Buffer, ((PVOID)DISKREADBUFFER + OffsetInSector), LengthInSector);
                if (BytesRead != NULL)
                {
                        *BytesRead += LengthInSector;
                if (BytesRead != NULL)
                {
                        *BytesRead += LengthInSector;
@@ -417,24 +396,27 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer
                //
                NumberOfSectors = (BytesToRead / SECTORSIZE);
 
                //
                NumberOfSectors = (BytesToRead / SECTORSIZE);
 
-               if (NumberOfSectors > 0)
+               for (i = 0; i < NumberOfSectors; i++)
                {
                        SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
 
                        //
                        // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                        //
                {
                        SectorNumber = IsoFileInfo->FileStart + (IsoFileInfo->FilePointer / SECTORSIZE);
 
                        //
                        // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                        //
-                       if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, NumberOfSectors, Buffer))
+                       if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
                        {
                                return FALSE;
                        }
                        {
                                return FALSE;
                        }
+
+                       RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, SECTORSIZE);
+
                        if (BytesRead != NULL)
                        {
                        if (BytesRead != NULL)
                        {
-                               *BytesRead += (NumberOfSectors * SECTORSIZE);
+                               *BytesRead += SECTORSIZE;
                        }
                        }
-                       BytesToRead -= (NumberOfSectors * SECTORSIZE);
-                       IsoFileInfo->FilePointer += (NumberOfSectors * SECTORSIZE);
-                       Buffer += (NumberOfSectors * SECTORSIZE);
+                       BytesToRead -= SECTORSIZE;
+                       IsoFileInfo->FilePointer += SECTORSIZE;
+                       Buffer += SECTORSIZE;
                }
        }
 
                }
        }
 
@@ -448,10 +430,11 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer
                //
                // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                //
                //
                // Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
                //
-               if (!IsoReadPartialSector(SectorNumber, 0, BytesToRead, Buffer))
+               if (!DiskReadLogicalSectors(IsoDriveNumber, SectorNumber, 1, (PVOID)DISKREADBUFFER))
                {
                        return FALSE;
                }
                {
                        return FALSE;
                }
+               RtlCopyMemory(Buffer, (PVOID)DISKREADBUFFER, BytesToRead);
                if (BytesRead != NULL)
                {
                        *BytesRead += BytesToRead;
                if (BytesRead != NULL)
                {
                        *BytesRead += BytesToRead;
@@ -461,7 +444,7 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer
                Buffer += BytesToRead;
        }
 
                Buffer += BytesToRead;
        }
 
-       printf("IsoReadFile() done\n");
+       DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() done\n"));
 
        return TRUE;
 }
 
        return TRUE;
 }
index 785811d..e2c88fd 100644 (file)
@@ -22,7 +22,7 @@
 
 
 /* just some stuff */
 
 
 /* just some stuff */
-#define VERSION                        "FreeLoader v1.7.6"
+#define VERSION                        "FreeLoader v1.7.7"
 #define COPYRIGHT              "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
 #define AUTHOR_EMAIL   "<brianp@sginet.com>"
 #define BY_AUTHOR              "by Brian Palmer"
 #define COPYRIGHT              "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
 #define AUTHOR_EMAIL   "<brianp@sginet.com>"
 #define BY_AUTHOR              "by Brian Palmer"
@@ -36,7 +36,7 @@
 //
 #define FREELOADER_MAJOR_VERSION       1
 #define FREELOADER_MINOR_VERSION       7
 //
 #define FREELOADER_MAJOR_VERSION       1
 #define FREELOADER_MINOR_VERSION       7
-#define FREELOADER_PATCH_VERSION       6
+#define FREELOADER_PATCH_VERSION       7
 
 
 PUCHAR GetFreeLoaderVersionString(VOID);
 
 
 PUCHAR GetFreeLoaderVersionString(VOID);
index 04547ee..d3ad672 100644 (file)
 #include <reactos.h>
 #include <rtl.h>
 #include <fs.h>
 #include <reactos.h>
 #include <rtl.h>
 #include <fs.h>
-#include <ui.h>
 #include <multiboot.h>
 #include <mm.h>
 #include <multiboot.h>
 #include <mm.h>
-#include <inifile.h>
 
 #include "registry.h"
 #include "hwdetect.h"
 
 
 #include "registry.h"
 #include "hwdetect.h"
 
+
+static BOOL
+LoadKernel(PCHAR szFileName)
+{
+  PFILE FilePointer;
+  PCHAR szShortName;
+
+  szShortName = strrchr(szFileName, '\\');
+  if (szShortName == NULL)
+    szShortName = szFileName;
+  else
+    szShortName = szShortName + 1;
+
+  FilePointer = OpenFile(szFileName);
+  if (FilePointer == NULL)
+    {
+      printf("Could not find %s\n", szShortName);
+      return(FALSE);
+    }
+
+  /*
+   * Update the status bar with the current file
+   */
+  printf("Reading %s\n", szShortName);
+
+  /*
+   * Load the kernel
+   */
+  MultiBootLoadKernel(FilePointer);
+
+  return(TRUE);
+}
+
+
+static BOOL
+LoadDriver(PCHAR szFileName)
+{
+  PFILE FilePointer;
+  PCHAR szShortName;
+
+  szShortName = strrchr(szFileName, '\\');
+  if (szShortName == NULL)
+    szShortName = szFileName;
+  else
+    szShortName = szShortName + 1;
+
+
+  FilePointer = OpenFile(szFileName);
+  if (FilePointer == NULL)
+    {
+      printf("Could not find %s\n", szFileName);
+      return(FALSE);
+    }
+
+  /*
+   * Update the status bar with the current file
+   */
+  printf("Reading %s\n", szShortName);
+
+  /* Load the driver */
+  MultiBootLoadModule(FilePointer, szFileName, NULL);
+
+  return(TRUE);
+}
+
+
 VOID RunLoader(VOID)
 {
   printf("RunLoader() called!\n");
 VOID RunLoader(VOID)
 {
   printf("RunLoader() called!\n");
-  printf("*** System stopped ***\n");
-  for(;;);
+
+  /* Setup multiboot information structure */
+  mb_info.flags = MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES;
+  mb_info.mem_lower = GetConventionalMemorySize();
+  mb_info.mem_upper = GetExtendedMemorySize();
+  mb_info.boot_device = 0xffffffff;
+  mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
+  mb_info.mods_count = 0;
+  mb_info.mods_addr = (unsigned long)multiboot_modules;
+  mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP_ARRAY)&multiboot_memory_map);
+  if (mb_info.mmap_length)
+    {
+      mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
+      mb_info.flags |= MB_INFO_FLAG_MEMORY_MAP;
+#if 0
+      printf("memory map length: %d\n", mb_info.mmap_length);
+      printf("dumping memory map:\n");
+      for (i=0; i<(mb_info.mmap_length / 4); i++)
+       {
+         printf("0x%x\n", ((unsigned long *)&multiboot_memory_map)[i]);
+       }
+      getch();
+#endif
+    }
+#if 0
+       //printf("low_mem = %d\n", mb_info.mem_lower);
+       //printf("high_mem = %d\n", mb_info.mem_upper);
+       //getch();
+#endif
+
+  /* Initialize registry */
+  RegInitializeRegistry();
+
+  /* Detect hardware */
+  printf("Detecting hardware...");
+  DetectHardware();
+
+  /* set boot drive and partition */
+  ((char *)(&mb_info.boot_device))[0] = (char)BootDrive;
+  ((char *)(&mb_info.boot_device))[1] = (char)BootPartition;
+
+  /* Copy ARC path into kernel command line */
+  sprintf(multiboot_kernel_cmdline,
+         "multi(0)disk(0)cdrom(%u)\\reactos  /DEBUGPORT=SCREEN",
+         (unsigned int)BootDrive);
+
+  /* Open boot drive */
+  if (!OpenDiskDrive(BootDrive, BootPartition))
+    {
+      printf("Failed to open boot drive.");
+      return;
+    }
+
+  /* Load ntoskrnl.exe */
+  if (!LoadKernel("\\reactos\\ntoskrnl.exe"))
+    return;
+
+
+  /* Load hal.dll */
+  if (!LoadDriver("\\reactos\\hal.dll"))
+    return;
+
+
+       /*
+        * Export the system and hardware hives
+        */
+//     Base = MultiBootCreateModule(SYSTEM.HIV);
+//     RegExportHive("\\Registry\\Machine\\SYSTEM", Base, &Size);
+//     MultiBootCloseModule(Base, Size);
+
+//     Base = MultiBootCreateModule(HARDWARE.HIV);
+//     RegExportHive("\\Registry\\Machine\\HARDWARE", Base, &Size);
+//     MultiBootCloseModule(Base, Size);
+
+
+
+
+       /*
+        * Load NLS files
+        */
+#if 0
+       if (!LoadNlsFiles(szBootPath))
+       {
+               MessageBox("Failed to load NLS files\n");
+               return;
+       }
+#endif
+
+
+       /*
+        * Load scsiport.sys
+        */
+       if (!LoadDriver("\\reactos\\scsiport.sys"))
+               return;
+
+       /*
+        * Load atapi.sys (depends on hardware detection)
+        */
+       if (!LoadDriver("\\reactos\\atapi.sys"))
+               return;
+
+       /*
+        * Load class2.sys
+        */
+       if (!LoadDriver("\\reactos\\class2.sys"))
+               return;
+
+       /*
+        * Load cdrom.sys
+        */
+       if (!LoadDriver("\\reactos\\cdrom.sys"))
+               return;
+
+       /*
+        * Load cdfs.sys
+        */
+       if (!LoadDriver("\\reactos\\cdfs.sys"))
+               return;
+
+       /*
+        * Load floppy.sys (only in case of a floppy disk setup!)
+        */
+//     if (!LoadDriver("\\reactos\\floppy.sys"))
+//             return;
+
+       /*
+        * Load disk.sys
+        */
+       if (!LoadDriver("\\reactos\\disk.sys"))
+               return;
+
+       /*
+        * Load vfatfs.sys (could be loaded by the setup prog!)
+        */
+       if (!LoadDriver("\\reactos\\vfatfs.sys"))
+               return;
+
+       /*
+        * Load keyboard driver
+        */
+       if (!LoadDriver("\\reactos\\keyboard.sys"))
+               return;
+
+       /*
+        * Load screen driver
+        */
+       if (!LoadDriver("\\reactos\\blue.sys"))
+               return;
+
+       /*
+        * Now boot the kernel
+        */
+       StopFloppyMotor();
+       boot_reactos();
+
+
+//  printf("*** System stopped ***\n");
+//  for(;;);
 }
 }