From caee5efd313a3f95babb176cc710ff193fcdb81f Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 3 Apr 2011 15:30:28 +0200 Subject: [PATCH] GRUB developper manual based on existing Internals section and contributions by the various authors with active copyright assignment. * docs/Makefile.am (info_TEXINFOS): Add grub-dev.texi. * docs/font_char_metrics.png: New file. * docs/font_char_metrics.txt: Likewise. * docs/grub-dev.texi: Likewise. * docs/grub.texi (Internals): Move from here ... * docs/grub-dev.texi: ... here. --- ChangeLog | 12 + docs/Makefile.am | 2 +- docs/font_char_metrics.png | Bin 0 -> 16443 bytes docs/font_char_metrics.txt | 1 + docs/grub-dev.texi | 1515 ++++++++++++++++++++++++++++++++++++ docs/grub.texi | 106 --- 6 files changed, 1529 insertions(+), 107 deletions(-) create mode 100644 docs/font_char_metrics.png create mode 100644 docs/font_char_metrics.txt create mode 100644 docs/grub-dev.texi diff --git a/ChangeLog b/ChangeLog index fb6875c69..47bb01e7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-04-02 Vladimir Serbinenko + + GRUB developper manual based on existing Internals section and + contributions by the various authors with active copyright assignment. + + * docs/Makefile.am (info_TEXINFOS): Add grub-dev.texi. + * docs/font_char_metrics.png: New file. + * docs/font_char_metrics.txt: Likewise. + * docs/grub-dev.texi: Likewise. + * docs/grub.texi (Internals): Move from here ... + * docs/grub-dev.texi: ... here. + 2011-04-01 Colin Watson Store the loopback device as data on loopback grub_disk structures, diff --git a/docs/Makefile.am b/docs/Makefile.am index 8d9fb8445..6e1500601 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = subdir-objects # AM_MAKEINFOFLAGS = --no-split --no-validate -info_TEXINFOS = grub.texi +info_TEXINFOS = grub.texi grub-dev.texi grub_TEXINFOS = fdl.texi diff --git a/docs/font_char_metrics.png b/docs/font_char_metrics.png new file mode 100644 index 0000000000000000000000000000000000000000..8d10d1f645e3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Mv50T!;4$b12>Dt+^=AK9|lOr)17!15www60Ca;4px7hw03js|BUC9=U~|t zvYp-J@5bQW)fo@L;DVPn)>z9NDevC@TQjcvVomrk7byC21qhFL`tB&xJeb^V$l;~g`r*MpjHUb3N`>~~ z5{duG#9ux)4*g#%@!SW?IC*+gE1~eKnySvwNHy=FqpUNgI&xeE&D`b-pt;QU#4=W% z#ncKb{EMDRurs{&z=opcfFiE?*vplI>$^Rw$$JeBvJz)nJ~|h49@oQ^Ih^t)&h)IJi;Y(On8vWFx^=VZ&uT zp!Lsz?_$9*@u46AK&_`?>MkQ&DFGtxGdq|LKma}NQ)?=Mr#RR2wbJ|4IDbAJVex;T z;Xwhyvo2Ua8u8e-KWCGatGsi?~Qu#w5l-7SNTWo(}n#L|Bh{L_S6=BihP-bgXPxm9h8g5LOe;5!N(;R<8jJ( +@c Date: 8 January 2009 + +@menu +* Introduction:: +* File Structure:: +* Font Metrics:: +@end menu + + +@node Introduction +@section Introduction + +The goal of this format is to provide a bitmap font format that is simple to +use, compact, and cleanly supports Unicode. + + +@subsection Goals of the GRUB Font Format + +@itemize +@item Simple to read and use. + Since GRUB will only be reading the font files, + we are more concerned with making the code to read the font simple than we + are with writing the font. + +@item Compact storage. + The fonts will generally be stored in a small boot + partition where GRUB is located, and this may be on a removable storage + device such as a CD or USB flash drive where space is more limited than it + is on most hard drives. + +@item Unicode. + GRUB should not have to deal with multiple character + encodings. The font should always use Unicode character codes for simple + internationalization. +@end itemize + +@subsection Why Another Font Format? + +There are many existing bitmap font formats that GRUB could use. However, +there are aspects of these formats that may make them less than suitable for +use in GRUB at this time: + +@table @samp +@item BDF + Inefficient storage; uses ASCII to describe properties and + hexadecimal numbers in ASCII for the bitmap rows. +@item PCF + Many format variations such as byte order and bitmap padding (rows + padded to byte, word, etc.) would result in more complex code to + handle the font format. +@end table + +@node File Structure +@section File Structure + +A file *section* consists of a 4-byte name, a 32-bit big-endian length (not +including the name or length), and then *length* more section-type-specific +bytes. + +The standard file extension for PFF2 font files is ``.pf2``. + + +@subsection Section Types + +@table @samp +@item FILE + *File type ID* (ASCII string). This must be the first section in the file. It has length 4 + and the contents are the four bytes of the ASCII string ``PFF2``. + +@item NAME + *Font name* (ASCII string). This is the full font name including family, + weight, style, and point size. For instance, "Helvetica Bold Italic 14". + +@item FAMI + *Font family name* (ASCII string). For instance, "Helvetica". This should + be included so that intelligent font substitution can take place. + +@item WEIG + *Font weight* (ASCII string). Valid values are ``bold`` and ``normal``. + This should be included so that intelligent font substitution can take + place. + +@item SLAN + *Font slant* (ASCII string). Valid values are ``italic`` and ``normal``. + This should be included so that intelligent font substitution can take + place. + +@item PTSZ + *Font point size* (uint16be). + +@item MAXW + *Maximum character width in pixels* (uint16be). + +@item MAXH + *Maximum character height in pixels* (uint16be). + +@item ASCE + *Ascent in pixels* (uint16be). See `Font Metrics`_ for details. + +@item DESC + *Descent in pixels* (uint16be). See `Font Metrics`_ for details. + +@item CHIX + *Character index.* + The character index begins with a 32-bit big-endian unsigned integer + indicating the total size of the section, not including this size value. + For each character, there is an instance of the following entry structure: + + @itemize + @item **Unicode code point.** (32-bit big-endian integer.) + + @item **Storage flags.** (byte.) + + @itemize + @item Bits 2..0: + + - If equal to 000 binary, then the character data is stored + uncompressed beginning at the offset indicated by the character's + *offset* value. + + - If equal to 001 binary, then the character data is stored within a + compressed character definition block that begins at the offset + within the file indicated by the character's *offset* value. + @end itemize + @item **Offset.** (32-bit big-endian integer.) + + A marker that indicates the remainder of the file is data accessed via + the character index (CHIX) section. When reading this font file, the rest + of the file can be ignored when scanning the sections. The length should + be set to -1 (0xFFFFFFFF). + + Supported data structures: + + Character definition + Each character definition consists of: + + @itemize + @item **Width.** Width of the bitmap in pixels. The bitmap's extents + represent the glyph's bounding box. *uint16be*. + + @item **Height.** Height of the bitmap in pixels. The bitmap's extents + represent the glyph's bounding box. *uint16be*. + + @item **X offset.** The number of pixels to shift the bitmap by + horizontally before drawing the character. *int16be*. + + @item **Y offset.** The number of pixels to shift the bitmap by + vertically before drawing the character. *int16be*. + + @item **Device width.** The number of pixels to advance horizontally from + this character's origin to the origin of the next character. + *int16be*. + + @item **Bitmap data.** This is encoded as a string of bits. It is + organized as a row-major, top-down, left-to-right bitmap. The most + significant bit of each byte is taken to be the leftmost or uppermost + bit in the byte. For the sake of compact storage, rows are not padded + to byte boundaries (i.e., a single byte may contain bits belonging to + multiple rows). The last byte of the bitmap *is* padded with zero + bits in the bits positions to the right of the last used bit if the + bitmap data does not fill the last byte. + + The length of the *bitmap data* field is (*width* * *height* + 7) / 8 + using integer arithmetic, which is equivalent to ceil(*width* * + *height* / 8) using real number arithmetic. + + It remains to be determined whether bitmap fonts usually make all + glyph bitmaps the same height, or if smaller glyphs are stored with + bitmaps having a lesser height. In the latter case, the baseline + would have to be used to calculate the location the bitmap should be + anchored at on screen. + @end itemize + + @end itemize +@end table + +@node Font Metrics +@section Font Metrics + +@itemize +@item Ascent. + The distance from the baseline to the top of most characters. + Note that in some cases characters may extend above the ascent. + +@item Descent. + The distance from the baseline to the bottom of most characters. Note that + in some cases characters may extend below the descent. + +@item Leading. + The amount of space, in pixels, to leave between the descent of one line of + text and the ascent of the next line. This metrics is not specified in the + current file format; instead, the font rendering engine calculates a + reasonable leading value based on the other font metrics. + +@item Horizonal leading. + The amount of space, in pixels, to leave horizontally between the left and + right edges of two adjacent glyphs. The *device width* field determines + the effective leading value that is used to render the font. + +@end itemize +@image{font_char_metrics,,,,.png} + + An illustration of how the various font metrics apply to characters. + + + +@node Graphical Menu Software Design +@chapter Graphical Menu Software Design + +@c By Colin D. Bennett +@c Date: 17 August 2008 + +@menu +* Introduction_2:: +* Startup Sequence:: +* GUI Components:: +* Command Line Window:: +@end menu + +@node Introduction_2 +@section Introduction + +The ``gfxmenu`` module provides a graphical menu interface for GRUB 2. It +functions as an alternative to the menu interface provided by the ``normal`` +module, which uses the grub terminal interface to display a menu on a +character-oriented terminal. + +The graphical menu uses the GRUB video API, which is currently for the VESA +BIOS extensions (VBE) 2.0+. This is supported on the i386-pc platform. +However, the graphical menu itself does not depend on using VBE, so if another +GRUB video driver were implemented, the ``gfxmenu`` graphical menu would work +on the new video driver as well. + + +@node Startup Sequence +@section Startup Sequence + +@itemize +@item grub_enter_normal_mode [normal/main.c] +@item grub_normal_execute [normal/main.c] +@item read_config_file [normal/main.c] +@item (When ``gfxmenu.mod`` is loaded with ``insmod``, it will call ``grub_menu_viewer_register()`` to register itself.) +@item GRUB_MOD_INIT (gfxmenu) [gfxmenu/gfxmenu.c] +@item grub_menu_viewer_register [kern/menu_viewer.c] +@item grub_menu_viewer_show_menu [kern/menu_viewer.c] +@item get_current_menu_viewer() [kern/menu_viewer.c] +@item show_menu() [gfxmenu/gfxmenu.c] +@item grub_gfxmenu_model_new [gfxmenu/model.c] +@item grub_gfxmenu_view_new [gfxmenu/view.c] +@item set_graphics_mode [gfxmenu/view.c] +@item grub_gfxmenu_view_load_theme [gfxmenu/theme_loader.c] +@end itemize + + +@node GUI Components +@section GUI Components + +The graphical menu implements a GUI component system that supports a +container-based layout system. Components can be added to containers, and +containers (which are a type of component) can then be added to other +containers, to form a tree of components. Currently, the root component of +this tree is a *canvas* component, which allows manual layout of its child +components. + +Components (non-container): + +@itemize +@item label +@item image +@item progress_bar +@item circular_progress +@item list (currently hard coded to be a boot menu list) +@end itemize + +Containers: + +@itemize +@item canvas +@item hbox +@item vbox +@end itemize + +The GUI component instances are created by the theme loader in +``gfxmenu/theme_loader.c`` when a theme is loaded. Theme files specify +statements such as ``+vbox@{ +label @{ text="Hello" @} +label@{ text="World" @} @}`` +to add components to the component tree root. By nesting the component +creation statements in the theme file, the instantiated components are nested +the same way. + +When a component is added to a container, that new child is considered *owned* +by the container. Great care should be taken if the caller retains a +reference to the child component, since it will be destroyed if its parent +container is destroyed. A better choice instead of storing a pointer to the +child component is to use the component ID to find the desired component. +Component IDs do not have to be unique (it is often useful to have multiple +components with an ID of "__timeout__", for instance). + +In order to access and use components in the component tree, there are two +functions (defined in ``gfxmenu/gui_util.c``) that are particularly useful: + +@itemize + +@item ``grub_gui_find_by_id (root, id, callback, userdata)``: + + This function ecursively traverses the component tree rooted at *root*, and + for every component that has an ID equal to *id*, calls the function pointed + to by *callback* with the matching component and the void pointer *userdata* + as arguments. The callback function can do whatever is desired to use the + component passed in. + +@item ``grub_gui_iterate_recursively (root, callback, userdata)``: + + This function calls the function pointed to by *callback* for every + component that is a descendant of *root* in the component tree. When the + callback function is called, the component and the void pointer *userdata* + as arguments. The callback function can do whatever is desired to use the + component passed in. +@end itemize + +@node Command Line Window +@section Command Line Window + +The terminal window used to provide command line access within the graphical +menu is managed by ``gfxmenu/view.c``. The ``gfxterm`` terminal is used, and +it has been modified to allow rendering to an offscreen render target to allow +it to be composed into the double buffering system that the graphical menu +view uses. This is bad for performance, however, so it would probably be a +good idea to make it possible to temporarily disable double buffering as long +as the terminal window is visible. There are still unresolved problems that +occur when commands are executed from the terminal window that change the +graphics mode. It's possible that making ``grub_video_restore()`` return to +the graphics mode that was in use before ``grub_video_setup()`` was called +might fix some of the problems. + + +@node Copying This Manual +@appendix Copying This Manual + +@menu +* GNU Free Documentation License:: License for copying this manual. +@end menu + +@include fdl.texi + + +@node Index +@unnumbered Index + +@c Currently, we use only the Concept Index. +@printindex cp + +@bye diff --git a/docs/grub.texi b/docs/grub.texi index 0808ded6b..45baeafe6 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -100,7 +100,6 @@ This edition documents version @value{VERSION}. * Obtaining and Building GRUB:: How to obtain and build GRUB * Reporting bugs:: Where you should send a bug report * Future:: Some future plans on GRUB -* Internals:: Hacking GRUB * Copying This Manual:: Copying This Manual * Index:: @end menu @@ -4374,111 +4373,6 @@ If you are interested in the development of GRUB 2, take a look at @uref{http://www.gnu.org/software/grub/grub.html, the homepage}. -@node Internals -@appendix Hacking GRUB - -@menu -* Getting the source code:: -* Finding your way around:: -@end menu - - -@node Getting the source code -@section Getting the source code - -GRUB is maintained using the @uref{http://bazaar-vcs.org/, Bazaar revision -control system}. To fetch the primary development branch: - -@example -bzr get http://bzr.savannah.gnu.org/r/grub/trunk/grub -@end example - -The GRUB developers maintain several other branches with work in progress. -Of these, the most interesting is the experimental branch, which is a -staging area for new code which we expect to eventually merge into trunk but -which is not yet ready: - -@example -bzr get http://bzr.savannah.gnu.org/r/grub/branches/experimental -@end example - -Once you have used @kbd{bzr get} to fetch an initial copy of a branch, you -can use @kbd{bzr pull} to keep it up to date. If you have modified your -local version, you may need to resolve conflicts when pulling. - - -@node Finding your way around -@section Finding your way around - -Here is a brief map of the GRUB code base. - -GRUB uses Autoconf, but not (yet) Automake. The top-level build rules are -in @file{configure.ac}, @file{Makefile.in}, and @file{conf/*.rmk}. Each -@file{conf/*.rmk} file represents a particular target configuration, and is -processed into GNU Make rules by @file{genmk.rb} (which you only need to -look at if you are extending the build system). If you are adding a new -module which follows an existing pattern, such as a new command or a new -filesystem implementation, it is usually easiest to grep @file{conf/*.rmk} -for an existing example of that pattern to find out where it should be -added. - -Low-level boot code, such as the MBR implementation on PC BIOS systems, is -in the @file{boot/} directory. - -The GRUB kernel is in @file{kern/}. This contains core facilities such as -the device, disk, and file frameworks, environment variable handling, list -processing, and so on. The kernel should contain enough to get up to a -rescue prompt. Header files for kernel facilities, among others, are in -@file{include/}. - -Terminal implementations are in @file{term/}. - -Disk access code is spread across @file{disk/} (for accessing the disk -devices themselves), @file{partmap/} (for interpreting partition table -data), and @file{fs/} (for accessing filesystems). Note that, with the odd -specialised exception, GRUB only contains code to @emph{read} from -filesystems and tries to avoid containing any code to @emph{write} to -filesystems; this lets us confidently assure users that GRUB cannot be -responsible for filesystem corruption. - -PCI and USB bus handling is in @file{bus/}. - -Video handling code is in @file{video/}. The graphical menu system uses -this heavily, but is in a separate directory, @file{gfxmenu/}. - -Most commands are implemented by files in @file{commands/}, with the -following exceptions: - -@itemize -@item -A few core commands live in @file{kern/corecmd.c}. - -@item -Commands related to normal mode live under @file{normal/}. - -@item -Commands that load and boot kernels live under @file{loader/}. - -@item -The @samp{loopback} command is really a disk device, and so lives in -@file{disk/loopback.c}. - -@item -The @samp{gettext} command lives under @file{gettext/}. - -@item -The @samp{loadfont} and @samp{lsfonts} commands live under @file{font/}. - -@item -The @samp{serial}, @samp{terminfo}, and @samp{background_image} commands -live under @file{term/}. - -@item -The @samp{efiemu_*} commands live under @file{efiemu/}. -@end itemize - -There are a few other special-purpose exceptions; grep for them if they -matter to you.