]> git.proxmox.com Git - grub2.git/log
grub2.git
6 years agoInclude a text attribute reset in the clear command for ppc
Paulo Flabiano Smorigo [Thu, 25 Sep 2014 21:41:29 +0000 (18:41 -0300)]
Include a text attribute reset in the clear command for ppc

Always clear text attribute for clear command in order to avoid problems
after it boots.

* grub-core/term/terminfo.c: Add escape for text attribute reset

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1295255
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00076.html
Last-Update: 2014-09-26

Patch-Name: ieee1275-clear-reset.patch

6 years agoPort yaboot logic for various powerpc machine types
Colin Watson [Tue, 28 Jan 2014 14:40:02 +0000 (14:40 +0000)]
Port yaboot logic for various powerpc machine types

Some powerpc machines require not updating the NVRAM.  This can be handled
by existing grub-install command-line options, but it's friendlier to detect
this automatically.

On chrp_ibm machines, use the nvram utility rather than nvsetenv.  (This
is possibly suitable for other machines too, but that needs to be
verified.)

Forwarded: no
Last-Update: 2014-10-15

Patch-Name: install_powerpc_machtypes.patch

6 years agoDon't run gettext_strings_test
Colin Watson [Mon, 13 Jan 2014 12:13:34 +0000 (12:13 +0000)]
Don't run gettext_strings_test

This test is mainly useful as an upstream maintenance check.

Forwarded: not-needed
Last-Update: 2013-12-23

Patch-Name: skip_gettext_strings_test.patch

6 years agoAdd GRUB_RECOVERY_TITLE option
Colin Watson [Mon, 13 Jan 2014 12:13:33 +0000 (12:13 +0000)]
Add GRUB_RECOVERY_TITLE option

This allows the controversial "recovery mode" text to be customised.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1240360
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_recovery_title.patch

6 years agoIgnore functional test failures for now as they are broken
Colin Watson [Mon, 13 Jan 2014 12:13:32 +0000 (12:13 +0000)]
Ignore functional test failures for now as they are broken

See: https://lists.gnu.org/archive/html/grub-devel/2013-11/msg00242.html

Forwarded: not-needed
Last-Update: 2013-11-19

Patch-Name: ignore_grub_func_test_failures.patch

6 years agoProbe FusionIO devices
Colin Watson [Mon, 13 Jan 2014 12:13:31 +0000 (12:13 +0000)]
Probe FusionIO devices

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1237519
Forwarded: no
Last-Update: 2016-09-18

Patch-Name: probe_fusionio.patch

6 years agoAdd configure option to use vt.handoff=7
Colin Watson [Mon, 13 Jan 2014 12:13:30 +0000 (12:13 +0000)]
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

6 years agoAdd configure option to enable gfxpayload=keep dynamically
Evan Broder [Mon, 13 Jan 2014 12:13:29 +0000 (12:13 +0000)]
Add configure option to enable gfxpayload=keep dynamically

Set GRUB_GFXPAYLOAD_LINUX=keep unless it's known to be unsupported on
the current hardware.  See
https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-grub2-boot-framebuffer.

Author: Colin Watson <cjwatson@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_dynamic.patch

6 years agoAdd configure option to bypass boot menu if possible
Colin Watson [Mon, 13 Jan 2014 12:13:28 +0000 (12:13 +0000)]
Add configure option to bypass boot menu if possible

If other operating systems are installed, then automatically unhide the
menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus if
available to check whether Shift is pressed.  If it is, show the menu,
otherwise boot immediately.  If keystatus is not available, then fall
back to a short delay interruptible with Escape.

This may or may not remain Ubuntu-specific, although it's not obviously
wanted upstream.  It implements a requirement of
https://wiki.ubuntu.com/DesktopExperienceTeam/KarmicBootExperienceDesignSpec#Bootloader.

If the previous boot failed (defined as failing to get to the end of one
of the normal runlevels), then show the boot menu regardless.

Author: Richard Laager <rlaager@wiktel.com>
Author: Robie Basak <robie.basak@ubuntu.com>
Forwarded: no
Last-Update: 2015-09-04

Patch-Name: quick_boot.patch

6 years agoCope with Kubuntu setting GRUB_DISTRIBUTOR
Colin Watson [Mon, 13 Jan 2014 12:13:27 +0000 (12:13 +0000)]
Cope with Kubuntu setting GRUB_DISTRIBUTOR

This is not a very good approach, and certainly not sanely upstreamable;
we probably need to split GRUB_DISTRIBUTOR into a couple of different
variables.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1242417
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_efi_ubuntu_flavours.patch

6 years agoAdd configure option to reduce visual clutter at boot time
Colin Watson [Mon, 13 Jan 2014 12:13:26 +0000 (12:13 +0000)]
Add configure option to reduce visual clutter at boot time

