Unofficial (Simplified) Libreboot Documentation
  • Home
  • Building from source/
  • External SPI flashing/
  • Freedom in Libreboot/
  • Maintainance manual/
  • Operating systems/
  • Payloads/
    • GRUB/
      • Encrypted /boot via LUKS2 with argon2id
      • GRUB keyboard layouts
      • Hardening GRUB
      • Modifying grub.cfg in CBFS
    • U-Boot payload (x86 and ARM)/
  • Releases/
  • Targets/
  • UNCATEGORIZED/
Site license: GFDL v1.3 with disclaimer

GRUB keyboard layouts

First, learn how to build libreboot ROM images.

Keymaps are stored in config/grub/keymap/

You can use the ckbcomp program to generate a keymap, based on Xorg keymap files:

ckbcomp fr > frazerty

When you build GRUB from source, you can use the grub-mklayout program to create a special keymap file for GRUB.

To compile GRUB, in lbmk, do this:

./mk -b grub default

Other GRUB trees are available, but the default one will do for now.

When you’ve built GRUB, using lbmk (libreboot build system), take your kepmap file (generated by ckbcomp) and run it through grub-mklayout like so:

cat frazerty | ./src/grub/default/grub-mklayout -o frazerty.gkb

Place the newly created .gkb file under config/grub/keymap in lbmk. When you build libreboot, a ROM image with GRUB payload and your newly created keymap will be available under the bin/ directory.

Many keymaps exist in the libreboot build system, but sometimes you must manually tweak the file created by ckbcomp, adjusting the scan codes in that file, before converting to a GRUB keymap file. Therefore, it would be unwise to automatically add all keymaps in GRUB.