mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
- 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. svn path=/trunk/; revision=45420
This commit is contained in:
parent
fa8448cfec
commit
d8dbcc153f
3 changed files with 34 additions and 8 deletions
|
@ -14,7 +14,8 @@ ULONG LlbEnvHwMemSize;
|
|||
ULONG LlbEnvRamDiskStart;
|
||||
ULONG LlbEnvRamDiskSize;
|
||||
CHAR LlbEnvCmdLine[256];
|
||||
|
||||
CHAR LlbValueData[32];
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
LlbEnvParseArguments(IN PATAG Arguments)
|
||||
|
@ -105,14 +106,35 @@ PCHAR
|
|||
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 */
|
||||
|
|
|
@ -30,6 +30,7 @@ NTAPI
|
|||
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 @@ LlbHwLoadOsLoaderFromRam(VOID)
|
|||
|
||||
/* 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 */
|
||||
|
|
|
@ -351,7 +351,7 @@ LlbVideoPutChar(IN CHAR c)
|
|||
|
||||
/* Amount of characters in a line */
|
||||
ScreenWidth = LlbHwGetScreenWidth();
|
||||
CharsPerLine = ScreenWidth / FONT_HEIGHT;
|
||||
CharsPerLine = ScreenWidth / 8;
|
||||
|
||||
/* Handle new line and scrolling */
|
||||
if (c == '\n')
|
||||
|
|
Loading…
Reference in a new issue