If this option is enabled, then do all of the following:

Don't display introductory message about line editing unless we're
actually offering a shell prompt.  (This is believed to be a workaround
for a different bug.  We'll go with this for now, but will drop this in
favour of a better fix upstream if somebody figures out what that is.)

Don't clear the screen just before booting if we never drew the menu in
the first place.

Remove verbose messages printed before reading configuration.  In some
ways this is awkward because it makes debugging harder, but it's a
requirement for a smooth-looking boot process; we may be able to do
better in future.  Upstream doesn't want this, though.

Disable the cursor as well, for similar reasons of tidiness.

Suppress kernel/initrd progress messages, except in recovery mode.

Suppress "GRUB loading" message unless Shift is held down.  Upstream
doesn't want this, as it makes debugging harder.  Ubuntu wants it to
provide a cleaner boot experience.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/386922
Bug-Ubuntu: https://bugs.launchpad.net/bugs/861048
Forwarded: (partial) http://lists.gnu.org/archive/html/grub-devel/2009-09/msg00056.html
Last-Update: 2014-01-03

Patch-Name: maybe_quiet.patch

6 years agoSkip Windows os-prober entries on Wubi systems
Colin Watson [Mon, 13 Jan 2014 12:13:24 +0000 (12:13 +0000)]
Skip Windows os-prober entries on Wubi systems

Since we're already being booted from the Windows boot loader, including
entries that take us back to it mostly just causes confusion, and stops
us from being able to hide the menu if there are no other OSes
installed.

https://blueprints.launchpad.net/ubuntu/+spec/foundations-o-wubi

Forwarded: not-needed
Last-Update: 2013-11-26

Patch-Name: wubi_no_windows.patch

6 years agoAllow Shift to interrupt 'sleep --interruptible'
Colin Watson [Mon, 13 Jan 2014 12:13:23 +0000 (12:13 +0000)]
Allow Shift to interrupt 'sleep --interruptible'

Upstream would like to consider this at more length. See
http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00718.html, and
the rest of the thread for context.

Forwarded: http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00694.html
Last-Update: 2013-12-04

Patch-Name: sleep_shift.patch

6 years agoInstall signed images if UEFI Secure Boot is enabled
Colin Watson [Mon, 13 Jan 2014 12:13:22 +0000 (12:13 +0000)]
Install signed images if UEFI Secure Boot is enabled

Author: Stéphane Graber <stgraber@ubuntu.com>
Author: Steve Langasek <steve.langasek@ubuntu.com>
Author: Linn Crosetto <linn@hpe.com>
Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
Forwarded: no
Last-Update: 2016-11-01

Patch-Name: install_signed.patch

6 years agoGenerate configuration for signed UEFI kernels if available
Colin Watson [Mon, 13 Jan 2014 12:13:21 +0000 (12:13 +0000)]
Generate configuration for signed UEFI kernels if available

Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_signed_kernel.patch

6 years agoIf running under UEFI secure boot, attempt to use linuxefi loader
Colin Watson [Mon, 13 Jan 2014 12:13:20 +0000 (12:13 +0000)]
If running under UEFI secure boot, attempt to use linuxefi loader

Author: Steve Langasek <steve.langasek@canonical.com>
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: linuxefi_non_sb_fallback.patch

6 years agoMake linuxefi refuse to boot without shim
Colin Watson [Mon, 13 Jan 2014 12:13:19 +0000 (12:13 +0000)]
Make linuxefi refuse to boot without shim

This is only intended as a temporary measure.

Forwarded: not-needed
Last-Update: 2013-01-29

Patch-Name: linuxefi_require_shim.patch

6 years agoAdd more debugging to linuxefi
Colin Watson [Mon, 13 Jan 2014 12:13:18 +0000 (12:13 +0000)]
Add more debugging to linuxefi

Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi_debug.patch

6 years agoAdd "linuxefi" loader which avoids ExitBootServices
Matthew Garrett [Mon, 13 Jan 2014 12:13:15 +0000 (12:13 +0000)]
Add "linuxefi" loader which avoids ExitBootServices

Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub2-linuxefi.patch
Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi.patch

6 years agoRemove GNU/Linux from default distributor string for Ubuntu
Mario Limonciello [Mon, 13 Jan 2014 12:13:14 +0000 (12:13 +0000)]
Remove GNU/Linux from default distributor string for Ubuntu

Ubuntu is called "Ubuntu", not "Ubuntu GNU/Linux".

Author: Colin Watson <cjwatson@debian.org>
Author: Harald Sitter <apachelogger@kubuntu.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_distributor.patch

6 years agoOutput a menu entry for firmware setup on UEFI FastBoot systems
Steve Langasek [Mon, 13 Jan 2014 12:13:12 +0000 (12:13 +0000)]
Output a menu entry for firmware setup on UEFI FastBoot systems

