1
Description: Set GRUB_GFXPAYLOAD_LINUX=keep unless it's known to be
2
unsupported on the current hardware. See
3
https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-grub2-boot-framebuffer.
4
Author: Evan Broder <evan@ebroder.net>
6
Index: b/util/grub.d/10_linux.in
7
===================================================================
8
--- a/util/grub.d/10_linux.in
9
+++ b/util/grub.d/10_linux.in
11
save_default_entry | sed -e "s/^/\t/"
14
- # Use ELILO's generic "efifb" when it's known to be available.
15
- # FIXME: We need an interface to select vesafb in case efifb can't be used.
16
- if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
17
- if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
23
- set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
25
+ if [ "\$linux_gfx_mode" != text ]; then load_video; fi
26
+ set gfxpayload=\$linux_gfx_mode
30
if [ -z "${prepare_boot_cache}" ]; then
31
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
36
+# Use ELILO's generic "efifb" when it's known to be available.
37
+# FIXME: We need an interface to select vesafb in case efifb can't be used.
38
+if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
39
+ echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX"
42
+if [ \${recordfail} != 1 ]; then
43
+ set matches_file=\${prefix}/gfxblacklist.lst
45
+ if lua \${prefix}/hwmatch.lua; then
46
+ if [ \${match} = 0 ]; then
47
+ set linux_gfx_mode=keep
49
+ set linux_gfx_mode=text
52
+ set linux_gfx_mode=text
55
+ set linux_gfx_mode=text
60
while [ "x$list" != "x" ] ; do
61
linux=`version_find_latest $list`
62
echo "Found linux image: $linux" >&2
63
Index: b/util/grub-install.in
64
===================================================================
65
--- a/util/grub-install.in
66
+++ b/util/grub-install.in
70
# Copy the GRUB images to the GRUB directory.
71
-for file in "${grubdir}"/*.mod "${grubdir}"/*.lst "${grubdir}"/*.img "${grubdir}"/efiemu??.o; do
72
+for file in "${grubdir}"/*.mod "${grubdir}"/*.lua "${grubdir}"/*.lst "${grubdir}"/*.img "${grubdir}"/efiemu??.o; do
73
if test -f "$file" && [ "`basename $file`" != menu.lst ]; then
74
rm -f "$file" || exit 1
77
-for file in "${pkglibdir}"/*.mod "${pkglibdir}"/*.lst; do
78
+for file in "${pkglibdir}"/*.mod "${pkglibdir}"/*.lua "${pkglibdir}"/*.lst; do
79
cp -f "$file" "${grubdir}" || exit 1
81
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then