Build FREELDR.SYS and SETUPLDR.SYS in a single make run.
authorEric Kohl <eric.kohl@reactos.org>
Sat, 31 Aug 2002 18:09:31 +0000 (18:09 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 31 Aug 2002 18:09:31 +0000 (18:09 +0000)
Fixed build process for SETUPLDR.SYS.

svn path=/trunk/; revision=3445

freeldr/freeldr/CHANGELOG
freeldr/freeldr/Makefile
freeldr/freeldr/bootmgr.c
freeldr/freeldr/freeldr.c
freeldr/freeldr/include/bootmgr.h
freeldr/freeldr/include/freeldr.h
freeldr/freeldr/include/version.h
freeldr/freeldr/reactos/setupldr.c

index 742db0b..dfedc88 100644 (file)
@@ -1,3 +1,13 @@
+Changes in v1.7.6 (8/31/2002) (ekohl)
+
+- bootsect/isoboot.asm: Reduced read transfer size to ensure that
+  the read buffer for an int13/ah=42h (exended read) does not
+  cross a segment boundary.
+- freeldr.c, bootmgr.c, setupldr.c, makefile: Renamed
+  LoadBootManager() and ReactOSRunSetupLoader() to RunLoader().
+  Either bootmgr.o or setupldr.o is used to build freeldr.sys or
+  setupldr.sys  
+
 Changes in v1.7.5 (8/21/2002) (brianp)
 
 - biosvid.S (BiosVideoDisableBlinkBit): Added code to
 Changes in v1.7.5 (8/21/2002) (brianp)
 
 - biosvid.S (BiosVideoDisableBlinkBit): Added code to
index f16515c..ec23042 100644 (file)
@@ -124,13 +124,7 @@ else
 COMPILER_DEBUG_DEFINES =
 endif
 
 COMPILER_DEBUG_DEFINES =
 endif
 
-ifeq ($(MAKECMDGOALS),setupldr)
-COMPILER_SETUPLDR_DEFINES = -D__SETUPLDR__
-else
-COMPILER_SETUPLDR_DEFINES =
-endif
-
-COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES) $(COMPILER_SETUPLDR_DEFINES)
+COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES)
 
 #############################################
 # INCLUDE DIRECTORY OPTIONS
 
 #############################################
 # INCLUDE DIRECTORY OPTIONS
@@ -206,8 +200,7 @@ REACTOS_OBJS=       reactos.o       \
                                arcname.o       \
                                hwdetect.o      \
                                reghive.o       \
                                arcname.o       \
                                hwdetect.o      \
                                reghive.o       \
-                               registry.o      \
-                               setupldr.o
+                               registry.o
 
 COMM_OBJS      =       rs232.o         \
                                portio.o
 
 COMM_OBJS      =       rs232.o         \
                                portio.o
@@ -234,21 +227,21 @@ VIDEO_OBJS        =       video.o         \
 # This code was taken from the GCC v3.1 source
 MATH_OBJS      =       libgcc2.o
 
 # This code was taken from the GCC v3.1 source
 MATH_OBJS      =       libgcc2.o
 
-FREELDR_OBJS=  freeldr.o       \
-                               miscboot.o      \
-                               options.o       \
-                               linuxboot.o     \
+BASE_OBJS      =       freeldr.o \
+                               debug.o \
+                               drivemap.o \
                                multiboot.o     \
                                multiboot.o     \
-                               debug.o         \
-                               oslist.o        \
-                               bootmgr.o       \
-                               drivemap.o      \
                                version.o
 
                                version.o
 
-#############################################
-# ALL THE OBJECTS
-#
-OBJS           =       $(ARCH_OBJS)            \
+FREELDR_OBJS=  bootmgr.o \
+                               miscboot.o \
+                               options.o \
+                               linuxboot.o     \
+                               oslist.o
+
+SETUPLDR_OBJS= setupldr.o
+
+COMMON_OBJS    =       $(ARCH_OBJS)            \
                                $(RTL_OBJS)                     \
                                $(FS_OBJS)                      \
                                $(UI_OBJS)                      \
                                $(RTL_OBJS)                     \
                                $(FS_OBJS)                      \
                                $(UI_OBJS)                      \
@@ -260,8 +253,22 @@ OBJS               =       $(ARCH_OBJS)            \
                                $(INIFILE_OBJS)         \
                                $(VIDEO_OBJS)           \
                                $(MATH_OBJS)            \
                                $(INIFILE_OBJS)         \
                                $(VIDEO_OBJS)           \
                                $(MATH_OBJS)            \
+                               $(BASE_OBJS)
+
+F_OBJS         =       $(COMMON_OBJS)          \
                                $(FREELDR_OBJS)
 
                                $(FREELDR_OBJS)
 
+S_OBJS         =       $(COMMON_OBJS)          \
+                               $(SETUPLDR_OBJS)
+
+#############################################
+# ALL THE OBJECTS
+#
+ALL_OBJS       =       $(COMMON_OBJS)          \
+                               $(FREELDR_OBJS)         \
+                               $(SETUPLDR_OBJS)
+
+
 #############################################
 # SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
 #
 #############################################
 # SET THE VPATH SO MAKE CAN FIND THE SOURCE FILES
 #
@@ -282,30 +289,25 @@ VPATH             =       $(SRCDIR)/                                      \
 
 #############################################
 
 
 #############################################
 
