mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-02 19:24:15 +00:00
Add configure option to use vt.handoff=7
This is used for non-recovery Linux entries only; it enables flicker-free booting if gfxpayload=keep is in use and a suitable kernel is present. Author: Andy Whitcroft <apw@canonical.com> Forwarded: not-needed Last-Update: 2013-12-25 Patch-Name: vt-handoff.patch
This commit is contained in:
parent
bc7f762a1d
commit
4336395ce7
11
configure.ac
11
configure.ac
@ -1948,6 +1948,17 @@ else
|
||||
fi
|
||||
AC_SUBST([GFXPAYLOAD_DYNAMIC])
|
||||
|
||||
AC_ARG_ENABLE([vt-handoff],
|
||||
[AS_HELP_STRING([--enable-vt-handoff],
|
||||
[use Linux vt.handoff option for flicker-free booting (default=no)])],
|
||||
[], [enable_vt_handoff=no])
|
||||
if test x"$enable_vt_handoff" = xyes ; then
|
||||
VT_HANDOFF=1
|
||||
else
|
||||
VT_HANDOFF=0
|
||||
fi
|
||||
AC_SUBST([VT_HANDOFF])
|
||||
|
||||
LIBS=""
|
||||
|
||||
AC_SUBST([FONT_SOURCE])
|
||||
|
@ -24,6 +24,7 @@ ubuntu_recovery="@UBUNTU_RECOVERY@"
|
||||
quiet_boot="@QUIET_BOOT@"
|
||||
quick_boot="@QUICK_BOOT@"
|
||||
gfxpayload_dynamic="@GFXPAYLOAD_DYNAMIC@"
|
||||
vt_handoff="@VT_HANDOFF@"
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
@ -104,6 +105,14 @@ if [ "$ubuntu_recovery" = 1 ]; then
|
||||
GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY nomodeset"
|
||||
fi
|
||||
|
||||
if [ "$vt_handoff" = 1 ]; then
|
||||
for word in $GRUB_CMDLINE_LINUX_DEFAULT; do
|
||||
if [ "$word" = splash ]; then
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \$vt_handoff"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
{
|
||||
os="$1"
|
||||
@ -149,7 +158,7 @@ linux_entry ()
|
||||
fi
|
||||
if ([ "$ubuntu_recovery" = 0 ] || [ x$type != xrecovery ]) && \
|
||||
([ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 1 ]); then
|
||||
echo " set gfxpayload=\$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
|
||||
echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
|
||||
fi
|
||||
|
||||
echo " insmod gzio" | sed "s/^/$submenu_indentation/"
|
||||
@ -228,6 +237,23 @@ prepare_root_cache=
|
||||
boot_device_id=
|
||||
title_correction_code=
|
||||
|
||||
cat << 'EOF'
|
||||
function gfxmode {
|
||||
set gfxpayload="${1}"
|
||||
EOF
|
||||
if [ "$vt_handoff" = 1 ]; then
|
||||
cat << 'EOF'
|
||||
if [ "${1}" = "keep" ]; then
|
||||
set vt_handoff=vt.handoff=7
|
||||
else
|
||||
set vt_handoff=
|
||||
fi
|
||||
EOF
|
||||
fi
|
||||
cat << EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# 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.
|
||||
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ] || [ "$gfxpayload_dynamic" = 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user