lbmk/resources/grub
Leah Rowe eb54e427e6 grub: all one grub.elf containing keymaps and cfg
new behaviour:
* grub.cfg and grubtest.cfg no longer inserted to cbfs
* grub.cfg in memdisk instead
* grub.cfg in memdisk defers to cbfs/grub.cfg if added
  (not added by default, anymore)
* does not defer to grubtest.cfg even if available
* only shows link to grubtest.cfg if available,
  as a menuentry item

keymaps:
if /keymap.gkb exists in cbfs, it uses that by default,
but by default this isn't added. instead, it looks for
a file named keymap.cfg and sources that, which then
sets the keymap to one that is located under memdisk.
this file is inserted for each rom, per layout.
if keymap.gkb and keymap.cfg both absent, grub.cfg in
memdisk shall defer to usqwerty as the default keymap

grub_scan_disk: grub.cfg looks for cbfs file "scan.cfg"
and sources that if found, which will be inserted with
the string: set grub_scandisk=setting_goes_here (based
on target.cfg, generated by build/boot/roms automatically).
If no scan.cfg is found, it defaults to "both"

The "background.png" file remains unchanged, and present in
CBFS, used by grub.cfg if present (and it is, by default)

This change actually *saves* space in CBFS, due to compression,
and means that the grub.cfg is now compressed heavily. This
is also safer, because now the user overrides grub.cfg by
adding it, and they can still add grubtest.cfg for testing
first. If they accidentally delete both configs from cbfs,
Libreboot will fall back to the one in memdisk which would
presumably not be deleted.

This also means that lbmk can now more easily be used by
other build systems, that just want the GRUB part to re-use
in their own project. For example, people who want to build
custom coreboot images without using Libreboot's build system.

This change also *speeds* up the build process considerably,
on the parts where ROM images are copied. It's less than half
a second now, whereas previously it took about 30-45 seconds
for ROM images to copy, because of grub.elf being re-added in
each ROM via cbfstool, where compression is used; I believe
the compression part is what caused slowness.

Much, much faster, more versatile builds.

Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-29 02:03:16 +01:00
..
background losslessly compress pngs 2023-06-22 18:24:18 +03:00
config grub: all one grub.elf containing keymaps and cfg 2023-08-29 02:03:16 +01:00
keymap Turkish Q Keyboard Layout Added 2021-05-23 16:30:08 +00:00
patches grub: import phc argon2 implementation (for luks2) 2023-08-20 12:24:49 +01:00
modules.list Remove superfluous GRUB modules (save CBFS space) 2023-08-28 01:25:10 +01:00