grub2: add support for devicetree

Similar as available for u-boot (ce2995e1dc)
and syslinux (c5112c25e4), enable parsing
and writing devicetree filename into grub.cfg.

This is required by arm64-based devices running edk2 instead of u-boot
as the main bootloader (e.g. 96boards HiKey and HiKey960).

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>

Closes: #1790
Approved by: cgwalters
This commit is contained in:
Ricardo Salveti authored and Atomic Bot committed 2018-12-21 14:00:42 +00:00
1 parent ee988f69aa
commit b6795c93ea
2 files changed
+17

No files matched your search

+10
View File
@@ -191,6 +191,7 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot
const char *options;
const char *kernel;
const char *initrd;
const char *devicetree;
char *quoted_title = NULL;
char *uuid = NULL;
char *quoted_uuid = NULL;
@@ -246,6 +247,15 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot
g_string_append_c (output, '\n');
}
devicetree = ostree_bootconfig_parser_get (config, "devicetree");
if (devicetree)
{
g_string_append (output, "devicetree");
g_string_append_c (output, ' ');
g_string_append (output, devicetree);
g_string_append_c (output, '\n');
}
g_string_append (output, "}\n");
}