# GNU GRUB Developers Manual 2.06

Next: Getting the source code [Contents][Index]

# GNU GRUB developer manual

This is the developer documentation of GNU GRUB, the GRand Unified Bootloader, a flexible and powerful boot loader program for a wide range of architectures.

This edition documents version 2.06.

This developer manual is for GNU GRUB (version 2.06, 8 June 2021).

Copyright © 1999,2000,2001,2002,2004,2005,2006,2008,2009,2010,2011 Free Software Foundation, Inc.

> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections.

## Table of Contents

- 1 Getting the source code
- 2 Coding style
  - 2.1 Naming Conventions
  - 2.2 Functions
  - 2.3 Variables
  - 2.4 Types
  - 2.5 Macros
  - 2.6 Comments
  - 2.7 Multi-Line Comments
- 3 Finding your way around
- 4 Contributing changes
  - 4.1 Getting started
  - 4.2 Typical Developer Experience
  - 4.3 When you are approved for write access to project’s files
- 5 Updating external code
  - 5.1 Gnulib
  - 5.2 jsmn
  - 5.3 minilzo
- 6 Porting
- 7 Error Handling
- 8 Stack and heap size
- 9 BIOS port memory map
- 10 Video Subsystem
  - 10.1 Video API
    - 10.1.1 grub_video_setup
    - 10.1.2 grub_video_restore
    - 10.1.3 grub_video_get_info
    - 10.1.4 grub_video_get_blit_format
    - 10.1.5 grub_video_set_palette
    - 10.1.6 grub_video_get_palette
    - 10.1.7 grub_video_set_area_status
    - 10.1.8 grub_video_get_area_status
    - 10.1.9 grub_video_set_viewport
    - 10.1.10 grub_video_get_viewport
    - 10.1.11 grub_video_set_region
    - 10.1.12 grub_video_get_region
    - 10.1.13 grub_video_map_color
    - 10.1.14 grub_video_map_rgb
    - 10.1.15 grub_video_map_rgba
    - 10.1.16 grub_video_unmap_color
    - 10.1.17 grub_video_fill_rect
    - 10.1.18 grub_video_blit_glyph
    - 10.1.19 grub_video_blit_bitmap
    - 10.1.20 grub_video_blit_render_target
    - 10.1.21 grub_video_scroll
    - 10.1.22 grub_video_swap_buffers
    - 10.1.23 grub_video_create_render_target
    - 10.1.24 grub_video_delete_render_target
    - 10.1.25 grub_video_set_active_render_target
    - 10.1.26 grub_video_get_active_render_target
  - 10.2 Example usage of Video API
    - 10.2.1 Example of screen setup
    - 10.2.2 Example of setting up console viewport
  - 10.3 Bitmap API
    - 10.3.1 grub_video_bitmap_create
    - 10.3.2 grub_video_bitmap_destroy
    - 10.3.3 grub_video_bitmap_load
    - 10.3.4 grub_video_bitmap_get_width
    - 10.3.5 grub_video_bitmap_get_height
    - 10.3.6 grub_video_bitmap_get_mode_info
    - 10.3.7 grub_video_bitmap_get_data
- 11 PFF2 Font File Format
  - 11.1 Introduction
    - 11.1.1 Goals of the GRUB Font Format
    - 11.1.2 Why Another Font Format?
  - 11.2 File Structure
    - 11.2.1 Section Types
  - 11.3 Font Metrics
- 12 Graphical Menu Software Design
  - 12.1 Introduction
  - 12.2 Startup Sequence
  - 12.3 GUI Components
  - 12.4 Command Line Window
- 13 Verifiers framework
- 14 Lockdown framework
- Appendix A Copying This Manual
  - A.1 GNU Free Documentation License
    - A.1.1 ADDENDUM: How to use this License for your documents
- Index

Next: Getting the source code [Contents][Index]