seems to work now. A lot is still missing though
This commit is contained in:
parent
ffa9860a86
commit
50739170db
6 changed files with 15 additions and 17 deletions
|
@ -25,7 +25,8 @@
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GRUB_MACHINE_MEMORY_STACK_HIGH 0x81000000
|
#define GRUB_MACHINE_MEMORY_STACK_HIGH 0x80f00000
|
||||||
|
#define GRUB_MACHINE_MEMORY_USABLE 0x81000000
|
||||||
|
|
||||||
#define GRUB_MACHINE_MEMORY_AVAILABLE 1
|
#define GRUB_MACHINE_MEMORY_AVAILABLE 1
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#elif defined (GRUB_CPU_MIPS)
|
#elif defined (GRUB_CPU_MIPS)
|
||||||
/* mips is big-endian. */
|
/* mips is big-endian. */
|
||||||
#define GRUB_TARGET_WORDS_BIGENDIAN
|
#define GRUB_TARGET_WORDS_BIGENDIAN
|
||||||
#else
|
#elif !defined (GRUB_SYMBOL_GENERATOR)
|
||||||
#error Neither GRUB_CPU_MIPS nor GRUB_CPU_MIPSEL is defined
|
#error Neither GRUB_CPU_MIPS nor GRUB_CPU_MIPSEL is defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
17
kern/dl.c
17
kern/dl.c
|
@ -342,6 +342,7 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case STT_NOTYPE:
|
case STT_NOTYPE:
|
||||||
|
case STT_OBJECT:
|
||||||
/* Resolve a global symbol. */
|
/* Resolve a global symbol. */
|
||||||
if (sym->st_name != 0 && sym->st_shndx == 0)
|
if (sym->st_name != 0 && sym->st_shndx == 0)
|
||||||
{
|
{
|
||||||
|
@ -351,15 +352,13 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
|
||||||
"the symbol `%s' not found", name);
|
"the symbol `%s' not found", name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sym->st_value = 0;
|
{
|
||||||
break;
|
sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
|
||||||
|
sym->st_shndx);
|
||||||
case STT_OBJECT:
|
if (bind != STB_LOCAL)
|
||||||
sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
|
if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
|
||||||
sym->st_shndx);
|
return grub_errno;
|
||||||
if (bind != STB_LOCAL)
|
}
|
||||||
if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
|
|
||||||
return grub_errno;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STT_FUNC:
|
case STT_FUNC:
|
||||||
|
|
|
@ -22,9 +22,8 @@ grub_get_rtc (void)
|
||||||
void
|
void
|
||||||
grub_machine_init (void)
|
grub_machine_init (void)
|
||||||
{
|
{
|
||||||
void *tst;
|
grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_USABLE,
|
||||||
grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_STACK_HIGH,
|
RAMSIZE - (GRUB_MACHINE_MEMORY_USABLE & 0x7fffffff));
|
||||||
RAMSIZE - (GRUB_MACHINE_MEMORY_STACK_HIGH & 0x7fffffff));
|
|
||||||
grub_install_get_time_ms (grub_rtc_get_time_ms);
|
grub_install_get_time_ms (grub_rtc_get_time_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,6 @@ grub_getcharwidth (grub_uint32_t code)
|
||||||
int
|
int
|
||||||
grub_getkey (void)
|
grub_getkey (void)
|
||||||
{
|
{
|
||||||
int c;
|
|
||||||
if (!grub_cur_term_input)
|
if (!grub_cur_term_input)
|
||||||
return 0;
|
return 0;
|
||||||
return (grub_cur_term_input->getkey) ();
|
return (grub_cur_term_input->getkey) ();
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <grub/extcmd.h>
|
#include <grub/extcmd.h>
|
||||||
|
|
||||||
#define TEXT_WIDTH 80
|
#define TEXT_WIDTH 80
|
||||||
#define TEXT_HEIGHT 25
|
#define TEXT_HEIGHT 24
|
||||||
|
|
||||||
static unsigned int xpos, ypos;
|
static unsigned int xpos, ypos;
|
||||||
static unsigned int keep_track = 1;
|
static unsigned int keep_track = 1;
|
||||||
|
@ -370,7 +370,7 @@ grub_serial_putchar (grub_uint32_t c)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
if (ypos < TEXT_HEIGHT)
|
if (ypos < TEXT_HEIGHT - 1)
|
||||||
ypos++;
|
ypos++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue