Author: ros-arm-bringup
Date: Thu Feb 7 08:25:37 2008
New Revision: 32176
URL: http://svn.reactos.org/svn/reactos?rev=32176&view=rev
Log:
We now return failed in FrLdrMapImage if the file could not be read.
FreeLDR ARM now loads properly, however, we need to start building the ARM kernel and ARM boot drivers, otherwise their relocations will have byte offsets which will lead to alignment errors (on ARM relocaitons are DWORD-aligned).
Next steps are to get the kernel building, then the HAL, then bootvid/kdcom.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c Thu Feb 7 08:25:37 2008
@@ -13,6 +13,7 @@
/* GLOBALS ********************************************************************/
PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock;
+ULONG BootDrive, BootPartition;
/* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/imageldr.c Thu Feb 7 08:25:37 2008
@@ -492,13 +492,18 @@
/* Allocate a temporary buffer for the read */
ReadBuffer = MmHeapAlloc(ImageSize);
-
+
/* Load the file image */
- FsReadFile(Image, ImageSize, NULL, ReadBuffer);
-
+ if (!FsReadFile(Image, ImageSize, NULL, ReadBuffer))
+ {
+ /* Fail */
+ DbgPrint("Failed to read image: %s\n", Name);
+ return NULL;
+ }
+
/* Map it into virtual memory */
ImageSize = FrLdrReMapImage(ReadBuffer, LoadBase);
-
+
/* Free the temporary buffer */
MmHeapFree(ReadBuffer);