On Tue, Jan 12, 2010 at 09:47:43PM +0000, Carles Pina i Estany wrote: > Plan: > - Use the X11 layouts that usually are in /usr/share/X11/xkb/symbols . > - Create a new module that reads the layout from an environtment variable. > > * Approach 1 > The module will load the layout from /usr/share/X11/xkb/symbols/XX > replacing the array map that currently exists in > term/i386/pc/at_keyboard.c > > Negative points: > -Grub needs acces to /usr/share/X11/xkb/symbols to load the > layout > -xkb files doesn't look specially nice to parse (I think that I prefer > the .mo files :-) ). They are text files easy to understand for humans > > * Approach 2 > Small program (I guess that you prefer C, Python would be nice too) that > when Grub is installed would process the /usr/share/X11/xkb/symbols > files and generates the files that Grub will read. Code to read this > files would be much easier than before. > > This way, the layout tables could stay in /boot/grub/layouts . These > files would look like keycode - symbol pairs. Everything already in > binary, and only for the things that differ from English. > > So, if a layout has 40 different keycode-symbol pairs compared with > English, this would be 80 bytes per layout. Probably will be more, but > it should be of this order of magnitude.
I can't remember whether I mentioned this before, but have a look at the gfxboot-theme-ubuntu package in Ubuntu, specifically the scrape-console-setup script. It makes use of console-setup to process XKB keymaps into a form that can then be run through loadkeys and reformatted so that gfxboot can use them. A similar approach might be feasible in GRUB. (console-setup is Debian-specific, but perhaps we could incorporate the relevant bits of it in grub-extras, or do something else creative ...) -- Colin Watson [cjwat...@ubuntu.com] _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel