acrn-hypervisor/debian/grub/acrn.cfg
Helmut Buchsbaum f8ec83e628 debian: grub-acrn: Rework to provide configuration interface for GRUB
* Simplify grub-mkconfig helper script,
* Append Service VM kernel boot parameters to ACRN parameter in
  multiboot/multiboot2 line to avoid overriding the configured settings,
* Support GRUB configuration for pre-launched VMs,
* Extend and document the GRUB variables for controlling GRUB boot
  menu generation.

Tracked-On: #8274
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-22 10:33:58 +08:00

36 lines
1015 B
INI

# Make booting into ACRN the default. Set the following variable to 0 or 1
# explicitly to avoid the message warning from being printed.
#
#ACRN_OVERRIDE_GRUB_DEFAULT=
#
case "${GRUB_DISTRIBUTOR}" in
"")
OS=GNU/Linux
;;
Ubuntu|Kubuntu)
OS="${GRUB_DISTRIBUTOR}"
;;
*)
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
;;
esac
if [ "$ACRN_OVERRIDE_GRUB_DEFAULT" = "" ]; then
echo "WARNING: GRUB_DEFAULT changed to boot into ACRN by default!"
echo " Edit /etc/default/grub.d/acrn.cfg to avoid this warning."
ACRN_OVERRIDE_GRUB_DEFAULT=1
fi
if [ "$ACRN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then
GRUB_DEFAULT="${OS} with ACRN hypervisor"
fi
# Examples: Uncomment, set or extend respective ACRN specific GRUB configuration:
# see also /usr/share/doc/grub-acrn/README.Debian
# extra ACRN parameters
# export GRUB_CMDLINE_ACRN="uart=bdf@0xc1"
# kernel path setting for pre-launched VM, tagged with zephyr_image
# export GRUB_ACRN_MOD_zephyr_image="/boot/zephyr.img"