debian: add kernel version to GRUB menuentry

1. add kernel version to menuentry "Ubuntu-ACRN Board Inspector"
2. add kernel version and acrn version to menuentry "Ubuntu with ACRN hypervisor"

Tracked-On:#8359
Signed-off-by: Min Yang <minx.yang@intel.com>
This commit is contained in:
Min Yang 2022-12-07 16:46:09 +08:00 committed by acrnsi-robot
parent c34649aafa
commit 5d3702af77
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ linux_entry ()
if [ -z "$boot_device_id" ]; then if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-acrn-board-inspector-$boot_device_id' {" echo "menuentry '$(echo "$os, with ${version}" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-acrn-board-inspector-$boot_device_id' {"
# Use ELILO's generic "efifb" when it's known to be available. # Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used. # FIXME: We need an interface to select vesafb in case efifb can't be used.

View File

@ -208,7 +208,7 @@ linux_entry ()
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
title="$(gettext_printf "%s with ACRN hypervisor" "${os}")" title="$(gettext_printf "%s with ACRN hypervisor" "${os}")"
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'acrn-gnulinux-$boot_device_id' {" echo "menuentry '$(echo "$title, with ${version}(${acrn_version})" | grub_quote)' ${CLASS} \$menuentry_id_option 'acrn-gnulinux-$boot_device_id' {"
if [ -z "${prepare_boot_cache}" ]; then if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)" prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
@ -327,7 +327,7 @@ while [ "x${acrn_list}" != "x" ] ; do
else else
title="$(gettext_printf "%s with ACRN hypervisor %s" "${OS}" "${acrn_version}")" title="$(gettext_printf "%s with ACRN hypervisor %s" "${OS}" "${acrn_version}")"
fi fi
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'acrn-gnulinux-partitioned-${acrn_version}' {" echo "menuentry '$(echo "$title, with ${version}(${acrn_version})" | grub_quote)' ${CLASS} \$menuentry_id_option 'acrn-gnulinux-partitioned-${acrn_version}' {"
message="$(gettext_printf "Loading ACRN hypervisor %s ..." ${acrn_version})" message="$(gettext_printf "Loading ACRN hypervisor %s ..." ${acrn_version})"
cat << EOF cat << EOF
echo '$(echo "$message" | grub_quote)' echo '$(echo "$message" | grub_quote)'