From: Adam J. R. <ad...@yg...> - 2001-08-19 08:56:57
Attachments:
font.diff
|
Here is my first pass at modularizing the framebuffer console fonts. The benefits of this change are primarily for users who compile more than just the default console font in their kernel: o Saves unswappable kernel memory. o Enables smaller boot floppies (more drivers) and boot partitions. o At least after I get font unloading working, it will make it feasible to upgrade console font modules without rebooting. With this change, you do not have to have all of the console fonts that you would ever want to use without rebooting locked into kernel memory. Instead, you can just load the fonts that to use and still have the possibility to load other fonts later if you want. One big deficiency with this code is that it will not allow you to unload a font once it has been used, because I have not added any calls to my new release_font() routine. However, this is still no worse than the status quo. fbcon_find_font will now attempt to use modprobe to load a font that it fails to find; however, since the font names do not currently match the module names, you will need to edit your /etc/modules.conf file to make this work. Also, this functionality does not currently extend to fbcon_get_default_font, since it does not take a font name, although I could add a request_module("default_font") for users to define in /etc/modules.conf if they want, if nothing smarter can be done. All that I know about behavior of this patch right now is that it does not break my VGA console (which does not use these fonts, to the best of my knowledge). Since this new code causes fonts to initialized by module_init() declarations, and those routines are called rather late in kernel initialization, I suspect that there may be order of initialization problem with that, and would appreciate confirmation. -- Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 ad...@yg... \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us." |
From: Geert U. <ge...@li...> - 2001-08-19 09:54:10
|
On Sun, 19 Aug 2001, Adam J. Richter wrote: > Here is my first pass at modularizing the framebuffer console > fonts. The benefits of this change are primarily for users who > compile more than just the default console font in their kernel: > > o Saves unswappable kernel memory. > > o Enables smaller boot floppies (more drivers) and boot partitions. > > o At least after I get font unloading working, it will make > it feasible to upgrade console font modules without > rebooting. What's wrong with the ancient console ioctl()s to change the font at runtine? (damned, I can't remember the name of the command) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |
From: James S. <jsi...@tr...> - 2001-08-19 14:08:52
|
> What's wrong with the ancient console ioctl()s to change the font at runtine? > (damned, I can't remember the name of the command) Their is a bunch of them but the one mosted used is KD_FONT_OP_*. Look at linux/kd.h for more details. The nice bonus about this is that it is driver independent. |
From: James S. <jsi...@tr...> - 2001-08-19 14:12:16
|
See Geerts email about the proper solution. The only reason we have font images in the kernel is because fbdev devices usually don't have hardware fonts. Otherwise we wouldn't have them here. Personally I like to seem them __initdata so they go away after boot time. |