[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/17] 10_linux.in: Add devicetree loading
From: |
Leo Sandoval |
Subject: |
[PATCH v2 10/17] 10_linux.in: Add devicetree loading |
Date: |
Mon, 7 Oct 2024 12:18:01 -0600 |
From: Peter Jones <pjones@redhat.com>
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
index 32c480dae..d1bf4983b 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -255,7 +255,8 @@ export GRUB_DEFAULT \
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
index cc393be7e..00d4b220c 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -155,6 +155,13 @@ EOF
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
@@ -250,6 +257,14 @@ for linux in ${reverse_sorted_list}; do
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
--
2.46.2
- [PATCH v2 00/17] First Distro-agnostic series taken from Fedora Rawhide, Leo Sandoval, 2024/10/07
- [PATCH v2 02/17] term/terminfo: for ppc, reset console display attr when clear screen, Leo Sandoval, 2024/10/07
- [PATCH v2 04/17] configure.ac: Move bash completion script, Leo Sandoval, 2024/10/07
- [PATCH v2 08/17] normal: Add fw_path variable (revised), Leo Sandoval, 2024/10/07
- [PATCH v2 03/17] ieee1275: Disable GRUB video support for IBM power machines, Leo Sandoval, 2024/10/07
- [PATCH v2 07/17] 20_ppc_terminfo.in: Migrate ieee1275/PPC from Yaboot to Grub2, Leo Sandoval, 2024/10/07
- [PATCH v2 09/17] commands: Pass "\x[[:hex:]][[:hex:]]" straight through unmolested., Leo Sandoval, 2024/10/07
- [PATCH v2 10/17] 10_linux.in: Add devicetree loading,
Leo Sandoval <=
- [PATCH v2 05/17] misc: Make "exit" take a return code., Leo Sandoval, 2024/10/07
- [PATCH v2 12/17] Makefile.common: Add .eh_frame to list of relocations stripped, Leo Sandoval, 2024/10/07
- [PATCH v2 11/17] 00_header.in: Enable pager by default. (#985860), Leo Sandoval, 2024/10/07
- [PATCH v2 14/17] normal/main: fw_path prefix when fallback searching for grub config, Leo Sandoval, 2024/10/07
- [PATCH v2 17/17] normal/main: Try $prefix if $fw_path doesn't work., Leo Sandoval, 2024/10/07
- [PATCH v2 06/17] efi/init: Make efi machines load an env block from a variable, Leo Sandoval, 2024/10/07
- [PATCH v2 01/17] ieee1275/openfw: IBM client architecture (CAS) reboot support, Leo Sandoval, 2024/10/07
- [PATCH v2 13/17] 10_linux.in: Don't require a password to boot entries generated by grub-mkconfig., Leo Sandoval, 2024/10/07
- [PATCH v2 16/17] 10_linux.in: Generate OS and CLASS in 10_linux from /etc/os-release, Leo Sandoval, 2024/10/07