From c5112c25e4519835c4cd53f4350c1b2f2a477746 Mon Sep 17 00:00:00 2001 From: William Manley Date: Mon, 6 Mar 2017 19:41:46 +0000 Subject: [PATCH] syslinux: Add support for DEVICETREE from bootloader spec The bootloader spec says: > `devicetree` refers to the binary device tree to use when executing the > kernel. This also shall be a path relative to the `$BOOT` directory. This > key is optional. Example: > `6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb` This is necessary for booting my NVidia Tegra TK1 device. It uses u-boot with syslinux compatibility. In the syslinux files that come with the device this is called `FDT`, but u-boot treats `FDT and `DEVICETREE` as synonyms. See also: [f43c401 in u-boot]. [f43c401 in u-boot]: http://git.denx.de/?p=u-boot.git;a=commit;h=f43c401b72bb0db43ab0b55c4a79e1f4889d3aa2 Closes: #1411 Approved by: cgwalters --- src/libostree/ostree-bootloader-syslinux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libostree/ostree-bootloader-syslinux.c b/src/libostree/ostree-bootloader-syslinux.c index 85b84e61..8b09a861 100644 --- a/src/libostree/ostree-bootloader-syslinux.c +++ b/src/libostree/ostree-bootloader-syslinux.c @@ -95,6 +95,10 @@ append_config_from_loader_entries (OstreeBootloaderSyslinux *self, if (val) g_ptr_array_add (new_lines, g_strdup_printf ("\tINITRD %s", val)); + val = ostree_bootconfig_parser_get (config, "devicetree"); + if (val) + g_ptr_array_add (new_lines, g_strdup_printf ("\tDEVICETREE %s", val)); + val = ostree_bootconfig_parser_get (config, "options"); if (val) g_ptr_array_add (new_lines, g_strdup_printf ("\tAPPEND %s", val));