Skip to content

Commit

Permalink
Add devicetree loading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vathpela committed Aug 14, 2018
1 parent fc35bb7 commit 2e70275
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/grub-mkconfig.in
Expand Up @@ -254,7 +254,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"
Expand Down
15 changes: 15 additions & 0 deletions util/grub.d/10_linux.in
Expand Up @@ -153,6 +153,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
Expand Down Expand Up @@ -236,6 +243,14 @@ while [ "x$list" != "x" ] ; 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
Expand Down

0 comments on commit 2e70275

Please sign in to comment.