Author: evb Date: Thu Feb 4 16:59:22 2010 New Revision: 45420
URL: http://svn.reactos.org/svn/reactos?rev=45420&view=rev Log: - Fix text output - Allow for more than just one parameter on the bootROM command line (sepearate with commas). - Rdoffset is not hardcoded anymore, but passed on cmdline. Allows using images with different partition offsets.
Modified: trunk/reactos/boot/armllb/envir.c trunk/reactos/boot/armllb/hw/versatile/hwinit.c trunk/reactos/boot/armllb/hw/video.c
Modified: trunk/reactos/boot/armllb/envir.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/envir.c?rev=454... ============================================================================== --- trunk/reactos/boot/armllb/envir.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/envir.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -14,7 +14,8 @@ ULONG LlbEnvRamDiskStart; ULONG LlbEnvRamDiskSize; CHAR LlbEnvCmdLine[256]; - +CHAR LlbValueData[32]; + VOID NTAPI LlbEnvParseArguments(IN PATAG Arguments) @@ -105,14 +106,35 @@ NTAPI LlbEnvRead(IN PCHAR ValueName) { - PCHAR ValueData; + PCHAR ValuePointer; + ULONG Length = 0;
/* Search for the value name */ - ValueData = strstr(LlbEnvCmdLine, ValueName); - if (ValueData) ValueData += strlen(ValueName) + 1; + ValuePointer = strstr(LlbEnvCmdLine, ValueName); + if (ValuePointer) + { + /* Get the value data and its length */ + ValuePointer += strlen(ValueName) + 1; + if (strchr(ValuePointer, ',')) + { + /* Stop before next parameter */ + Length = strchr(ValuePointer, ',') - ValuePointer; + } + else + { + /* Stop before the string ends */ + Length = strlen(ValuePointer); + } + + /* Copy it */ + strncpy(LlbValueData, ValuePointer, Length); + } + + /* Terminate the data */ + LlbValueData[Length] = ANSI_NULL;
/* Return the data */ - return ValueData; + return LlbValueData; }
/* EOF */
Modified: trunk/reactos/boot/armllb/hw/versatile/hwinit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/hw... ============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -30,6 +30,7 @@ LlbHwLoadOsLoaderFromRam(VOID) { ULONG Base, RootFs, Size; + PCHAR Offset; CHAR CommandLine[64];
/* On versatile, the NAND image is loaded as the RAMDISK */ @@ -40,9 +41,12 @@
/* The OS loader is next, followed by the root file system */ RootFs = Base + 0x80000; // 512 KB (see nandflash) - + + /* Read image offset */ + Offset = LlbEnvRead("rdoffset"); + /* Set parameters for the OS loader */ - sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%d", RootFs, Size, 32256); + sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%s", RootFs, Size, Offset); LlbSetCommandLine(CommandLine);
/* Return the OS loader base address */
Modified: trunk/reactos/boot/armllb/hw/video.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/video.c?rev=... ============================================================================== --- trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/video.c [iso-8859-1] Thu Feb 4 16:59:22 2010 @@ -351,7 +351,7 @@
/* Amount of characters in a line */ ScreenWidth = LlbHwGetScreenWidth(); - CharsPerLine = ScreenWidth / FONT_HEIGHT; + CharsPerLine = ScreenWidth / 8;
/* Handle new line and scrolling */ if (c == '\n')