grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Improve handling of "keep" in gfxpayload


From: Colin Watson
Subject: [PATCH] Improve handling of "keep" in gfxpayload
Date: Mon, 10 Aug 2009 12:01:02 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

If the user set "keep" in gfxpayload, as I understand it, that indicates
that they want the graphical mode set by GRUB to persist through to the
kernel. In order for this to actually work with Linux, we need to set up
the vid_mode boot parameter to indicate that it should keep the current
video mode, otherwise it'll just reset the mode to text at boot and
nothing much is gained. This patch fixes that.

Note that I'm explicitly not enabling GRUB_ASSUME_LINUX_HAS_FB_SUPPORT
in the Ubuntu grub2 package. I can understand why support for it was
added, and I'd be willing to assume that the Ubuntu kernel has the
necessary support, but I'm not willing to assume that every Linux kernel
booted by the Ubuntu grub2 build has the necessary support; that seems
one assumption too far for me. As such I'm interested in making this
work properly with run-time configuration as well as build-time
configuration.

This doesn't quite work perfectly yet. It's better than before - I've
tested this, and if everything works properly then the result is a
smooth zero-flicker transition, which is wonderful. However, if
something goes wrong before the kernel starts a framebuffer then it has
no way to display any text at all, and it doesn't seem to start one
until relatively late for me. It may be that the next step here is to
try to explicitly tell the kernel to set the correct VESA mode rather
than using 0x0F04, but I thought I'd send this patch anyway in the
meantime ...

2009-08-10  Colin Watson  <address@hidden>

        * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_CURRENT): New
        macro.
        * loader/i386/linux.c (grub_linux_boot): If gfxpayload starts
        with "keep", or if GRUB_ASSUME_LINUX_HAS_FB_SUPPORT is defined,
        then set the vid_mode boot parameter to
        GRUB_LINUX_VID_MODE_CURRENT.

Thanks,

-- 
Colin Watson                                       address@hidden

Attachment: grub2-gfxpayload-keep.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]