-all : freeldr.sys
+all : freeldr.sys setupldr.sys
        @echo Make ALL done.
 
 #############################################
 
        @echo Make ALL done.
 
 #############################################
 
-freeldr.sys : $(OBJS)
+freeldr.sys : $(ALL_OBJS)
        @echo ===================================================== LINKING $@
        @echo ===================================================== LINKING $@
-#      @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(OBJS)
-       @$(LD) $(LFLAGS) -Map freeldr.map -o freeldr.exe $(OBJS)
-#      @$(CC) -Wl,-Ttext=0x8000,-N,-Map,freeldr.map -o freeldr.exe $(OBJS)
+#      @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o freeldr.sys $(F_OBJS)
+       @$(LD) $(LFLAGS) -Map freeldr.map -o freeldr.exe $(F_OBJS)
+#      @$(CC) -Wl,-Ttext=0x8000,-N,-Map,freeldr.map -o freeldr.exe $(F_OBJS)
        @$(NM) --numeric-sort freeldr.exe > freeldr.sym
        @$(OBJCOPY) -O binary freeldr.exe freeldr.sys
 
 #############################################
 
        @$(NM) --numeric-sort freeldr.exe > freeldr.sym
        @$(OBJCOPY) -O binary freeldr.exe freeldr.sys
 
 #############################################
 
-setupldr : setupldr.sys
-       @echo Make SETUPLDR done.
-
-#############################################
-
-setupldr.sys : $(OBJS)
+setupldr.sys : $(ALL_OBJS)
        @echo ===================================================== LINKING $@
        @echo ===================================================== LINKING $@
-#      @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o setupldr.sys $(OBJS)
-       @$(LD) $(LFLAGS) -Map setupldr.map -o setupldr.exe $(OBJS)
+#      @$(LD) -N -Ttext=0x8000 --oformat=binary -s -o setupldr.sys $(S_OBJS)
+       @$(LD) $(LFLAGS) -Map setupldr.map -o setupldr.exe $(S_OBJS)
        @$(NM) --numeric-sort setupldr.exe > setupldr.sym
        @$(OBJCOPY) -O binary setupldr.exe setupldr.sys
 
        @$(NM) --numeric-sort setupldr.exe > setupldr.sym
        @$(OBJCOPY) -O binary setupldr.exe setupldr.sys
 
@@ -328,7 +330,7 @@ setupldr.sys : $(OBJS)
 #############################################
 
 # Include the automagically generated dependencies
 #############################################
 
 # Include the automagically generated dependencies
--include $(OBJS:%.o=%.d)
+-include $(ALL_OBJS:%.o=%.d)
 
 #############################################
 
 
 #############################################
 
index c3465d5..8fc802c 100644 (file)
@@ -33,7 +33,7 @@
 #include <bootmgr.h>
 #include <drivemap.h>
 
 #include <bootmgr.h>
 #include <drivemap.h>
 
-VOID RunBootManager(VOID)
+VOID RunLoader(VOID)
 {
        UCHAR   SettingName[80];
        UCHAR   SettingValue[80];
 {
        UCHAR   SettingName[80];
        UCHAR   SettingValue[80];
index 2f7d88a..eb71b62 100644 (file)
@@ -47,9 +47,5 @@ VOID BootMain(VOID)
                return;
        }
 
                return;
        }
 
-#ifdef __SETUPLDR__
-       ReactOSRunSetupLoader();
-#else
-       RunBootManager();
-#endif // defined __SETUPLDR__
+       RunLoader();
 }
 }
index 3cb7118..38d5e9b 100644 (file)
@@ -21,7 +21,6 @@
 #define __BOOTMGR_H
 
 
 #define __BOOTMGR_H
 
 
-VOID   RunBootManager(VOID);
 U32            GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount);
 S32            GetTimeOut(VOID);
 
 U32            GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount);
 S32            GetTimeOut(VOID);
 
index bde31f7..d3e8aea 100644 (file)
@@ -70,5 +70,6 @@ extern U32                    BootPartition;          // Boot Partition, 1-4
 extern BOOL                    UserInterfaceUp;        // Tells us if the user interface is displayed
 
 void   BootMain(void);
 extern BOOL                    UserInterfaceUp;        // Tells us if the user interface is displayed
 
 void   BootMain(void);
+VOID   RunLoader(VOID);
 
 #endif  // defined __FREELDR_H
 
 #endif  // defined __FREELDR_H
index fbe270f..785811d 100644 (file)
@@ -22,7 +22,7 @@
 
 
 /* just some stuff */
 
 
 /* just some stuff */
-#define VERSION                        "FreeLoader v1.7.5"
+#define VERSION                        "FreeLoader v1.7.6"
 #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       5
+#define FREELOADER_PATCH_VERSION       6
 
 
 PUCHAR GetFreeLoaderVersionString(VOID);
 
 
 PUCHAR GetFreeLoaderVersionString(VOID);
index b3df3e7..04547ee 100644 (file)
@@ -32,6 +32,9 @@
 #include "registry.h"
 #include "hwdetect.h"
 
 #include "registry.h"
 #include "hwdetect.h"
 
-VOID ReactOSRunSetupLoader(VOID)
+VOID RunLoader(VOID)
 {
 {
+  printf("RunLoader() called!\n");
+  printf("*** System stopped ***\n");
+  for(;;);
 }
 }