mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
||
|
Date: Sun, 15 Sep 2019 10:05:29 +0200
|
||
|
Subject: [PATCH] Set a devicetree var in a BLS config if GRUB_DEFAULT_DTB is
|
||
|
present
|
||
|
|
||
|
The BootLoaderSpec mentions that a devicetree field can be used to pass a
|
||
|
Device Tree (DT) to the kernel, for the platforms that use it to describe
|
||
|
information about the hardware.
|
||
|
|
||
|
The blscfg module supports parsing the field from the BLS snippets but it
|
||
|
allows to set a DT for all the entries if a devicetree env var is defined.
|
||
|
|
||
|
Make the grub2-mkconfig tool to set this variable if GRUB_DEFAULT_DTB was
|
||
|
defined in the /etc/default/grub file.
|
||
|
|
||
|
Resolves: rhbz#1751307
|
||
|
|
||
|
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||
|
---
|
||
|
util/grub.d/10_linux.in | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||
|
index 301594a0c9e..1520b7e47c1 100644
|
||
|
--- a/util/grub.d/10_linux.in
|
||
|
+++ b/util/grub.d/10_linux.in
|
||
|
@@ -138,6 +138,10 @@ EOF
|
||
|
if [ -n "${GRUB_EARLY_INITRD_LINUX_CUSTOM}" ]; then
|
||
|
${grub_editenv} - set early_initrd="${GRUB_EARLY_INITRD_LINUX_CUSTOM}"
|
||
|
fi
|
||
|
+
|
||
|
+ if [ -n "${GRUB_DEFAULT_DTB}" ]; then
|
||
|
+ ${grub_editenv} - set devicetree="${GRUB_DEFAULT_DTB}"
|
||
|
+ fi
|
||
|
fi
|
||
|
|
||
|
exit 0
|