6b2dd0f731
Signed-off-by: Peter Jones <pjones@redhat.com>
80 lines
2.2 KiB
Diff
80 lines
2.2 KiB
Diff
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] Make 10_linux work with our changes for linux16 and linuxefi
|
|
on aarch64
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
---
|
|
util/grub.d/10_linux.in | 35 ++++++++++++++++++++++++++---------
|
|
1 file changed, 26 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
index 11f50d5730b..c889b47db59 100644
|
|
--- a/util/grub.d/10_linux.in
|
|
+++ b/util/grub.d/10_linux.in
|
|
@@ -86,9 +86,18 @@ linux_entry ()
|
|
type="$3"
|
|
args="$4"
|
|
|
|
- sixteenbit=""
|
|
+ linuxcmd=linux
|
|
+ initrdcmd=initrd
|
|
case "$machine" in
|
|
- i?86|x86_64) sixteenbit="16" ;;
|
|
+ i?86|x86_64)
|
|
+ if [ -d /sys/firmware/efi ]; then
|
|
+ linuxcmd=linuxefi
|
|
+ initrdcmd=initrdefi
|
|
+ else
|
|
+ linuxcmd=linux16
|
|
+ initrdcmd=linux16
|
|
+ fi
|
|
+ ;;
|
|
esac
|
|
|
|
if [ -z "$boot_device_id" ]; then
|
|
@@ -143,13 +152,6 @@ linux_entry ()
|
|
fi
|
|
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
|
|
fi
|
|
- if [ -d /sys/firmware/efi ]; then
|
|
- linuxcmd=linuxefi
|
|
- initrdcmd=initrdefi
|
|
- else
|
|
- linuxcmd=linux${sixteenbit}
|
|
- initrdcmd=initrd${sixteenbit}
|
|
- fi
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
${linuxcmd} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
|
EOF
|
|
@@ -162,6 +164,13 @@ EOF
|
|
done
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
${initrdcmd} $(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
|
|
@@ -245,6 +254,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 -e "${dirname}/${i}/foundation-v8.dtb" ; then
|
|
+ fdt="${i}/foundation-v8.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
|