Forwarded: no
Last-Update: 2015-09-04

Patch-Name: uefi_firmware_setup.patch

6 years agoBlacklist 1440x900x32 from VBE preferred mode handling
Colin Watson [Mon, 13 Jan 2014 12:13:11 +0000 (12:13 +0000)]
Blacklist 1440x900x32 from VBE preferred mode handling

Bug-Ubuntu: https://bugs.launchpad.net/bugs/701111
Forwarded: no
Last-Update: 2013-11-14

Patch-Name: blacklist_1440x900x32.patch

6 years agoRead /etc/default/grub.d/*.cfg after /etc/default/grub
Colin Watson [Mon, 13 Jan 2014 12:13:10 +0000 (12:13 +0000)]
Read /etc/default/grub.d/*.cfg after /etc/default/grub

Bug-Ubuntu: https://bugs.launchpad.net/bugs/901600
Forwarded: no
Last-Update: 2014-01-28

Patch-Name: default_grub_d.patch

6 years agoDon't permit loading modules on UEFI secure boot
Matthew Garrett [Mon, 13 Jan 2014 12:13:09 +0000 (12:13 +0000)]
Don't permit loading modules on UEFI secure boot

Author: Colin Watson <cjwatson@ubuntu.com>
Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub-2.00-no-insmod-on-sb.patch
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: no_insmod_on_sb.patch

6 years agoAvoid getting confused by inaccessible loop device backing paths
Colin Watson [Mon, 13 Jan 2014 12:13:08 +0000 (12:13 +0000)]
Avoid getting confused by inaccessible loop device backing paths

Bug-Ubuntu: https://bugs.launchpad.net/bugs/938724
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: mkconfig_nonexistent_loopback.patch

6 years agoPrefer translations from Ubuntu language packs if available
Colin Watson [Mon, 13 Jan 2014 12:13:07 +0000 (12:13 +0000)]
Prefer translations from Ubuntu language packs if available

Bug-Ubuntu: https://bugs.launchpad.net/bugs/537998
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_locale_langpack.patch

6 years ago"single" -> "recovery" when friendly-recovery is installed
Colin Watson [Mon, 13 Jan 2014 12:13:06 +0000 (12:13 +0000)]
"single" -> "recovery" when friendly-recovery is installed

If configured with --enable-ubuntu-recovery, also set nomodeset for
recovery mode, and disable 'set gfxpayload=keep' even if the system
normally supports it.  See
https://launchpad.net/ubuntu/+spec/desktop-o-xorg-tools-and-processes.

Author: Stéphane Graber <stgraber@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_recovery.patch

6 years agoFall back to i386-pc if booted using EFI but -efi is missing
Colin Watson [Mon, 13 Jan 2014 12:13:05 +0000 (12:13 +0000)]
Fall back to i386-pc if booted using EFI but -efi is missing

It may be possible, particularly in recovery situations, to be booted
using EFI on x86 when only the i386-pc target is installed.  There's
nothing actually stopping us installing i386-pc from an EFI environment,
and it's better than returning a confusing error.

Forwarded: no
Last-Update: 2013-12-20

Patch-Name: install_efi_fallback.patch

6 years agoBail out if trying to run grub-mkconfig during upgrade to 2.00
Colin Watson [Mon, 13 Jan 2014 12:13:03 +0000 (12:13 +0000)]
Bail out if trying to run grub-mkconfig during upgrade to 2.00

Since files in /etc/grub.d/ are conffiles, they are not put in place
until grub-common is configured, meaning that they may be out of sync
with the parts of grub-mkconfig that reside in /usr/.  In GRUB 1.99,
/etc/grub.d/00_header contained a reference to ${GRUB_PREFIX}/video.lst.
This and other code from 1.99 breaks with 2.00's grub-mkconfig.
Deferring this to when grub-PLATFORM.postinst eventually runs is safe
and avoids this problem.

Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_mid_upgrade.patch

6 years agoSilence error messages when translations are unavailable
Colin Watson [Mon, 13 Jan 2014 12:13:02 +0000 (12:13 +0000)]
Silence error messages when translations are unavailable

Bug: https://savannah.gnu.org/bugs/?35880
Forwarded: https://savannah.gnu.org/bugs/?35880
Last-Update: 2013-11-14

Patch-Name: gettext_quiet.patch

6 years agoRestore grub-mkdevicemap
Colin Watson [Mon, 13 Jan 2014 12:13:01 +0000 (12:13 +0000)]
Restore grub-mkdevicemap

This is kind of a mess, requiring lots of OS-specific code to iterate
over all possible devices.  However, we use it in a number of scripts to
discover devices and reimplementing those in terms of something else
would be very complicated.

Author: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Forwarded: no
Last-Update: 2018-03-16

Patch-Name: restore_mkdevicemap.patch

6 years agoHandle filesystems loop-mounted on file images
Colin Watson [Mon, 13 Jan 2014 12:13:00 +0000 (12:13 +0000)]
Handle filesystems loop-mounted on file images

Improve prepare_grub_to_access_device to emit appropriate commands for
such filesystems, and ignore them in Linux grub.d scripts.

This is needed for Ubuntu's Wubi installation method.

This patch isn't inherently Debian/Ubuntu-specific.  losetup and
/proc/mounts are Linux-specific, though, so we might need to refine this
before sending it upstream.  The changes to the Linux grub.d scripts
might be better handled by integrating 10_lupin properly instead.

Patch-Name: mkconfig_loopback.patch

6 years agoBuild vfat into EFI boot images
Mario Limonciello [Mon, 13 Jan 2014 12:12:59 +0000 (12:12 +0000)]
Build vfat into EFI boot images

Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/677758
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00028.html
Last-Update: 2016-09-18

Patch-Name: mkrescue_efi_modules.patch

6 years agoIf GRUB Legacy is still around, tell packaging to ignore it
Colin Watson [Mon, 13 Jan 2014 12:12:58 +0000 (12:12 +0000)]
If GRUB Legacy is still around, tell packaging to ignore it

Bug-Debian: http://bugs.debian.org/586143
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_stage2_confusion.patch

6 years agoDisable gfxpayload=keep by default
Colin Watson [Mon, 13 Jan 2014 12:12:57 +0000 (12:12 +0000)]
Disable gfxpayload=keep by default

Setting gfxpayload=keep has been known to cause efifb to be
inappropriately enabled.  In any case, with the current Linux kernel the
result of this option is that early kernelspace will be unable to print
anything to the console, so (for example) if boot fails and you end up
dumped to an initramfs prompt, you won't be able to see anything on the
screen.  As such it shouldn't be enabled by default in Debian, no matter
what kernel options are enabled.

gfxpayload=keep is a good idea but rather ahead of its time ...

Bug-Debian: http://bugs.debian.org/567245
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_keep_default.patch

6 years agoMake grub.cfg world-readable if it contains no passwords
Colin Watson [Mon, 13 Jan 2014 12:12:55 +0000 (12:12 +0000)]
Make grub.cfg world-readable if it contains no passwords

Patch-Name: grub.cfg_400.patch

6 years agoDisable use of floppy devices
Colin Watson [Mon, 13 Jan 2014 12:12:54 +0000 (12:12 +0000)]
Disable use of floppy devices

An ugly kludge.  Should this be merged upstream?

Author: Robert Millan

Patch-Name: disable_floppies.patch

6 years agoSupport running grub-probe in grub-legacy's update-grub
Robert Millan [Mon, 13 Jan 2014 12:12:53 +0000 (12:12 +0000)]
Support running grub-probe in grub-legacy's update-grub

Author: Colin Watson <cjwatson@debian.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: grub_legacy_0_based_partitions.patch

6 years agoImprove handling of Debian kernel version numbers
Robert Millan [Mon, 13 Jan 2014 12:12:52 +0000 (12:12 +0000)]
Improve handling of Debian kernel version numbers

Forwarded: not-needed
Last-Update: 2013-12-20

Patch-Name: dpkg_version_comparison.patch

6 years agoWrite marker if core.img was written to filesystem
Colin Watson [Mon, 13 Jan 2014 12:12:51 +0000 (12:12 +0000)]
Write marker if core.img was written to filesystem

The Debian bug reporting script includes a warning in this case.

Patch-Name: core_in_fs.patch

6 years agoHack prefix for OLPC
Colin Watson [Mon, 13 Jan 2014 12:12:50 +0000 (12:12 +0000)]
Hack prefix for OLPC

This sucks, but it's better than what OFW was giving us.

Patch-Name: olpc_prefix_hack.patch

6 years agoImport replacement CRC operations from libgcrypt
Colin Watson [Fri, 16 Feb 2018 11:02:19 +0000 (11:02 +0000)]
Import replacement CRC operations from libgcrypt

Mostly backported from
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=06e122baa3321483a47bbf82fd2a4540becfa0c9,
but importing bufhelp.h from libgcrypt 1.7.0 as well.  We can drop this
once GRUB updates to a newer import of libgcrypt.

The new implementation is not encumbered by the restrictive Internet
Society licence on RFCs.

Bug-Debian: https://bugs.debian.org/745409
Last-Update: 2018-02-16

Patch-Name: replace-libgcrypt-crc.patch

6 years agoRemove RFC-licence-encumbered CRC implementation
Colin Watson [Fri, 16 Feb 2018 10:55:45 +0000 (10:55 +0000)]
Remove RFC-licence-encumbered CRC implementation

We'll replace this with a free version imported from newer versions of
libgcrypt.

https://bugs.debian.org/745409

7 years agoImport grub2_2.02.orig.tar.xz
Colin Watson [Fri, 23 Jun 2017 09:07:51 +0000 (10:07 +0100)]
Import grub2_2.02.orig.tar.xz

7 years agoIncrease version to 2.02.
Vladimir Serbinenko [Tue, 25 Apr 2017 14:23:16 +0000 (16:23 +0200)]
Increase version to 2.02.

7 years agoFix remaining cases of gcc 7 fallthrough warning.
Vladimir Serbinenko [Wed, 12 Apr 2017 01:42:38 +0000 (01:42 +0000)]
Fix remaining cases of gcc 7 fallthrough warning.

They are all intended, so just add the relevant comment.

7 years agoAdd gnulib-fix-gcc7-fallthrough.diff
Andrei Borzenkov [Tue, 4 Apr 2017 16:37:47 +0000 (19:37 +0300)]
Add gnulib-fix-gcc7-fallthrough.diff

As long as the code is not upstream, add it as explicit patch for the
case of gnulib refresh.

7 years agoi386, x86_64, ppc: fix switch fallthrough cases with GCC7
Andrei Borzenkov [Tue, 4 Apr 2017 16:23:55 +0000 (19:23 +0300)]
i386, x86_64, ppc: fix switch fallthrough cases with GCC7

In util/getroot and efidisk slightly modify exitsing comment to mostly
retain it but still make GCC7 compliant with respect to fall through
annotation.

In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as
upstream.

In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to
suppress GCC7 warning.

In grub-core/gnulib/regexec.c use new __attribute__, because existing
annotation is not recognized by GCC7 parser (which requires that comment
immediately precedes case statement).

Otherwise add FALLTHROUGH comment.

Closes: 50598
7 years agobtrfs: avoid "used uninitialized" error with GCC7
Andrei Borzenkov [Tue, 4 Apr 2017 16:22:32 +0000 (19:22 +0300)]
btrfs: avoid "used uninitialized" error with GCC7

sblock was local and so considered new variable on every loop
iteration.

Closes: 50597
7 years agoacpi: add missing efi_call wrapper to acpi command
Andrei Borzenkov [Sun, 2 Apr 2017 11:47:20 +0000 (14:47 +0300)]
acpi: add missing efi_call wrapper to acpi command

Fixed loading of ACPI tables on EFI (side effect was apparent memory
corruption ranging from unpredictable behavior to system reset).

Reported by Nando Eva <nando4eva@ymail.com>

7 years agoIncrement version to GRUB 2.02~rc2.
Vladimir Serbinenko [Wed, 15 Mar 2017 08:20:29 +0000 (09:20 +0100)]
Increment version to GRUB 2.02~rc2.

7 years agoUse core2duo for bootcheck test on 64-bit EFI.
Vladimir Serbinenko [Wed, 15 Mar 2017 08:20:14 +0000 (09:20 +0100)]
Use core2duo for bootcheck test on 64-bit EFI.

Obviously pentium2 can't run efi64.

7 years agoefi: skip iPXE block device.
Andrei Borzenkov [Tue, 14 Mar 2017 04:12:32 +0000 (04:12 +0000)]
efi: skip iPXE block device.

iPXE adds Simple File System Protocol to loaded image handle, as side
effect it also adds Block IO protocol (according to comments, to work
around some bugs in EDK2). GRUB assumes that every device with Block IO
is disk and skips network initialization entirely. But iPXE Block IO
implementation is just a stub which always fails for every operation
so cannot be used. Attempt to detect and skip such devices.

We are using media ID which iPXE sets to "iPXE" and block IO size in
hope that no real device would announce 1B block ...

Closes: 50518
7 years agoxen: Fix wrong register in relocator.
phcoder [Sun, 5 Mar 2017 09:04:07 +0000 (10:04 +0100)]
xen: Fix wrong register in relocator.

This fixes chainloading of some GRUB variants.

7 years agovideo_fb: Fix blue collor if using unoptimized blitter.
Vladimir Serbinenko [Thu, 9 Feb 2017 01:22:24 +0000 (02:22 +0100)]
video_fb: Fix blue collor if using unoptimized blitter.

when unmapping the color what matters is the mode of source, not target.

7 years agolegacy_initrd: Strip any additional arguments to initrd.
Vladimir Serbinenko [Fri, 24 Feb 2017 21:23:09 +0000 (21:23 +0000)]
legacy_initrd: Strip any additional arguments to initrd.

7 years agogrub-fs-tester: improve squash4 tests
Andrei Borzenkov [Sun, 26 Feb 2017 11:38:04 +0000 (14:38 +0300)]
grub-fs-tester: improve squash4 tests

1. Make sure files are not multiple of block size. This will ensure tail packing
for squash4 and may also trigger more codes paths in other filesystems.

2. Call mksquashfs with -always-use-fragments to force tail packing.

7 years agoefi: strip off final NULL from File Path in grub_efi_get_filename
Andrei Borzenkov [Sat, 25 Feb 2017 05:39:38 +0000 (08:39 +0300)]
efi: strip off final NULL from File Path in grub_efi_get_filename

UEFI 2.6 9.3.6.4 File Path Media Device Path says that Path Name is
"A NULL-terminated Path string including directory and file names".

Strip final NULL from Path Name in each File Path node when constructing
full path. To be on safe side, strip all of them.

Fixes failure chainloading grub from grub, when loaded grub truncates
image path and does not find its grub.cfg.

https://bugzilla.opensuse.org/show_bug.cgi?id=1026344

This was triggered by commit ce95549cc54b5d6f494608a7c390dba3aab4fba7;
before it we built Path Name without trailing NULL, and apparently all
other bootloaders use single File Path node, thus not exposing this bug.

7 years agosquash4: fix handling of fragments and sparse files
Andrei Borzenkov [Fri, 24 Feb 2017 16:10:43 +0000 (19:10 +0300)]
squash4: fix handling of fragments and sparse files

1. Do not assume block list and fragment are mutually exclusive. Squash
can pack file tail as fragment (unless -no-fragments is specified); so
check read offset and read either from block list or from fragments as
appropriate.

2. Support sparse files with zero blocks.

3. Fix fragment read - frag.offset is absolute fragment position,
not offset relative to ino.chunk.

Reported and tested by Carlo Caione <carlo@endlessm.com>

7 years agoWhitelist sparc64-ieee1275 as having no video modules.
Vladimir Serbinenko [Wed, 22 Feb 2017 08:55:51 +0000 (09:55 +0100)]
Whitelist sparc64-ieee1275 as having no video modules.

ieee1275_fb is not built on sparc64 due to virtual address issues.

7 years agoscript: fix double free in lexer
Andrei Borzenkov [Sun, 12 Feb 2017 06:23:34 +0000 (09:23 +0300)]
script: fix double free in lexer

yylex_destroy() already frees scanner.

Found by: Coverity scan.
CID: 176636

7 years agoxen: Fix parsing of XZ kernel.
Vladimir Serbinenko [Mon, 6 Feb 2017 23:47:23 +0000 (00:47 +0100)]
xen: Fix parsing of XZ kernel.

In case of xz, the uncompressed size is appended to xz data which confuses
our xz decompressor. Trim it.

7 years agoxen: Fix handling of GRUB chainloading.
Vladimir Serbinenko [Mon, 6 Feb 2017 23:42:43 +0000 (00:42 +0100)]
xen: Fix handling of GRUB chainloading.

In case of GRUB we put remapper after domain pages and not at 0x0.
In this case we use max_addr to put remapper. Unfortunately we increment
max_addr as well in this case resulting in virt mapping mapping page
at old max_addr and trying to boot using new max_addr.

Closes 46014.

7 years agolinguas: Don't skip ko.po.
Vladimir Serbinenko [Fri, 3 Feb 2017 23:06:57 +0000 (00:06 +0100)]
linguas: Don't skip ko.po.

Translation project doesn't require copyright disclaimers. They're independant
from us. They're responsible for their copyright story.

7 years agoFix truncated checksum.h.
Vladimir Serbinenko [Fri, 3 Feb 2017 19:17:48 +0000 (20:17 +0100)]
Fix truncated checksum.h.

7 years agoRegenerate checksums.h
Vladimir Serbinenko [Fri, 3 Feb 2017 12:41:13 +0000 (13:41 +0100)]
Regenerate checksums.h

Screenshots contain version, so we need new checksums.

7 years agoRelease 2.02-rc1.
Vladimir Serbinenko [Fri, 3 Feb 2017 11:34:21 +0000 (12:34 +0100)]
Release 2.02-rc1.

7 years agoFix mingw compilation.
Vladimir Serbinenko [Fri, 3 Feb 2017 11:59:50 +0000 (12:59 +0100)]
Fix mingw compilation.

7 years agodocumentation: Clarify documentation for special environment variable "default".
Daniel Kahn Gillmor [Fri, 3 Feb 2017 11:32:25 +0000 (12:32 +0100)]
documentation: Clarify documentation for special environment variable "default".

The current documentation for the special environment variable
"default" is confusing and unclear.  This patch attempts to clean it
up.

In particular, the current documentation refers to the "number or
title", but then in the example it gives, the menu entries and
submenus all have numbers *in* their title; furthermore, there is no
example given about how to choose the number, or any indication about
whether counting is zero-indexed or 1-indexed.

Having a cleaner example and presenting all variants (numeric, title,
and id) should make it clearer to the user.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
7 years agoAvoid causing kernel oops in nilfs2 test.
Vladimir Serbinenko [Thu, 2 Feb 2017 23:34:07 +0000 (00:34 +0100)]
Avoid causing kernel oops in nilfs2 test.

1024-byte and 2048-byte blocks don't really work with some kernels, skip
them as we don't want any oops'es.

7 years agobtrfs: Shorten label by one character.
Vladimir Serbinenko [Thu, 2 Feb 2017 23:30:29 +0000 (00:30 +0100)]
btrfs: Shorten label by one character.

mkfs.btrfs imposes a slightly lower limit than would be possible in btrfs.

7 years agogrub-fs-tester: Fix mkudffs invocation.
Vladimir Serbinenko [Thu, 2 Feb 2017 22:32:38 +0000 (23:32 +0100)]
grub-fs-tester: Fix mkudffs invocation.

With current invocation order of arguments is wrong and path is hardcoded.

7 years agogrub-fs-tester: Fix fat test.
Vladimir Serbinenko [Thu, 2 Feb 2017 22:19:00 +0000 (23:19 +0100)]
grub-fs-tester: Fix fat test.

mkfs.vfat ignores -S when invoked on a disk, including loopback device,
so do an mkfs on underlying image.

7 years agoi386/relocator: Align stack in grub_relocator64_efi relocator
Daniel Kiper [Thu, 2 Feb 2017 14:19:18 +0000 (15:19 +0100)]
i386/relocator: Align stack in grub_relocator64_efi relocator

Unified Extensible Firmware Interface Specification, Version 2.6,
section 2.3.4, x64 Platforms, boot services, says among others:
The stack must be 16-byte aligned. So, do it. Otherwise OS may
boot only by chance as it happens right now.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
7 years agoi386-ieee1275: Add missing bootcheck target.
Vladimir Serbinenko [Thu, 2 Feb 2017 20:41:33 +0000 (21:41 +0100)]
i386-ieee1275: Add missing bootcheck target.

7 years agobootcheck-linux-i386: Use -cpu pentium2.
Vladimir Serbinenko [Thu, 2 Feb 2017 20:41:18 +0000 (21:41 +0100)]
bootcheck-linux-i386: Use -cpu pentium2.

Most modern kernels are compiled for i686, so use -cpu pentium2
to avoid spurious failures.

7 years agoUse -fPIC with arm64 with clang.
Vladimir Serbinenko [Thu, 2 Feb 2017 00:24:11 +0000 (01:24 +0100)]
Use -fPIC with arm64 with clang.

Currently it doesn't work either way but with -fPIC it should work once
clang bug is fixed.

7 years agoINSTALL: Fix mention of thumb-clang.
Vladimir Serbinenko [Thu, 2 Feb 2017 00:11:52 +0000 (01:11 +0100)]
INSTALL: Fix mention of thumb-clang.

7 years agoFix thumb compilation with clang.
Vladimir Serbinenko [Wed, 1 Feb 2017 23:59:49 +0000 (00:59 +0100)]
Fix thumb compilation with clang.

According to EABI only STT_FUNC has convention of lowest bit indicating
execution mode. R_THM_{JUMP,CALL}* relocations are assumed to be pointing
to thumb mode unless they use STT_FUNC.

7 years agoAdd missing strtoull_test.c
Vladimir Serbinenko [Wed, 1 Feb 2017 20:50:17 +0000 (21:50 +0100)]
Add missing strtoull_test.c

It was forgotten in my local directory.

7 years agoarm64: Add support for GOT and PCREL32 relocations.
Vladimir Serbinenko [Wed, 1 Feb 2017 20:46:19 +0000 (21:46 +0100)]
arm64: Add support for GOT and PCREL32 relocations.

7 years agomkimage: Fix memory leak.
Vladimir Serbinenko [Wed, 1 Feb 2017 20:21:17 +0000 (21:21 +0100)]
mkimage: Fix memory leak.

7 years agoarm/arm64: Fix improper use of start address.
Vladimir Serbinenko [Wed, 1 Feb 2017 19:12:07 +0000 (20:12 +0100)]
arm/arm64: Fix improper use of start address.

It was used instead of loading address of current section or of entire buffer.

7 years agoia64: Fix iterator for relocation entries.
Vladimir Serbinenko [Wed, 1 Feb 2017 19:10:26 +0000 (20:10 +0100)]
ia64: Fix iterator for relocation entries.

Don't assume relocation entry size and use sh_entsize properly.

7 years agoarm: Fix trampoline generation.
Vladimir Serbinenko [Wed, 1 Feb 2017 14:58:36 +0000 (15:58 +0100)]
arm: Fix trampoline generation.

We used the wrong pointer in this case. It worked only by accident.

7 years agoFix bootcheck-related files compilation.
Vladimir Serbinenko [Wed, 1 Feb 2017 14:57:08 +0000 (15:57 +0100)]
Fix bootcheck-related files compilation.

We need -static as otherwise linker will set interpreter field and ld.so
is not available on our initrd's.
Strip all sections we don't need on binary tests.

7 years agoRegenerate checksum.h.
Vladimir Serbinenko [Tue, 31 Jan 2017 21:36:11 +0000 (22:36 +0100)]
Regenerate checksum.h.

Screenshots checked.
Using unifont from http://ftp.us.debian.org/debian/pool/main/u/unifont/xfonts-unifont_7.0.06-1_all.deb.

7 years agogrub-mkfont: Remove leftover debug statement.
Vladimir Serbinenko [Tue, 31 Jan 2017 21:32:21 +0000 (22:32 +0100)]
grub-mkfont: Remove leftover debug statement.

7 years agocharset: Trim away RLM and LRM.
Vladimir Serbinenko [Tue, 31 Jan 2017 18:29:31 +0000 (19:29 +0100)]
charset: Trim away RLM and LRM.

They are not visible but would otherwise end up as [LRM] or [RLM] squares
with some fonts.

7 years agogfxterm: Fix clearing of cursor.
Vladimir Serbinenko [Tue, 31 Jan 2017 17:49:37 +0000 (18:49 +0100)]
gfxterm: Fix clearing of cursor.

If ascent is bigger than height - 2, then we draw over character box but then
to clear cursor we only draw over character box. So trim ascent if necessarry.

7 years agoia64: Add support for R_IA64_GPREL64I.
Vladimir Serbinenko [Tue, 31 Jan 2017 11:39:01 +0000 (12:39 +0100)]
ia64: Add support for R_IA64_GPREL64I.

Recent GCC generates those relocations, so we need to support them.

7 years agogrub-module-verifier: Add mips to all_video whitelist.
Vladimir Serbinenko [Mon, 30 Jan 2017 18:52:58 +0000 (19:52 +0100)]
grub-module-verifier: Add mips to all_video whitelist.

On MIPS video is compiled-in. So all_video is empty. Whitelist it.

7 years agoFix -nopie/-nopie check.
Vladimir Serbinenko [Mon, 30 Jan 2017 13:38:50 +0000 (14:38 +0100)]
Fix -nopie/-nopie check.

We don't use lgcc_s but missing lgcc_s or another library cause test to fail.
So use -nostdlib.
We need to use -Werror to avoid warning-generated case to be accepted.
Clang uses -nopie rather than -no-pie. Check both and use whichever one works.
Additionally android clang passes -pie to the linker even though it doesn't
define __PIE__. So if compilation without no-pie logic fails add -nopie/-no-pie
even if __PIE__ is not defined.

7 years agogrub-module-verifier: Ignore all_video emptiness on xen.
Vladimir Serbinenko [Mon, 30 Jan 2017 00:13:41 +0000 (00:13 +0000)]
grub-module-verifier: Ignore all_video emptiness on xen.

It's intentional that it's empty when no video modules
are available.

7 years agoSupport arm clang 3.8 amd later.
Vladimir Serbinenko [Sat, 28 Jan 2017 14:41:23 +0000 (14:41 +0000)]
Support arm clang 3.8 amd later.

clang 3.8 and later doesn't support -mllvm -use-arm-movt=0
whereas older clang doesn't know -mno-movt. So use
-mno-movt whenever possible and fallback to mllvm variant.

7 years agoexfat: Support files over 4GiB
Carlo Caione [Fri, 27 Jan 2017 22:10:21 +0000 (22:10 +0000)]
exfat: Support files over 4GiB

file size in grub_fat_data was 32-bit on exfat.

7 years agoEnsure that grub_reboot doesn't return on emu.
Vladimir Serbinenko [Mon, 23 Jan 2017 20:32:25 +0000 (23:32 +0300)]
Ensure that grub_reboot doesn't return on emu.

Use grub_fatal if longjmp fails.

grub_reboot is marked as noreturn so return would cause
a crash.

7 years agogrub-shell: skip font copying when no font is available.
Vladimir Serbinenko [Mon, 23 Jan 2017 18:25:25 +0000 (21:25 +0300)]
grub-shell: skip font copying when no font is available.

7 years agoDon't use -mlong-calls on arm.
Vladimir Serbinenko [Mon, 23 Jan 2017 20:57:23 +0000 (23:57 +0300)]
Don't use -mlong-calls on arm.

We don't really need it and it's flaky and creates
bogus symbols with clang.

7 years agoconfigure: Disable movw/movt with clang.
Vladimir Serbinenko [Sun, 22 Jan 2017 21:52:32 +0000 (00:52 +0300)]
configure: Disable movw/movt with clang.

Those relocations are not compatible with PE and also
not compatible with custom uboot relocator.
Disable them.