grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fixed ieee1275 console


From: Marcin Kurek
Subject: Re: [PATCH] Fixed ieee1275 console
Date: Mon, 15 Oct 2007 22:43:59 +0200

Hell[o]

> I prefer if it can be detected if this is Efika or for example an
> apple implementation of OF and handle these characters depending on
> that.  IIRC this code does work on the apple, but unfortunately I
> cannot check this anymore.

Attached current console patchset. The graphical frames workaround is
used only for SmartFirmware then Apple machines should get cp437
frames normaly. Sorry still no time to split it :( Anyway I will try
to explain a bit each of them.

========

Simple Console: Generaly it seems cp437 frames are used on pc, same
for simple frames using '-' characters which are used for ncurses
console and serial console on pc. I think keep same code in many
places is not so good idea then I moved conversion rutines in to one
place and introduce two term flags GRUB_TERM_SIMPLE_MENU and
GRUB_TERM_CP437_MENU.

In case when term has GRUB_TERM_SIMPLE_MENU set it would automaticly
use '-' frames and same for GRUB_TERM_CP437_MENU to use cp437 frames.
If no flags is set there would be no charset translation for frames.

Cosmetic: In general I see no reason to use multiple
grub_ieee1275_write() calls if we can use single one. Nothing
important, but good to have IMHO.

Backspace: As I already wrote my version of OF seems to sent \b &&
<del> sequence for backspace key. This change cause no side effects on
Efika (USB keyboard) and Pegasos 1 with PS/2 keyboard. Can anyone
check it on Apple OF ? In case of any troubles we can still use a
IEEE1275 flag to use it only for SmartFw.

OFConsole: A biggest patch in pack. Generaly the grub console is
completly broken here (Pegasos 1 && 2, Efika) The x/y cursor tracking
not works as expect to and cursor position is random after few written
lines.

Generaly I introduce realy working x/y position tracking and in result
this give me a working console output in all cases (no random cursor
position after 'ls' command, no empty screen after more than one
output, etc)

Second change was detection of console type (serial, screen,
framebuffer) The reason was to draw frames which looks good in all
three. Default ofconsole uses now simple frames (same for serial
console) and switch to cp437 frames if detect normal screen console,
unfortunatly if of uses framebuffer mode (efika, unofficial OF upgrade
for Pegasos 2) we can not use this frame type as framebuffer font lack
required characters. The reason why framebuffer mode and serial mode
are separated is planned vesa support as I already have a basic vesa
framework we will be able to use it when finished (Then simple frames
on serial console, cp437 on normal console and graphical frames on
framebuffer)

This code uses some new flags:

GRUB_IEEE1275_FLAG_NOFB_ROWS25: For some reason all versions of SF has
25 rows on normal console, but report only 24 which broke the grub
console. This flag was added to workaround this problem.

GRUB_IEEE1275_FLAG_NOCLS: Pegasos 1 OF seems to not interpret the cls
escape then if detected we use \n workaround.

GRUB_IEEE1275_FLAG_BPLAN_LOGO: Arghhh, we can use cp437 frames on
pegasos, but it seems a parts of characters used by grub are replaced
by bPlan logo. Use a workaround proposed here in this case and in a
result have a nice looking grub menu on pegasos/efika too.

I hope I explain everything here. In another e-mail I attach rest of
my patches for grub.

-- 
--- Marcin 'Morgoth' Kurek ---

Attachment: 01-grub2-simple_console.patch
Description: Text Data

Attachment: 02-grub2-ofconsole_cosmetic.patch
Description: Text Data

Attachment: 03-grub2-ofconsole_backspace.patch
Description: Text Data

Attachment: 04-grub2-ofconsole_fix.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]