mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +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 LlbEnvRamDiskStart;
|
||||||
ULONG LlbEnvRamDiskSize;
|
ULONG LlbEnvRamDiskSize;
|
||||||
CHAR LlbEnvCmdLine[256];
|
CHAR LlbEnvCmdLine[256];
|
||||||
|
CHAR LlbValueData[32];
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
LlbEnvParseArguments(IN PATAG Arguments)
|
LlbEnvParseArguments(IN PATAG Arguments)
|
||||||
|
@ -105,14 +106,35 @@ PCHAR
|
||||||
NTAPI
|
NTAPI
|
||||||
LlbEnvRead(IN PCHAR ValueName)
|
LlbEnvRead(IN PCHAR ValueName)
|
||||||
{
|
{
|
||||||
PCHAR ValueData;
|
PCHAR ValuePointer;
|
||||||
|
ULONG Length = 0;
|
||||||
|
|
||||||
/* Search for the value name */
|
/* Search for the value name */
|
||||||
ValueData = strstr(LlbEnvCmdLine, ValueName);
|
ValuePointer = strstr(LlbEnvCmdLine, ValueName);
|
||||||
if (ValueData) ValueData += strlen(ValueName) + 1;
|
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 the data */
|
||||||
return ValueData;
|
return LlbValueData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -30,6 +30,7 @@ NTAPI
|
||||||
LlbHwLoadOsLoaderFromRam(VOID)
|
LlbHwLoadOsLoaderFromRam(VOID)
|
||||||
{
|
{
|
||||||
ULONG Base, RootFs, Size;
|
ULONG Base, RootFs, Size;
|
||||||
|
PCHAR Offset;
|
||||||
CHAR CommandLine[64];
|
CHAR CommandLine[64];
|
||||||
|
|
||||||
/* On versatile, the NAND image is loaded as the RAMDISK */
|
/* 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 */
|
/* The OS loader is next, followed by the root file system */
|
||||||
RootFs = Base + 0x80000; // 512 KB (see nandflash)
|
RootFs = Base + 0x80000; // 512 KB (see nandflash)
|
||||||
|
|
||||||
|
/* Read image offset */
|
||||||
|
Offset = LlbEnvRead("rdoffset");
|
||||||
|
|
||||||
/* Set parameters for the OS loader */
|
/* 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);
|
LlbSetCommandLine(CommandLine);
|
||||||
|
|
||||||
/* Return the OS loader base address */
|
/* Return the OS loader base address */
|
||||||
|
|
|
@ -351,7 +351,7 @@ LlbVideoPutChar(IN CHAR c)
|
||||||
|
|
||||||
/* Amount of characters in a line */
|
/* Amount of characters in a line */
|
||||||
ScreenWidth = LlbHwGetScreenWidth();
|
ScreenWidth = LlbHwGetScreenWidth();
|
||||||
CharsPerLine = ScreenWidth / FONT_HEIGHT;
|
CharsPerLine = ScreenWidth / 8;
|
||||||
|
|
||||||
/* Handle new line and scrolling */
|
/* Handle new line and scrolling */
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
|
|
Loading…
Reference in a new issue