nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0137-Use-the-default-device-tree-from-the-grub-default-fi.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
39700a
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
39700a
Date: Wed, 12 Feb 2014 14:54:04 -0500
28f7f8
Subject: [PATCH] Use the default device tree from the grub default file
39700a
39700a
instead of hardcoding a value.
39700a
39700a
Signed-off-by: David A. Marlin <dmarlin@redhat.com>
39700a
---
39700a
 util/grub-mkconfig.in   | 3 ++-
39700a
 util/grub.d/10_linux.in | 4 ++--
39700a
 2 files changed, 4 insertions(+), 3 deletions(-)
39700a
39700a
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
28f7f8
index b00f9e61f40..beb22deee79 100644
39700a
--- a/util/grub-mkconfig.in
39700a
+++ b/util/grub-mkconfig.in
39700a
@@ -224,7 +224,8 @@ export GRUB_DEFAULT \
39700a
   GRUB_ENABLE_CRYPTODISK \
39700a
   GRUB_BADRAM \
39700a
   GRUB_OS_PROBER_SKIP_LIST \
39700a
-  GRUB_DISABLE_SUBMENU
39700a
+  GRUB_DISABLE_SUBMENU \
39700a
+  GRUB_DEFAULT_DTB
39700a
 
39700a
 if test "x${grub_cfg}" != "x"; then
39700a
   rm -f "${grub_cfg}.new"
39700a
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
28f7f8
index 3722c1ea263..8782d8c67cf 100644
39700a
--- a/util/grub.d/10_linux.in
39700a
+++ b/util/grub.d/10_linux.in
39700a
@@ -228,8 +228,8 @@ while [ "x$list" != "x" ] ; do
39700a
 
39700a
   fdt=
39700a
   for i in "dtb-${version}" "dtb-${alt_version}"; do
39700a
-    if test -e "${dirname}/${i}/apm-mustang.dtb" ; then
39700a
-      fdt="${i}/apm-mustang.dtb"
39700a
+    if test -f "${dirname}/${i}/${GRUB_DEFAULT_DTB}" ; then
39700a
+      fdt="${i}/${GRUB_DEFAULT_DTB}"
39700a
       break
39700a
     fi
39700a
   done