Skip to content
master
Switch branches/tags
Code

Latest commit

* add GRUB2 font description

* grub2 font: add some clarification docs, use shorter names for id, use
sizeof<> instead of hardcoding lengths

* grub2: parse information in character index section as well

* grub2font: add some docs

* grub2 font: style guide fixes (len_ ofs_ encoding)

* grub2font: rename to grub2_font

* grub2_font: reroute `/doc-ref` to HTTPS version

* grub2_font: extend and improve `/meta` info

* grub2_font: fix indent, change quotes

* grub2_font: replace manual `repeat-expr` calc with `repeat: eos`

* grub2_font: rename `len_{section => body}` because it is `body`'s size

* grub2_font: `{x,y}_offset` and `device_width` are signed ints

See https://grub.gibibit.com/New_font_format#section-types,
section "Character definition" - these three fields are marked
as `int16be`, not `uint16be`. Also see a sample
https://github.com/anak10thn/ign-bootloader/blob/4190223/ign-grub2/config/boot/grub/unicode.pf2 -
this file has `y_offset = -2` everywhere. If it was unsigned, the value
would be interpreted as `0xFFFE = 65534`, which is an absurdly
large value.

* grub2_font: extend `bitmap_data` description

* grub2_font: add desc to `len_body` for `DATA` section

* grub2_font: rename fields in `character_index` type

* grub2_font: rename `{font_  => }section`, `section_{name => type}`

* grub2_font: rename section types and fields for better access API

Co-authored-by: Petr Pucil <petr.pucil@seznam.cz>
aea3feb

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

Kaitai Struct: format library

This repository constitutes a library of ready-made binary file format descriptions using Kaitai Struct language (.ksy).

These formats can be useful for:

  • exploring a certain file format internals: one can load .ksy format + target binary in a Web IDE or visualizer and learn what's inside;

  • as a production-ready binary file parsing library: they can be compiled with a Kaitai Struct compiler into source code in any supported target programming language;

  • as a starting point for learning applications of Kaitai Struct in real world;

Exploring this repository

If you want to explore the repository, please visit Kaitai Struct format gallery — that's HTML rendition of this repository, which block diagrams, all the code compiled for all possible target languages, provided with usage examples and instructions, etc, etc.

Alternatively, you can start with Web IDE — this library of formats also comes pre-loaded with it.

Contributing

See CONTRIBUTING.

Licensing

This repository contains work of many individuals. Each .ksy is licensed separately: please see meta/license tag and comments in every .ksy file for permissions. Kaitai team claims no copyright over other people's contributions.