2010-01-10 Robert Millan <rmh.grub@aybabtu.com>

* loader/i386/ieee1275/linux.c (grub_linux_boot): Rework video position
	initialization with similar approach as with other Linux loaders.
This commit is contained in:
Robert Millan 2010-01-10 01:43:42 +00:00
parent 0e60bae74e
commit f0d0c0b726
2 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/ieee1275/linux.c (grub_linux_boot): Rework video position
initialization with similar approach as with other Linux loaders.
2010-01-10 Robert Millan <rmh.grub@aybabtu.com>
Fix i386-ieee1275 build.

View File

@ -110,8 +110,29 @@ grub_linux_boot (void)
params->cl_magic = GRUB_LINUX_CL_MAGIC;
params->cl_offset = GRUB_OFW_LINUX_CL_OFFSET;
params->video_width = grub_term_width (term);
params->video_height = grub_term_height (term);
{
grub_term_output_t term;
int found = 0;
FOR_ACTIVE_TERM_OUTPUTS(term)
if (grub_strcmp (term->name, "ofconsole") == 0)
{
grub_uint16_t pos = grub_term_getxy (term);
params->video_cursor_x = pos >> 8;
params->video_cursor_y = pos & 0xff;
params->video_width = grub_term_width (term);
params->video_height = grub_term_height (term);
found = 1;
break;
}
if (!found)
{
params->video_cursor_x = 0;
params->video_cursor_y = 0;
params->video_width = 80;
params->video_height = 25;
}
}
params->font_size = 16;
params->ofw_signature = GRUB_LINUX_OFW_SIGNATURE;