2018-07-17 14:20:54 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Tue, 14 Jan 2014 13:12:23 -0500
|
|
|
|
Subject: [PATCH] Add devicetree loading
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
|
|
|
|
Switch to use APM Mustang device tree, for hardware testing.
|
|
|
|
|
|
|
|
Signed-off-by: David A. Marlin <d.marlin@redhat.com>
|
|
|
|
|
|
|
|
Use the default device tree from the grub default file
|
|
|
|
|
|
|
|
instead of hardcoding a value.
|
|
|
|
|
|
|
|
Signed-off-by: David A. Marlin <dmarlin@redhat.com>
|
|
|
|
---
|
|
|
|
util/grub-mkconfig.in | 3 ++-
|
|
|
|
util/grub.d/10_linux.in | 15 +++++++++++++++
|
|
|
|
2 files changed, 17 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
2024-10-18 18:18:00 +00:00
|
|
|
index 7516a015be0..7b355115dd4 100644
|
2018-07-17 14:20:54 +00:00
|
|
|
--- a/util/grub-mkconfig.in
|
|
|
|
+++ b/util/grub-mkconfig.in
|
2024-10-18 18:18:00 +00:00
|
|
|
@@ -252,7 +252,8 @@ export GRUB_DEFAULT \
|
2018-07-17 14:20:54 +00:00
|
|
|
GRUB_ENABLE_CRYPTODISK \
|
|
|
|
GRUB_BADRAM \
|
|
|
|
GRUB_OS_PROBER_SKIP_LIST \
|
|
|
|
- GRUB_DISABLE_SUBMENU
|
|
|
|
+ GRUB_DISABLE_SUBMENU \
|
|
|
|
+ GRUB_DEFAULT_DTB
|
|
|
|
|
|
|
|
if test "x${grub_cfg}" != "x"; then
|
|
|
|
rm -f "${grub_cfg}.new"
|
|
|
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
2024-10-18 18:18:00 +00:00
|
|
|
index cc393be7eda..00d4b220ccb 100644
|
2018-07-17 14:20:54 +00:00
|
|
|
--- a/util/grub.d/10_linux.in
|
|
|
|
+++ b/util/grub.d/10_linux.in
|
2024-10-18 18:18:00 +00:00
|
|
|
@@ -155,6 +155,13 @@ EOF
|
2018-07-17 14:20:54 +00:00
|
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
echo '$(echo "$message" | grub_quote)'
|
|
|
|
initrd $(echo $initrd_path)
|
|
|
|
+EOF
|
|
|
|
+ fi
|
|
|
|
+ if test -n "${fdt}" ; then
|
|
|
|
+ message="$(gettext_printf "Loading fdt ...")"
|
|
|
|
+ sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
+ echo '$(echo "$message" | grub_quote)'
|
|
|
|
+ devicetree ${rel_dirname}/${fdt}
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
sed "s/^/$submenu_indentation/" << EOF
|
2024-10-18 18:18:00 +00:00
|
|
|
@@ -250,6 +257,14 @@ for linux in ${reverse_sorted_list}; do
|
2018-07-17 14:20:54 +00:00
|
|
|
gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
+ fdt=
|
|
|
|
+ for i in "dtb-${version}" "dtb-${alt_version}"; do
|
|
|
|
+ if test -f "${dirname}/${i}/${GRUB_DEFAULT_DTB}" ; then
|
|
|
|
+ fdt="${i}/${GRUB_DEFAULT_DTB}"
|
|
|
|
+ break
|
|
|
|
+ fi
|
|
|
|
+ done
|
|
|
|
+
|
|
|
|
config=
|
|
|
|
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
|
|
|
|
if test -e "${i}" ; then
|