]> git.ozlabs.org Git - petitboot/commit - test/parser/Makefile.am
discover/grub: Add blscfg command support to parse BootLoaderSpec files
authorJavier Martinez Canillas <javierm@redhat.com>
Thu, 22 Mar 2018 08:41:23 +0000 (09:41 +0100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 23 Mar 2018 00:39:35 +0000 (11:39 +1100)
commit91ce1a8f8863d8f740188236f138421d17292d6c
treef39fa6f339e8c8f3e3ec20052acc33b806aa040b
parent3dfa4123bdf987aaa0e4bfd73d436c6bab0184ce
discover/grub: Add blscfg command support to parse BootLoaderSpec files

The BootLoaderSpec (BLS) defines a file format for boot configurations,
so bootloaders can parse these files and create their boot menu entries
by using the information provided by them [0].

This allow to configure the boot items as drop-in files in a directory
instead of having to parse and modify a bootloader configuration file.

The GRUB 2 bootloader provides a blscfg command that parses these files
and creates menu entries using this information. Add support for it.

[0]: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
13 files changed:
discover/grub2/Makefile.am
discover/grub2/blscfg.c [new file with mode: 0644]
discover/grub2/builtins.c
discover/grub2/script.c
discover/parser.c
discover/parser.h
test/parser/Makefile.am
test/parser/test-grub2-blscfg-default-filename.c [new file with mode: 0644]
test/parser/test-grub2-blscfg-default-title.c [new file with mode: 0644]
test/parser/test-grub2-blscfg-multiple-bls.c [new file with mode: 0644]
test/parser/test-grub2-blscfg-opts-config.c [new file with mode: 0644]
test/parser/test-grub2-blscfg-opts-grubenv.c [new file with mode: 0644]
test/parser/utils.c