* New upstream release.

- Ensure uniqueness of RAID array numbers even if some elements have a
    name (closes: #609804).
  - Remove unnecessary brackets from tr arguments (closes: #612564).
  - Add grub-mkrescue info documentation (closes: #612585).
  - Avoid generating invalid configuration when something that looks like
    a Xen hypervisor is present without any Xen kernels (closes: #612898).
  - Fix memory alignment when calling 'linux' multiple times on EFI
    (closes: #616638).
  - Fix grub-install on amd64 EFI systems (closes: #617388).
  - Automatically export pager variable (closes: #612995).
  - Fix parser error with "time" (closes: #612991).
  - Ignore case of bitmap extensions (closes: #611123).
  - Skip vmlinux-* on x86 platforms (closes: #536846, #546008).
  - Accept old-style Xen kernels (closes: #610428).
  - Skip damaged LVM volumes (closes: #544731).
  - Handle LVM mirroring (closes: #598441).
  - Detect spares and report them as not RAID members (closes: #611561).
  - Don't enable localisation unless gfxterm is available (closes:
    #604609).
  - Fix partitioned RAID support (closes: #595071, #613444).
  - Dynamically count the number of lines for the lower banner (closes:
    #606494).
  - Improve quoting in grub-mkconfig, to support background image file
    names containing spaces (closes: #612417).
  - Flush BIOS disk devices more accurately (closes: #623124).
* Update branch_embed-sectors.patch:
  - Detect sector used by HighPoint RAID controller (closes: #394868).
This commit is contained in:
Colin Watson 2011-04-21 12:55:46 +01:00
commit c3f791031d
301 changed files with 7089 additions and 4336 deletions

View File

@ -46,7 +46,6 @@ grub-kbdcomp
grub-macho2img
grub-menulst2cfg
grub-mk*
grub-mkpasswd-pbkdf2
grub-pe2elf
grub-probe
grub_probe_init.c
@ -136,3 +135,5 @@ grub-core/gnulib/wctype.h
grub-core/rs_decoder.S
widthspec.bin
widthspec.h
docs/stamp-1
docs/version-dev.texi

1027
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -147,28 +147,28 @@ linux.init.i386: $(srcdir)/grub-core/tests/boot/linux.init-i386.S
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
kfreebsd.aout: kfreebsd.elf
$(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
$(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x7c00 -m32
$(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x7c00 -m32
pc-chainloader.bin: pc-chainloader.elf
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0 -m32
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0 -m32
ntldr.bin: ntldr.elf
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S
$(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@

View File

@ -83,6 +83,7 @@ library = {
common = grub-core/lib/LzFind.c;
common = grub-core/lib/LzmaEnc.c;
common = grub-core/lib/pbkdf2.c;
common = grub-core/lib/crc.c;
common = grub-core/normal/datetime.c;
common = grub-core/normal/misc.c;
common = grub-core/partmap/acorn.c;
@ -98,6 +99,7 @@ library = {
common = grub-core/script/main.c;
common = grub-core/script/script.c;
common = grub-core/script/argv.c;
common = grub-core/io/gzio.c;
};
program = {
@ -122,7 +124,7 @@ program = {
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBLZMA)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
};
@ -135,7 +137,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -147,7 +149,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -159,7 +161,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -171,7 +173,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cflags = '$(CFLAGS_GCRY)';
cppflags = '$(CPPFLAGS_GCRY)';
};
@ -209,7 +211,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -224,7 +226,7 @@ program = {
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(freetype_libs)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
condition = COND_GRUB_MKFONT;
};
@ -243,7 +245,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -255,7 +257,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -272,7 +274,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = i386_pc;
enable = sparc64_ieee1275;
@ -287,7 +289,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)';
enable = sparc64_ieee1275;
};
@ -301,7 +303,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
data = {
@ -611,7 +613,7 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@ -624,5 +626,5 @@ program = {
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};

6
NEWS
View File

@ -29,7 +29,7 @@ New in 1.99:
* New `lsacpi' command.
* Basic btrfs support (detection and UUID).
* Btrfs support.
* New `--boot-directory' option to `grub-install', `grub-reboot', and
`grub-set-default', with clearer semantics than the previous
@ -83,10 +83,6 @@ New in 1.99:
* Extensive updates to the Texinfo documentation.
* Add `grub-probe' support for the btrfs filesystem, permitting / to
reside on btrfs as long as /boot is on a filesystem natively supported
by GRUB.
* Handle symbolic links under /dev/mapper on GNU/Linux.
* Handle installation across multiple partition table types.

View File

@ -2,6 +2,10 @@
set -e
export LC_CTYPE=C
export LC_COLLATE=C
unset LC_ALL
autogen --version >/dev/null || exit 1
echo "Importing unicode..."

View File

@ -2,6 +2,10 @@
CFLAGS_PLATFORM=
export LC_COLLATE := C
export LC_CTYPE := C
unexport LC_ALL
# Platform specific options
if COND_i386_pc
CFLAGS_PLATFORM += -mrtd -mregparm=3

View File

@ -32,7 +32,7 @@ dnl type, so there is no conflict. Variables with the prefix "TARGET_"
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
dnl type.
AC_INIT([GRUB],[1.99~rc1],[bug-grub@gnu.org])
AC_INIT([GRUB],[1.99~rc2],[bug-grub@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
@ -890,6 +890,15 @@ fi
AC_SUBST([LIBDEVMAPPER])
LIBGEOM=
if test x$host_kernel = xkfreebsd; then
AC_CHECK_LIB([geom], [geom_gettree], [],
[AC_MSG_ERROR([Your platform requires libgeom])])
LIBGEOM="-lgeom"
fi
AC_SUBST([LIBGEOM])
AC_CHECK_LIB([lzma], [lzma_code],
[LIBLZMA="-llzma"
AC_DEFINE([HAVE_LIBLZMA], [1],

33
debian/changelog vendored
View File

@ -1,4 +1,31 @@
grub2 (1.99~rc1-14) UNRELEASED; urgency=low
grub2 (1.99~rc2-1) UNRELEASED; urgency=low
* New upstream release.
- Ensure uniqueness of RAID array numbers even if some elements have a
name (closes: #609804).
- Remove unnecessary brackets from tr arguments (closes: #612564).
- Add grub-mkrescue info documentation (closes: #612585).
- Avoid generating invalid configuration when something that looks like
a Xen hypervisor is present without any Xen kernels (closes: #612898).
- Fix memory alignment when calling 'linux' multiple times on EFI
(closes: #616638).
- Fix grub-install on amd64 EFI systems (closes: #617388).
- Automatically export pager variable (closes: #612995).
- Fix parser error with "time" (closes: #612991).
- Ignore case of bitmap extensions (closes: #611123).
- Skip vmlinux-* on x86 platforms (closes: #536846, #546008).
- Accept old-style Xen kernels (closes: #610428).
- Skip damaged LVM volumes (closes: #544731).
- Handle LVM mirroring (closes: #598441).
- Detect spares and report them as not RAID members (closes: #611561).
- Don't enable localisation unless gfxterm is available (closes:
#604609).
- Fix partitioned RAID support (closes: #595071, #613444).
- Dynamically count the number of lines for the lower banner (closes:
#606494).
- Improve quoting in grub-mkconfig, to support background image file
names containing spaces (closes: #612417).
- Flush BIOS disk devices more accurately (closes: #623124).
[ Christian Perrier ]
* Drop extra word in French debconf translation. Thanks to David
@ -10,8 +37,10 @@ grub2 (1.99~rc1-14) UNRELEASED; urgency=low
* Set PACKAGE_VERSION and PACKAGE_STRING using configure arguments rather
than sedding configure.ac in debian/rules (which sometimes has annoying
interactions with quilt, etc.).
* Update branch_embed-sectors.patch:
- Detect sector used by HighPoint RAID controller (closes: #394868).
-- Christian Perrier <bubulle@debian.org> Sat, 16 Apr 2011 07:58:49 +0200
-- Colin Watson <cjwatson@debian.org> Thu, 21 Apr 2011 11:19:57 +0100
grub2 (1.99~rc1-13) unstable; urgency=low

View File

@ -2,7 +2,7 @@ Index: b/util/grub-setup.c
===================================================================
--- a/util/grub-setup.c
+++ b/util/grub-setup.c
@@ -541,6 +541,15 @@
@@ -540,6 +540,15 @@
grub_file_filter_disable_compression ();
file = grub_file_open (core_path_dev);

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ Index: b/grub-core/kern/emu/getroot.c
===================================================================
--- a/grub-core/kern/emu/getroot.c
+++ b/grub-core/kern/emu/getroot.c
@@ -32,6 +32,10 @@
@@ -34,6 +34,10 @@
#include <stdint.h>
#include <grub/util/misc.h>
@ -19,7 +19,7 @@ Index: b/grub-core/kern/emu/getroot.c
#ifdef __GNU__
#include <hurd.h>
#include <hurd/lookup.h>
@@ -629,32 +633,65 @@
@@ -637,32 +641,65 @@
}
static int
@ -109,7 +109,7 @@ Index: b/grub-core/kern/emu/getroot.c
}
int
@@ -666,13 +703,11 @@
@@ -674,13 +711,11 @@
return GRUB_DEV_ABSTRACTION_NONE;
/* Check for LVM. */
@ -137,7 +137,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
#include <grub/misc.h>
#include <grub/i18n.h>
#include <grub/list.h>
@@ -324,18 +325,23 @@
@@ -331,18 +332,23 @@
return GRUB_ERR_NONE;
}
@ -163,9 +163,9 @@ Index: b/grub-core/kern/emu/hostdisk.c
#endif /* HAVE_DEVICE_MAPPER */
+}
#if defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO)
static grub_disk_addr_t
@@ -350,7 +356,7 @@
#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
/* FIXME: geom actually gives us the whole container hierarchy.
@@ -418,7 +424,7 @@
# endif /* !defined(HAVE_DIOCGDINFO) */
# ifdef HAVE_DEVICE_MAPPER
@ -174,7 +174,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
struct dm_task *task = NULL;
grub_uint64_t start, length;
char *target_type, *params, *space;
@@ -1047,6 +1053,54 @@
@@ -1159,6 +1165,54 @@
return ret;
}
@ -229,7 +229,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
static char *
convert_system_partition_to_system_disk (const char *os_dev, struct stat *st)
{
@@ -1223,9 +1277,39 @@
@@ -1335,9 +1389,39 @@
node = NULL;
goto devmapper_out;
}

View File

@ -4,7 +4,7 @@ Description: Detect other software using embedding area
Author: Colin Watson <cjwatson@ubuntu.com>
Origin: upstream, http://bzr.sv.gnu.org/r/grub/branches/embed-sectors/
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2010-08/msg00137.html
Last-Update: 2011-03-14
Last-Update: 2011-04-21
Index: b/ChangeLog.embed-sectors
===================================================================
@ -27,7 +27,7 @@ Index: b/grub-core/partmap/gpt.c
===================================================================
--- a/grub-core/partmap/gpt.c
+++ b/grub-core/partmap/gpt.c
@@ -125,6 +125,7 @@
@@ -127,6 +127,7 @@
#ifdef GRUB_UTIL
static grub_err_t
gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
@ -35,7 +35,7 @@ Index: b/grub-core/partmap/gpt.c
grub_embed_type_t embed_type,
grub_disk_addr_t **sectors)
{
@@ -174,6 +175,8 @@
@@ -176,6 +177,8 @@
" embedding won't be possible!");
*nsectors = len;
@ -48,7 +48,7 @@ Index: b/grub-core/partmap/msdos.c
===================================================================
--- a/grub-core/partmap/msdos.c
+++ b/grub-core/partmap/msdos.c
@@ -27,6 +27,45 @@
@@ -29,6 +29,66 @@
static struct grub_partition_map grub_msdos_partition_map;
@ -60,8 +60,19 @@ Index: b/grub-core/partmap/msdos.c
+ const char *name;
+ const char *signature;
+ int signature_len;
+ enum { TYPE_SOFTWARE, TYPE_RAID } type;
+};
+
+const char message_warn[][200] = {
+ [TYPE_RAID] = "Sector %llu is already in use by %s; avoiding it. "
+ "Please ask the manufacturer not to store data in MBR gap",
+ [TYPE_SOFTWARE] = "Sector %llu is already in use by %s; avoiding it. "
+ "This software may cause boot or other problems in "
+ "future. Please ask its authors not to store data "
+ "in the boot track"
+};
+
+
+/* Signatures of other software that may be using sectors in the embedding
+ area. */
+struct embed_signature embed_signatures[] =
@ -69,24 +80,34 @@ Index: b/grub-core/partmap/msdos.c
+ {
+ .name = "ZISD",
+ .signature = "ZISD",
+ .signature_len = 4
+ .signature_len = 4,
+ .type = TYPE_SOFTWARE
+ },
+ {
+ .name = "FlexNet",
+ .signature = "\xd4\x41\xa0\xf5\x03\x00\x03\x00",
+ .signature_len = 8
+ .signature_len = 8,
+ .type = TYPE_SOFTWARE
+ },
+ {
+ .name = "FlexNet",
+ .signature = "\xd8\x41\xa0\xf5\x02\x00\x02\x00",
+ .signature_len = 8
+ .signature_len = 8,
+ .type = TYPE_SOFTWARE
+ },
+ {
+ /* from Ryan Perkins */
+ .name = "HP Backup and Recovery Manager (?)",
+ .signature = "\x70\x8a\x5d\x46\x35\xc5\x1b\x93"
+ "\xae\x3d\x86\xfd\xb1\x55\x3e\xe0",
+ .signature_len = 16
+ .signature_len = 16,
+ .type = TYPE_SOFTWARE
+ },
+ {
+ .name = "HighPoint RAID controller",
+ .signature = "ycgl",
+ .signature_len = 4,
+ .type = TYPE_RAID
+ }
+ };
+#endif
@ -94,7 +115,7 @@ Index: b/grub-core/partmap/msdos.c
grub_err_t
grub_partition_msdos_iterate (grub_disk_t disk,
int (*hook) (grub_disk_t disk,
@@ -146,6 +185,7 @@
@@ -148,6 +208,7 @@
#ifdef GRUB_UTIL
static grub_err_t
pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
@ -102,9 +123,9 @@ Index: b/grub-core/partmap/msdos.c
grub_embed_type_t embed_type,
grub_disk_addr_t **sectors)
{
@@ -234,13 +274,68 @@
@@ -236,13 +297,65 @@
if (end >= *nsectors + 1)
if (end >= *nsectors + 2)
{
- unsigned i;
+ unsigned i, j;
@ -112,7 +133,7 @@ Index: b/grub-core/partmap/msdos.c
+ unsigned int orig_nsectors, avail_nsectors;
+
+ orig_nsectors = *nsectors;
*nsectors = end - 1;
*nsectors = end - 2;
+ avail_nsectors = *nsectors;
+ if (*nsectors > max_nsectors)
+ *nsectors = max_nsectors;
@ -139,10 +160,7 @@ Index: b/grub-core/partmap/msdos.c
+ break;
+ if (j == ARRAY_SIZE (embed_signatures))
+ continue;
+ grub_util_warn ("Sector %llu is already in use by %s; avoiding it. "
+ "This software may cause boot or other problems in "
+ "future. Please ask its authors not to store data "
+ "in the boot track",
+ grub_util_warn (message_warn[embed_signatures[j].type],
+ (*sectors)[i], embed_signatures[j].name);
+ avail_nsectors--;
+ if (avail_nsectors < *nsectors)
@ -188,7 +206,7 @@ Index: b/util/grub-setup.c
===================================================================
--- a/util/grub-setup.c
+++ b/util/grub-setup.c
@@ -427,10 +427,8 @@
@@ -428,10 +428,8 @@
}
nsec = core_sectors;
@ -200,7 +218,7 @@ Index: b/util/grub-setup.c
if (err)
{
@@ -459,6 +457,13 @@
@@ -460,6 +458,13 @@
save_blocklists (sectors[i] + grub_partition_get_start (container),
0, GRUB_DISK_SECTOR_SIZE);
@ -214,7 +232,7 @@ Index: b/util/grub-setup.c
write_rootdev (core_img, root_dev, boot_img, first_sector);
core_img = realloc (core_img, nsec * GRUB_DISK_SECTOR_SIZE);
@@ -475,12 +480,6 @@
@@ -476,12 +481,6 @@
nsec * GRUB_DISK_SECTOR_SIZE
- core_size);

View File

@ -72,7 +72,7 @@ Index: b/configure.ac
AC_ARG_ENABLE([device-mapper],
[AS_HELP_STRING([--enable-device-mapper],
[enable Linux device-mapper support (default=guessed)])])
@@ -958,6 +989,7 @@
@@ -967,6 +998,7 @@
AM_CONDITIONAL([COND_GRUB_EMU_SDL], [test x$enable_grub_emu_sdl = xyes])
AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes])
AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes])
@ -80,7 +80,7 @@ Index: b/configure.ac
AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
AM_CONDITIONAL([COND_GRUB_PE2ELF], [test x$TARGET_OBJ2ELF != x])
AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
@@ -1034,5 +1066,10 @@
@@ -1043,5 +1075,10 @@
else
echo grub-mkfont: No "($grub_mkfont_excuse)"
fi

View File

@ -8,7 +8,7 @@ Index: b/grub-core/loader/i386/linux.c
===================================================================
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -55,7 +55,6 @@
@@ -57,7 +57,6 @@
#endif
#define GRUB_LINUX_CL_OFFSET 0x1000
@ -16,7 +16,7 @@ Index: b/grub-core/loader/i386/linux.c
static grub_dl_t my_mod;
@@ -72,6 +71,7 @@
@@ -74,6 +73,7 @@
static grub_uint32_t initrd_pages;
static struct grub_relocator *relocator = NULL;
static void *efi_mmap_buf;
@ -24,7 +24,7 @@ Index: b/grub-core/loader/i386/linux.c
#ifdef GRUB_MACHINE_EFI
static grub_efi_uintn_t efi_mmap_size;
#else
@@ -186,7 +186,7 @@
@@ -189,7 +189,7 @@
grub_err_t err;
/* Make sure that each size is aligned to a page boundary. */
@ -33,7 +33,7 @@ Index: b/grub-core/loader/i386/linux.c
prot_size = page_align (prot_size);
mmap_size = find_mmap_size ();
@@ -657,6 +657,14 @@
@@ -660,6 +660,14 @@
goto fail;
}
@ -48,7 +48,7 @@ Index: b/grub-core/loader/i386/linux.c
setup_sects = lh.setup_sects;
/* If SETUP_SECTS is not set, set it to the default (4). */
@@ -670,7 +678,7 @@
@@ -673,7 +681,7 @@
goto fail;
params = (struct linux_kernel_params *) real_mode_mem;
@ -57,7 +57,7 @@ Index: b/grub-core/loader/i386/linux.c
grub_memcpy (&params->setup_sects, &lh.setup_sects, sizeof (lh) - 0x1F1);
params->ps_mouse = params->padding10 = 0;
@@ -865,7 +873,7 @@
@@ -868,7 +876,7 @@
grub_create_loader_cmdline (argc, argv,
(char *)real_mode_mem + GRUB_LINUX_CL_OFFSET
+ sizeof (LINUX_IMAGE) - 1,
@ -70,15 +70,15 @@ Index: b/grub-core/loader/i386/pc/linux.c
===================================================================
--- a/grub-core/loader/i386/pc/linux.c
+++ b/grub-core/loader/i386/pc/linux.c
@@ -37,7 +37,6 @@
#include <grub/lib/cmdline.h>
@@ -39,7 +39,6 @@
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_LINUX_CL_OFFSET 0x9000
-#define GRUB_LINUX_CL_END_OFFSET 0x90FF
static grub_dl_t my_mod;
@@ -47,6 +46,7 @@
@@ -49,6 +48,7 @@
static grub_addr_t grub_linux_real_target;
static char *grub_linux_real_chunk;
static grub_size_t grub_linux16_prot_size;
@ -86,7 +86,7 @@ Index: b/grub-core/loader/i386/pc/linux.c
static grub_err_t
grub_linux16_boot (void)
@@ -126,15 +126,20 @@
@@ -128,15 +128,20 @@
setup_sects = lh.setup_sects;
linux_mem_size = 0;
@ -108,7 +108,7 @@ Index: b/grub-core/loader/i386/pc/linux.c
/* But it must not exceed the traditional area. */
if (grub_linux_real_target > GRUB_LINUX_OLD_REAL_MODE_ADDR)
grub_linux_real_target = GRUB_LINUX_OLD_REAL_MODE_ADDR;
@@ -151,7 +156,8 @@
@@ -153,7 +158,8 @@
{
lh.cl_magic = grub_cpu_to_le16 (GRUB_LINUX_CL_MAGIC);
lh.cl_offset = grub_cpu_to_le16 (GRUB_LINUX_CL_OFFSET);
@ -118,7 +118,7 @@ Index: b/grub-core/loader/i386/pc/linux.c
}
}
else
@@ -183,12 +189,13 @@
@@ -185,12 +191,13 @@
goto fail;
}
@ -134,7 +134,7 @@ Index: b/grub-core/loader/i386/pc/linux.c
(int) grub_mmap_get_lower ());
goto fail;
}
@@ -261,7 +268,8 @@
@@ -263,7 +270,8 @@
grub_relocator_chunk_t ch;
err = grub_relocator_alloc_chunk_addr (relocator, &ch,
grub_linux_real_target,
@ -144,7 +144,7 @@ Index: b/grub-core/loader/i386/pc/linux.c
if (err)
return err;
grub_linux_real_chunk = get_virtual_current_address (ch);
@@ -292,7 +300,7 @@
@@ -294,7 +302,7 @@
grub_create_loader_cmdline (argc, argv,
(char *)grub_linux_real_chunk
+ GRUB_LINUX_CL_OFFSET + sizeof (LINUX_IMAGE) - 1,

View File

@ -1,16 +1,16 @@
Description: Add a background_color command
Move gfxmenu color handling to video, so that gfxterm can use it too; add a
background_color command; fix border repainting.
background_color command.
Author: Colin Watson <cjwatson@ubuntu.com>
Origin: upstream, http://bzr.sv.gnu.org/r/grub/branches/parse-color/
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2010-12/msg00045.html
Last-Update: 2011-01-05
Last-Update: 2011-04-21
Index: b/ChangeLog.parse-color
===================================================================
--- /dev/null
+++ b/ChangeLog.parse-color
@@ -0,0 +1,52 @@
@@ -0,0 +1,44 @@
+2010-12-23 Colin Watson <cjwatson@ubuntu.com>
+
+ Move gfxmenu color handling to video, so that gfxterm can use it
@ -53,16 +53,8 @@ Index: b/ChangeLog.parse-color
+ (GRUB_MOD_FINI): Unregister background_color command.
+ (redraw_screen_rect): Allow blend/replace of text layer to be
+ controlled independently from whether there is a background bitmap.
+ (grub_gfxterm_fullscreen): Change blend_text_bg when changing
+ bitmap.
+ (destroy_window): Likewise.
+ (grub_gfxterm_background_image_cmd): Likewise.
+
+ Fix border repainting.
+
+ * grub-core/term/gfxterm.c (dirty_region_add): When a repaint is
+ already scheduled, merge the virtual screen with the requested
+ region rather than repainting only the virtual screen.
+ (grub_gfxterm_background_image_cmd): Change blend_text_bg when
+ changing bitmap.
Index: b/grub-core/Makefile.core.def
===================================================================
--- a/grub-core/Makefile.core.def
@ -138,7 +130,7 @@ Index: b/grub-core/gfxmenu/gui_list.c
int draw_scrollbar;
int need_to_recreate_scrollbar;
@@ -267,13 +267,13 @@
@@ -269,13 +269,13 @@
(is_selected && self->selected_item_font
? self->selected_item_font
: self->item_font);
@ -154,7 +146,7 @@ Index: b/grub-core/gfxmenu/gui_list.c
sel_leftpad + self->icon_width + icon_text_space,
(item_top + (item_height - (ascent + descent))
/ 2 + ascent));
@@ -429,7 +429,7 @@
@@ -431,7 +431,7 @@
}
else if (grub_strcmp (name, "item_color") == 0)
{
@ -163,7 +155,7 @@ Index: b/grub-core/gfxmenu/gui_list.c
}
else if (grub_strcmp (name, "selected_item_color") == 0)
{
@@ -439,7 +439,7 @@
@@ -441,7 +441,7 @@
}
else
{
@ -172,7 +164,7 @@ Index: b/grub-core/gfxmenu/gui_list.c
== GRUB_ERR_NONE)
self->selected_item_color_set = 1;
}
@@ -562,7 +562,7 @@
@@ -564,7 +564,7 @@
{
list_impl_t self;
grub_font_t default_font;
@ -181,7 +173,7 @@ Index: b/grub-core/gfxmenu/gui_list.c
self = grub_zalloc (sizeof (*self));
if (! self)
@@ -574,7 +574,7 @@
@@ -576,7 +576,7 @@
self->visible = 1;
default_font = grub_font_get ("Unknown Regular 16");
@ -715,7 +707,7 @@ Index: b/grub-core/term/gfxterm.c
===================================================================
--- a/grub-core/term/gfxterm.c
+++ b/grub-core/term/gfxterm.c
@@ -128,6 +128,7 @@
@@ -130,6 +130,7 @@
static unsigned int bitmap_width;
static unsigned int bitmap_height;
static struct grub_video_bitmap *bitmap;
@ -723,23 +715,7 @@ Index: b/grub-core/term/gfxterm.c
static struct grub_dirty_region dirty_region;
@@ -344,6 +345,7 @@
grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
}
bitmap = 0;
+ blend_text_bg = 0;
/* Select the font to use. */
font_name = grub_env_get ("gfxterm_font");
@@ -396,6 +398,7 @@
{
grub_video_bitmap_destroy (bitmap);
bitmap = 0;
+ blend_text_bg = 0;
}
repaint_callback = 0;
@@ -481,26 +484,27 @@
@@ -476,26 +477,27 @@
/* Render background layer. */
grub_video_fill_rect (color, x, ty, width, h);
}
@ -779,32 +755,7 @@ Index: b/grub-core/term/gfxterm.c
/* Restore saved viewport. */
grub_video_set_viewport (saved_view.x, saved_view.y,
saved_view.width, saved_view.height);
@@ -539,10 +543,20 @@
if (repaint_scheduled)
{
- x = virtual_screen.offset_x;
- y = virtual_screen.offset_y;
- width = virtual_screen.width;
- height = virtual_screen.height;
+ if (x > (int)virtual_screen.offset_x)
+ {
+ width += virtual_screen.offset_x - x;
+ x = virtual_screen.offset_x;
+ }
+ if (y > (int)virtual_screen.offset_y)
+ {
+ height += virtual_screen.offset_y - y;
+ y = virtual_screen.offset_y;
+ }
+ if (width < virtual_screen.width)
+ width = virtual_screen.width;
+ if (height < virtual_screen.height)
+ height = virtual_screen.height;
repaint_scheduled = 0;
repaint_was_scheduled = 1;
}
@@ -1127,6 +1141,7 @@
@@ -1127,6 +1129,7 @@
{
grub_video_bitmap_destroy (bitmap);
bitmap = 0;
@ -812,7 +763,7 @@ Index: b/grub-core/term/gfxterm.c
/* Mark whole screen as dirty. */
dirty_region_add (0, 0, window.width, window.height);
@@ -1166,6 +1181,8 @@
@@ -1166,6 +1169,8 @@
/* If bitmap was loaded correctly, display it. */
if (bitmap)
{
@ -821,7 +772,7 @@ Index: b/grub-core/term/gfxterm.c
/* Determine bitmap dimensions. */
bitmap_width = grub_video_bitmap_get_width (bitmap);
bitmap_height = grub_video_bitmap_get_height (bitmap);
@@ -1180,6 +1197,48 @@
@@ -1180,6 +1185,48 @@
return grub_errno;
}
@ -870,7 +821,7 @@ Index: b/grub-core/term/gfxterm.c
static struct grub_term_output grub_video_term =
{
.name = "gfxterm",
@@ -1201,6 +1260,7 @@
@@ -1201,6 +1248,7 @@
};
static grub_extcmd_t background_image_cmd_handle;
@ -878,7 +829,7 @@ Index: b/grub-core/term/gfxterm.c
GRUB_MOD_INIT(gfxterm)
{
@@ -1211,10 +1271,16 @@
@@ -1211,10 +1259,16 @@
N_("[-m (stretch|normal)] FILE"),
N_("Load background image for active terminal."),
background_image_cmd_options);

View File

@ -594,8 +594,8 @@ Index: b/grub-core/io/gzio.c
+#include <grub/disk.h>
#include <grub/deflate.h>
/*
@@ -62,6 +63,9 @@
GRUB_MOD_LICENSE ("GPLv3+");
@@ -64,6 +65,9 @@
/* If input is in memory following fields are used instead of file. */
grub_size_t mem_input_size, mem_input_off;
grub_uint8_t *mem_input;
@ -605,7 +605,7 @@ Index: b/grub-core/io/gzio.c
/* The offset at which the data starts in the underlying file. */
grub_off_t data_offset;
/* The type of current block. */
@@ -382,8 +386,21 @@
@@ -384,8 +388,21 @@
return 0;
}
@ -629,7 +629,7 @@ Index: b/grub-core/io/gzio.c
{
gzio->inbuf_d = 0;
grub_file_read (gzio->file, gzio->inbuf, INBUFSIZ);
@@ -401,8 +418,10 @@
@@ -403,8 +420,10 @@
grub_error (GRUB_ERR_OUT_OF_RANGE,
"attempt to seek outside of the file");
else
@ -641,7 +641,7 @@ Index: b/grub-core/io/gzio.c
else
grub_file_seek (gzio->file, off);
}
@@ -1296,6 +1315,34 @@
@@ -1298,6 +1317,34 @@
return ret;
}

View File

@ -1,21 +0,0 @@
Description: Allow use of first sector on btrfs
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/757446
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3207
Last-Update: 2011-04-11
Index: b/grub-core/fs/btrfs.c
===================================================================
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -1462,6 +1462,9 @@
.close = grub_btrfs_close,
.uuid = grub_btrfs_uuid,
.label = grub_btrfs_label,
+#ifdef GRUB_UTIL
+ .reserved_first_sector = 1,
+#endif
};
GRUB_MOD_INIT(btrfs)

View File

@ -1,28 +0,0 @@
Description: Add rootflags=subvol=<name> if / is on a btrfs subvolume
Not yet forwarded upstream because rootflags= is distribution-specific.
It's not clear how to do this portably.
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/712029
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3215
Last-Update: 2011-02-04
Index: b/util/grub.d/10_linux.in
===================================================================
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -51,6 +51,14 @@
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
+if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
+ rootsubvol="`make_system_path_relative_to_its_root /`"
+ rootsubvol="${rootsubvol#/}"
+ if [ "x${rootsubvol}" != x ]; then
+ GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
+ fi
+fi
+
linux_entry ()
{
os="$1"

View File

@ -1,46 +0,0 @@
Description: Always copy partition table zone if floppy support is disabled
Do this even if no partition table is found. Otherwise, the BIOS on Dell
Latitude E series laptops will freeze during POST if an invalid partition
table is contained in the PBR of the active partition when GRUB is
installed to a partition.
Author: Mario Limonciello <Mario_Limonciello@Dell.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/741867
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-03/msg00062.html
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3123
Last-Update: 2011-03-29
Index: b/util/grub-setup.c
===================================================================
--- a/util/grub-setup.c
+++ b/util/grub-setup.c
@@ -400,6 +400,15 @@
}
#endif
+ /* Copy the partition table. */
+ if (dest_partmap ||
+ (!allow_floppy && !grub_util_biosdisk_is_floppy (dest_dev->disk)))
+ memcpy (boot_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC,
+ tmp_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC,
+ GRUB_BOOT_MACHINE_PART_END - GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC);
+
+ free (tmp_img);
+
if (! dest_partmap)
{
grub_util_warn (_("Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea."));
@@ -411,14 +420,6 @@
goto unable_to_embed;
}
- /* Copy the partition table. */
- if (dest_partmap)
- memcpy (boot_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC,
- tmp_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC,
- GRUB_BOOT_MACHINE_PART_END - GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC);
-
- free (tmp_img);
-
if (!dest_partmap->embed)
{
grub_util_warn ("Partition style '%s' doesn't support embeding",

View File

@ -10,7 +10,7 @@ Index: b/util/grub-setup.c
#ifdef GRUB_MACHINE_SPARC64
#define grub_target_to_host16(x) grub_be_to_cpu16(x)
@@ -488,6 +489,8 @@
@@ -489,6 +490,8 @@
grub_free (sectors);
@ -19,7 +19,7 @@ Index: b/util/grub-setup.c
goto finish;
}
#endif
@@ -513,6 +516,9 @@
@@ -514,6 +517,9 @@
/* The core image must be put on a filesystem unfortunately. */
grub_util_info ("will leave the core image on the filesystem");

View File

@ -7,7 +7,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -963,6 +963,18 @@
@@ -1075,6 +1075,18 @@
continue;
}

View File

@ -1,25 +1,30 @@
Description: Improve handling of Debian kernel version numbers
Author: Robert Millan <rmh@aybabtu.com>
Forwarded: not-needed
Last-Update: 2011-04-21
Index: b/util/grub-mkconfig_lib.in
===================================================================
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -166,8 +166,9 @@
@@ -172,8 +172,9 @@
version_test_gt ()
{
- local a=`echo $1 | sed -e "s/[^-]*-//"`
- local b=`echo $2 | sed -e "s/[^-]*-//"`
- local a="`echo "$1" | sed -e "s/[^-]*-//"`"
- local b="`echo "$2" | sed -e "s/[^-]*-//"`"
+ local sedexp="s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\|trunk\)/~\1/g"
+ local a=`echo $1 | sed -e "$sedexp"`
+ local b=`echo $2 | sed -e "$sedexp"`
+ local a="`echo "$1" | sed -e "$sedexp"`"
+ local b="`echo "$2" | sed -e "$sedexp"`"
local cmp=gt
if [ "x$b" = "x" ] ; then
return 0
@@ -177,7 +178,7 @@
*.old:*) a=`echo -n $a | sed -e s/\.old$//` ; cmp=gt ;;
*:*.old) b=`echo -n $b | sed -e s/\.old$//` ; cmp=ge ;;
@@ -183,7 +184,7 @@
*.old:*) a="`echo -n "$a" | sed -e 's/\.old$//'`" ; cmp=gt ;;
*:*.old) b="`echo -n "$b" | sed -e 's/\.old$//'`" ; cmp=ge ;;
esac
- version_test_numeric $a $cmp $b
- version_test_numeric "$a" "$cmp" "$b"
+ dpkg --compare-versions "$a" $cmp "$b"
return $?
return "$?"
}

View File

@ -1,19 +0,0 @@
Description: Fix an overflow affecting inodes past 2TiB
Author: Vladimir Serbinenko <phcoder@gmail.com>
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3126
Last-Update: 2011-03-29
Index: b/grub-core/fs/ext2.c
===================================================================
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -555,7 +555,7 @@
/* Read the inode. */
if (grub_disk_read (data->disk,
- ((grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
+ (((grub_disk_addr_t) grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
<< LOG2_EXT2_BLOCK_SIZE (data)),
EXT2_INODE_SIZE (data) * blkoff,
sizeof (struct grub_ext2_inode), inode))

View File

@ -1,19 +0,0 @@
Description: Fix FreeBSD compilation problem
Author: Vladimir Serbinenko <phcoder@gmail.com>
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3117
Last-Update: 2011-03-29
Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -93,6 +93,8 @@
# include <sys/disk.h> /* DIOCGMEDIASIZE */
# include <sys/param.h>
# include <sys/sysctl.h>
+# define MAJOR(dev) major(dev)
+# define FLOPPY_MAJOR 2
#endif
#if defined(__APPLE__)

View File

@ -1,22 +0,0 @@
Description: Account for module headers when calculating allocation size
Author: Vladimir Serbinenko <phcoder@gmail.com>
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3112
Last-Update: 2011-03-24
Index: b/grub-core/loader/i386/bsdXX.c
===================================================================
--- a/grub-core/loader/i386/bsdXX.c
+++ b/grub-core/loader/i386/bsdXX.c
@@ -195,6 +195,11 @@
chunk_size = s->sh_addr + s->sh_size;
}
+ if (chunk_size < sizeof (e))
+ chunk_size = sizeof (e);
+ chunk_size += e.e_phnum * e.e_phentsize;
+ chunk_size += e.e_shnum * e.e_shentsize;
+
{
grub_relocator_chunk_t ch;

View File

@ -17,7 +17,7 @@ Index: b/util/grub.d/10_linux.in
===================================================================
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -69,17 +69,7 @@
@@ -77,17 +77,7 @@
# 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.
@ -25,8 +25,8 @@ Index: b/util/grub.d/10_linux.in
- cat << EOF
- load_video
-EOF
- if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
- && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
- if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
- && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
- cat << EOF
- set gfxpayload=keep
-EOF

View File

@ -2,7 +2,7 @@ Index: b/util/grub-mkconfig.in
===================================================================
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -291,6 +291,10 @@
@@ -293,6 +293,10 @@
esac
done

View File

@ -2,7 +2,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -1017,7 +1017,7 @@
@@ -1129,7 +1129,7 @@
char *bsd_part_str = NULL;
if (dos_part >= 0)
@ -11,7 +11,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
if (bsd_part >= 0)
bsd_part_str = xasprintf (",%d", bsd_part + 1);
@@ -1492,6 +1492,29 @@
@@ -1617,6 +1617,29 @@
if (start == part_start)
{

View File

@ -1,77 +0,0 @@
Description: Flush buffer cache on close and not on open
Author: Vladimir Serbinenko <phcoder@gmail.com>
Bug-Debian: http://bugs.debian.org/620663
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3178
Last-Update: 2011-04-08
Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -667,7 +667,17 @@
{
free (data->dev);
if (data->fd != -1)
- close (data->fd);
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ {
+ fsync (data->fd);
+#ifdef __linux__
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ }
+
+ close (data->fd);
+ }
/* Open the partition. */
grub_dprintf ("hostdisk", "opening the device `%s' in open_device()\n", dev);
@@ -678,10 +688,6 @@
return -1;
}
- /* Flush the buffer cache to the physical disk.
- XXX: This also empties the buffer cache. */
- ioctl (fd, BLKFLSBUF, 0);
-
data->dev = xstrdup (dev);
data->access_mode = (flags & O_ACCMODE);
data->fd = fd;
@@ -719,7 +725,16 @@
{
free (data->dev);
if (data->fd != -1)
- close (data->fd);
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ {
+ fsync (data->fd);
+#ifdef __linux__
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ }
+ close (data->fd);
+ }
fd = open (map[disk->id].device, flags);
if (fd >= 0)
@@ -936,7 +951,16 @@
free (data->dev);
if (data->fd != -1)
- close (data->fd);
+ {
+ if (data->access_mode == O_RDWR || data->access_mode == O_WRONLY)
+ {
+ fsync (data->fd);
+#ifdef __linux__
+ ioctl (data->fd, BLKFLSBUF, 0);
+#endif
+ }
+ close (data->fd);
+ }
free (data);
}

View File

@ -8,7 +8,7 @@ Index: b/util/grub-install.in
===================================================================
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -653,6 +653,13 @@
@@ -660,6 +660,13 @@
fi
fi

View File

@ -1,291 +0,0 @@
Description: Use libgeom on FreeBSD to detect partitions
Author: Vladimir Serbinenko <phcoder@gmail.com>
Bug-Debian: http://bugs.debian.org/612128
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3118
Last-Update: 2011-03-29
Index: b/Makefile.util.def
===================================================================
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -125,7 +125,7 @@
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBLZMA)';
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
};
@@ -138,7 +138,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -150,7 +150,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -162,7 +162,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -174,7 +174,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cflags = '$(CFLAGS_GCRY)';
cppflags = '$(CPPFLAGS_GCRY)';
};
@@ -212,7 +212,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -242,7 +242,7 @@
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(freetype_libs)';
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
condition = COND_GRUB_MKFONT;
};
@@ -261,7 +261,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -273,7 +273,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -290,7 +290,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = i386_pc;
enable = sparc64_ieee1275;
@@ -305,7 +305,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)';
enable = sparc64_ieee1275;
};
@@ -319,7 +319,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
data = {
@@ -629,7 +629,7 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
program = {
@@ -642,5 +642,5 @@
ldadd = libgrubmods.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -921,6 +921,15 @@
AC_SUBST([LIBDEVMAPPER])
+LIBGEOM=
+if test x$host_kernel = xkfreebsd; then
+ AC_CHECK_LIB([geom], [geom_gettree], [],
+ [AC_MSG_ERROR([Your platform requires libgeom])])
+ LIBGEOM="-lgeom"
+fi
+
+AC_SUBST([LIBGEOM])
+
AC_CHECK_LIB([lzma], [lzma_code],
[LIBLZMA="-llzma"
AC_DEFINE([HAVE_LIBLZMA], [1],
Index: b/grub-core/Makefile.core.def
===================================================================
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -201,7 +201,7 @@
ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(MODULE_FILES)';
- ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
@@ -213,7 +213,7 @@
emu_nodist = symlist.c;
ldadd = 'kernel.img$(EXEEXT)';
- ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
+ ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -105,7 +105,9 @@
# include <libdevmapper.h>
#endif
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <libgeom.h>
+#elif defined(__NetBSD__)
# define HAVE_DIOCGDINFO
# include <sys/ioctl.h>
# include <sys/disklabel.h> /* struct disklabel */
@@ -345,7 +347,68 @@
#endif /* HAVE_DEVICE_MAPPER */
}
-#if defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO)
+#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
+/* FIXME: geom actually gives us the whole container hierarchy.
+ It can be used more efficiently than this. */
+static void
+follow_geom_up (const char *name, grub_disk_addr_t *off_out, char **name_out)
+{
+ struct gmesh mesh;
+ struct gclass *class;
+ int error;
+ struct ggeom *geom;
+
+ grub_util_info ("following geom '%s'", name);
+
+ error = geom_gettree (&mesh);
+ if (error != 0)
+ grub_util_error ("couldn't open geom");
+
+ LIST_FOREACH (class, &mesh.lg_class, lg_class)
+ if (strcasecmp (class->lg_name, "part") == 0)
+ break;
+ if (!class)
+ grub_util_error ("couldn't open geom part");
+
+ LIST_FOREACH (geom, &class->lg_geom, lg_geom)
+ {
+ struct gprovider *provider;
+ LIST_FOREACH (provider, &geom->lg_provider, lg_provider)
+ if (strcmp (provider->lg_name, name) == 0)
+ {
+ char *name_tmp = xstrdup (geom->lg_name);
+ grub_disk_addr_t off = 0;
+ struct gconfig *config;
+ grub_util_info ("geom '%s' has parent '%s'", name, geom->lg_name);
+
+ follow_geom_up (name_tmp, &off, name_out);
+ free (name_tmp);
+ LIST_FOREACH (config, &provider->lg_config, lg_config)
+ if (strcasecmp (config->lg_name, "start") == 0)
+ off += strtoull (config->lg_val, 0, 10);
+ if (off_out)
+ *off_out = off;
+ return;
+ }
+ }
+ grub_util_info ("geom '%s' has no parent", name);
+ if (name_out)
+ *name_out = xstrdup (name);
+ if (off_out)
+ *off_out = 0;
+}
+
+static grub_disk_addr_t
+find_partition_start (const char *dev)
+{
+ grub_disk_addr_t out;
+ if (strncmp (dev, "/dev/", sizeof ("/dev/") - 1) != 0)
+ return 0;
+ follow_geom_up (dev + sizeof ("/dev/") - 1, &out, NULL);
+
+ return out;
+}
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO)
static grub_disk_addr_t
find_partition_start (const char *dev)
{
@@ -1382,7 +1445,17 @@
path[8] = 0;
return path;
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ char *out, *out2;
+ if (strncmp (os_dev, "/dev/", sizeof ("/dev/") - 1) != 0)
+ return xstrdup (os_dev);
+ follow_geom_up (os_dev + sizeof ("/dev/") - 1, NULL, &out);
+
+ out2 = xasprintf ("/dev/%s", out);
+ free (out);
+
+ return out2;
+#elif defined(__APPLE__)
char *path = xstrdup (os_dev);
if (strncmp ("/dev/", path, 5) == 0)
{
@@ -1560,7 +1633,8 @@
#endif
return make_device_name (drive, -1, -1);
-#if defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO)
+#if defined(__linux__) || defined(__CYGWIN__) || defined(HAVE_DIOCGDINFO) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
/* Linux counts partitions uniformly, whether a BSD partition or a DOS
partition, so mapping them to GRUB devices is not trivial.
Here, get the start sector of a partition by HDIO_GETGEO, and

View File

@ -1,39 +0,0 @@
Description: Fix loading GRUB from lnxboot
Ensure that the initial chunk read from the kernel always includes GRUB's
multiboot header, which is now outside the first sector.
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/693671
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3096
Last-Update: 2011-03-11
Index: b/grub-core/boot/i386/pc/lnxboot.S
===================================================================
--- a/grub-core/boot/i386/pc/lnxboot.S
+++ b/grub-core/boot/i386/pc/lnxboot.S
@@ -178,8 +178,13 @@
pushw %es
popw %ds
+#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
movl $0x200, %ecx
addl %ecx, %esi
+#else
+ movl $(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4), %ecx
+ addl $0x200, %esi
+#endif
movl $DATA_ADDR, %edi
call LOCAL(move_memory)
@@ -196,7 +201,11 @@
1:
movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
+#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
+#else
+ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4)), %ecx
+#endif
2:
call LOCAL(move_memory)

View File

@ -1,31 +0,0 @@
Description: Fix use of freed memory when replacing existing loopback device
Store the loopback device as data on loopback grub_disk structures, rather
than the file it points to.
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/742967
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3162
Last-Update: 2011-04-01
Index: b/grub-core/disk/loopback.c
===================================================================
--- a/grub-core/disk/loopback.c
+++ b/grub-core/disk/loopback.c
@@ -166,7 +166,7 @@
disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
disk->id = (unsigned long) dev;
- disk->data = dev->file;
+ disk->data = dev;
return 0;
}
@@ -175,7 +175,7 @@
grub_loopback_read (grub_disk_t disk, grub_disk_addr_t sector,
grub_size_t size, char *buf)
{
- grub_file_t file = (grub_file_t) disk->data;
+ grub_file_t file = ((struct grub_loopback *) disk->data)->file;
grub_off_t pos;
grub_file_seek (file, sector << GRUB_DISK_SECTOR_BITS);

View File

@ -1,23 +0,0 @@
Description: Fix RAID-0 disk size calculation for metadata 1.x
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/743136
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3128
Last-Update: 2011-03-29
Index: b/grub-core/disk/mdraid1x_linux.c
===================================================================
--- a/grub-core/disk/mdraid1x_linux.c
+++ b/grub-core/disk/mdraid1x_linux.c
@@ -192,7 +192,10 @@
array->level = grub_le_to_cpu32 (real_sb->level);
array->layout = grub_le_to_cpu32 (real_sb->layout);
array->total_devs = grub_le_to_cpu32 (real_sb->raid_disks);
- array->disk_size = grub_le_to_cpu64 (real_sb->size);
+ if (real_sb->size)
+ array->disk_size = grub_le_to_cpu64 (real_sb->size);
+ else
+ array->disk_size = grub_le_to_cpu64 (real_sb->data_size);
array->chunk_size = grub_le_to_cpu32 (real_sb->chunksize);
if (grub_le_to_cpu32 (real_sb->dev_number) >=

View File

@ -1,23 +0,0 @@
Description: Check RAID superblock offset
Fixes spurious "superfluous RAID member" errors.
Author: Anthony DeRobertis <anthony@derobert.net>
Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610184#20
Bug-Debian: http://bugs.debian.org/610184
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3082
Last-Update: 2011-04-01
Index: b/grub-core/disk/mdraid1x_linux.c
===================================================================
--- a/grub-core/disk/mdraid1x_linux.c
+++ b/grub-core/disk/mdraid1x_linux.c
@@ -143,7 +143,8 @@
&sb))
return grub_errno;
- if (grub_le_to_cpu32 (sb.magic) != SB_MAGIC)
+ if (grub_le_to_cpu32 (sb.magic) != SB_MAGIC
+ || grub_le_to_cpu64 (sb.super_offset) != sector)
continue;
{

View File

@ -1,22 +0,0 @@
Description: Use correct limits for mips initrd
Author: Vladimir Serbinenko <phcoder@gmail.com>
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3203
Last-Update: 2011-04-14
Index: b/grub-core/loader/mips/linux.c
===================================================================
--- a/grub-core/loader/mips/linux.c
+++ b/grub-core/loader/mips/linux.c
@@ -379,8 +379,9 @@
grub_relocator_chunk_t ch;
err = grub_relocator_alloc_chunk_align (relocator, &ch,
- target_addr + linux_size + 0x10000,
- (0xffffffff - size) + 1,
+ (target_addr & 0x1fffffff)
+ + linux_size + 0x10000,
+ (0x10000000 - size),
size, 0x10000,
GRUB_RELOCATOR_PREFERENCE_NONE);

View File

@ -12,9 +12,9 @@ Index: b/util/grub-mkconfig_lib.in
===================================================================
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -99,6 +99,15 @@
@@ -105,6 +105,15 @@
{
device=$1
device="$1"
+ if dmsetup status $device 2>/dev/null | grep -q 'crypt[[:space:]]$'; then
+ grub_warn \
@ -26,5 +26,5 @@ Index: b/util/grub-mkconfig_lib.in
+ fi
+
# Abstraction modules aren't auto-loaded.
abstraction="`${grub_probe} --device ${device} --target=abstraction`"
abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
for module in ${abstraction} ; do

View File

@ -1,34 +0,0 @@
Description: Handle special naming of yeeloong directory
Author: Vladimir Serbinenko <phcoder@gmail.com>
Bug-Debian: http://bugs.debian.org/620420
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3194
Last-Update: 2011-04-09
Index: b/util/grub-mkimage.c
===================================================================
--- a/util/grub-mkimage.c
+++ b/util/grub-mkimage.c
@@ -1586,9 +1586,19 @@
+ 1);
memcpy (dir, GRUB_PKGLIBROOTDIR, sizeof (GRUB_PKGLIBROOTDIR) - 1);
*(dir + sizeof (GRUB_PKGLIBROOTDIR) - 1) = '/';
- memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), image_target->name,
- last - image_target->name);
- *(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name)) = 0;
+ if (strncmp (image_target->name, "mipsel-yeeloong",
+ last - image_target->name) == 0)
+ {
+ memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), "mips-yeeloong",
+ sizeof ("mips-yeeloong"));
+ }
+ else
+ {
+ memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), image_target->name,
+ last - image_target->name);
+ *(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name))
+ = 0;
+ }
}
generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp,

View File

@ -36,7 +36,7 @@ Index: b/util/grub-mkrescue.in
*)
source="${source} ${option} $@"; break ;;
esac
@@ -303,7 +308,14 @@
@@ -307,7 +312,14 @@
fi
# build iso image

View File

@ -17,6 +17,6 @@ Index: b/util/grub-mkrescue.in
# build bootia32.efi
- make_image "${efi32_dir}" i386-efi "${efi_dir}"/efi/boot/bootia32.efi ""
+ make_image "${efi32_dir}" i386-efi "${efi_dir}"/efi/boot/bootia32.efi "part_msdos fat"
mformat -C -f 2880 -L 16 -i "${iso9660_dir}"/efi.img ::
mcopy -s -i "${iso9660_dir}"/efi.img ${efi_dir}/efi ::/
if [ -e "${efi_dir}"/efi/boot/bootia32.efi ]; then
# For old macs. Suggested by Peter Jones.
cp "${efi_dir}"/efi/boot/bootia32.efi "${efi_dir}"/efi/boot/boot.efi

View File

@ -1,168 +0,0 @@
Description: Rewrite find_root_device_from_mountinfo to cope with move-mounts
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/738345
Forwarded: http://www.mail-archive.com/grub-devel@gnu.org/msg17105.html
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3214
Last-Update: 2011-04-13
Index: b/grub-core/kern/emu/getroot.c
===================================================================
--- a/grub-core/kern/emu/getroot.c
+++ b/grub-core/kern/emu/getroot.c
@@ -96,6 +96,14 @@
#ifdef __linux__
+struct mountinfo_entry
+{
+ int id;
+ int major, minor;
+ char enc_root[PATH_MAX], enc_path[PATH_MAX];
+ char fstype[PATH_MAX], device[PATH_MAX];
+};
+
/* Statting something on a btrfs filesystem always returns a virtual device
major/minor pair rather than the real underlying device, because btrfs
can span multiple underlying devices (and even if it's currently only
@@ -110,68 +118,117 @@
char *buf = NULL;
size_t len = 0;
char *ret = NULL;
+ int entry_len = 0, entry_max = 4;
+ struct mountinfo_entry *entries;
+ struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" };
+ int i;
fp = fopen ("/proc/self/mountinfo", "r");
if (! fp)
return NULL; /* fall through to other methods */
+ entries = xmalloc (entry_max * sizeof (*entries));
+
+ /* First, build a list of relevant visible mounts. */
while (getline (&buf, &len, fp) > 0)
{
- int mnt_id, parent_mnt_id;
- unsigned int major, minor;
- char enc_root[PATH_MAX], enc_path[PATH_MAX];
+ struct mountinfo_entry entry;
int count;
size_t enc_path_len;
const char *sep;
- char fstype[PATH_MAX], device[PATH_MAX];
- struct stat st;
if (sscanf (buf, "%d %d %u:%u %s %s%n",
- &mnt_id, &parent_mnt_id, &major, &minor, enc_root, enc_path,
- &count) < 6)
+ &entry.id, &parent_entry.id, &entry.major, &entry.minor,
+ entry.enc_root, entry.enc_path, &count) < 6)
continue;
- if (strcmp (enc_root, "/") != 0)
+ if (strcmp (entry.enc_root, "/") != 0)
continue; /* only a subtree is mounted */
- enc_path_len = strlen (enc_path);
+ enc_path_len = strlen (entry.enc_path);
/* Check that enc_path is a prefix of dir. The prefix must either be
the entire string, or end with a slash, or be immediately followed
by a slash. */
- if (strncmp (dir, enc_path, enc_path_len) != 0 ||
+ if (strncmp (dir, entry.enc_path, enc_path_len) != 0 ||
(enc_path_len && dir[enc_path_len - 1] != '/' &&
dir[enc_path_len] && dir[enc_path_len] != '/'))
continue;
- /* This is a parent of the requested directory. /proc/self/mountinfo
- is in mount order, so it must be the closest parent we've
- encountered so far. If it's virtual, return its device node;
- otherwise, carry on to try to find something closer. */
-
- free (ret);
- ret = NULL;
-
- if (major != 0)
- continue; /* not a virtual device */
-
sep = strstr (buf + count, " - ");
if (!sep)
continue;
sep += sizeof (" - ") - 1;
- if (sscanf (sep, "%s %s", fstype, device) != 2)
+ if (sscanf (sep, "%s %s", entry.fstype, entry.device) != 2)
continue;
- if (stat (device, &st) < 0)
+ /* Using the mount IDs, find out where this fits in the list of
+ visible mount entries we've seen so far. There are three
+ interesting cases. Firstly, it may be inserted at the end: this is
+ the usual case of /foo/bar being mounted after /foo. Secondly, it
+ may be inserted at the start: for example, this can happen for
+ filesystems that are mounted before / and later moved under it.
+ Thirdly, it may occlude part or all of the existing filesystem
+ tree, in which case the end of the list needs to be pruned and this
+ new entry will be inserted at the end. */
+ if (entry_len >= entry_max)
+ {
+ entry_max <<= 1;
+ entries = xrealloc (entries, entry_max * sizeof (*entries));
+ }
+
+ if (!entry_len)
+ {
+ /* Initialise list. */
+ entry_len = 2;
+ entries[0] = parent_entry;
+ entries[1] = entry;
+ }
+ else
+ {
+ for (i = entry_len - 1; i >= 0; i--)
+ {
+ if (entries[i].id == parent_entry.id)
+ {
+ /* Insert at end, pruning anything previously above this. */
+ entry_len = i + 2;
+ entries[i + 1] = entry;
+ break;
+ }
+ else if (i == 0 && entries[i].id == entry.id)
+ {
+ /* Insert at start. */
+ entry_len++;
+ memmove (entries + 1, entries,
+ (entry_len - 1) * sizeof (*entries));
+ entries[0] = parent_entry;
+ entries[1] = entry;
+ break;
+ }
+ }
+ }
+ }
+
+ /* Now scan visible mounts for the ones we're interested in. */
+ for (i = entry_len - 1; i >= 0; i--)
+ {
+ struct stat st;
+
+ if (entries[i].major != 0)
+ continue; /* not a virtual device */
+
+ if (!*entries[i].device || stat (entries[i].device, &st) < 0)
continue;
if (!S_ISBLK (st.st_mode))
continue; /* not a block device */
- ret = strdup (device);
+ ret = strdup (entries[i].device);
+ break;
}
free (buf);
+ free (entries);
fclose (fp);
return ret;
}

View File

@ -1,20 +0,0 @@
Description: Fix crash when extending menu entry line beyond 79 characters
Author: Vladimir Serbinenko <phcoder@gmail.com>
Bug-Debian: http://bugs.debian.org/615893
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3109
Last-Update: 2011-03-24
Index: b/grub-core/normal/menu_entry.c
===================================================================
--- a/grub-core/normal/menu_entry.c
+++ b/grub-core/normal/menu_entry.c
@@ -87,7 +87,7 @@
{
linep->len = 0;
linep->max_len = 80; /* XXX */
- linep->buf = grub_malloc (linep->max_len);
+ linep->buf = grub_malloc (linep->max_len + 1);
if (! linep->buf)
return 0;

18
debian/patches/series vendored
View File

@ -10,28 +10,10 @@ mkrescue_diet.patch
mkconfig_skip_dmcrypt.patch
install_stage2_confusion.patch
qemu_img_exists.patch
mountinfo_move_mounts.patch
branch_butter.patch
branch_devmapper.patch
branch_squash.patch
branch_longlinuxcmd.patch
branch_parse-color.patch
branch_embed-sectors.patch
branch_fuse.patch
btrfs_rootflags.patch
lnxboot_grub.patch
normal_menu_line_alloc.patch
freebsd_module_header_alloc.patch
video_fb_pageflip.patch
freebsd_definitions.patch
kfreebsd_libgeom.patch
copy_partition_table.patch
ext2_overflow.patch
mdraid1x_raid0_size.patch
mdraid1x_super_offset.patch
host_optimise_flush.patch
mkimage_yeeloong.patch
loopback_replace.patch
btrfs_reserved_sector.patch
mkrescue_efi_modules.patch
mips_initrd_limits.patch

View File

@ -1,32 +0,0 @@
Description: Switch back to framebuffer page zero before loading kernel
Thanks to Felix Kuehling.
Author: Colin Watson <cjwatson@ubuntu.com>
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-03/msg00057.html
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3116
Last-Update: 2011-03-25
Index: b/grub-core/video/fb/video_fb.c
===================================================================
--- a/grub-core/video/fb/video_fb.c
+++ b/grub-core/video/fb/video_fb.c
@@ -1505,6 +1505,20 @@
{
grub_memcpy (mode_info, &(framebuffer.front_target->mode_info),
sizeof (*mode_info));
+
+ /* We are about to load a kernel. Switch back to page zero, since some
+ kernel drivers expect that. */
+ if ((mode_info->mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED)
+ && framebuffer.set_page && framebuffer.displayed_page != 0)
+ {
+ /* Ensure both pages are exactly in sync. */
+ grub_memcpy (framebuffer.back_target->data,
+ framebuffer.front_target->data,
+ framebuffer.back_target->mode_info.pitch
+ * framebuffer.back_target->mode_info.height);
+ grub_video_swap_buffers ();
+ }
+
*framebuf = framebuffer.front_target->data;
grub_video_fb_fini ();

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects
# AM_MAKEINFOFLAGS = --no-split --no-validate
info_TEXINFOS = grub.texi
info_TEXINFOS = grub.texi grub-dev.texi
grub_TEXINFOS = fdl.texi

BIN
docs/font_char_metrics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1 @@
Please fill this in.

1533
docs/grub-dev.texi Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -200,7 +200,7 @@ program = {
ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(MODULE_FILES)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
@ -212,7 +212,7 @@ program = {
emu_nodist = symlist.c;
ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu;
};
@ -906,6 +906,7 @@ module = {
module = {
name = btrfs;
common = fs/btrfs.c;
common = lib/crc.c;
};
module = {

View File

@ -178,8 +178,13 @@ real_code_2:
pushw %es
popw %ds
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
movl $0x200, %ecx
addl %ecx, %esi
#else
movl $(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4), %ecx
addl $0x200, %esi
#endif
movl $DATA_ADDR, %edi
call LOCAL(move_memory)
@ -196,7 +201,11 @@ real_code_2:
1:
movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
#else
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4)), %ecx
#endif
2:
call LOCAL(move_memory)

View File

@ -120,7 +120,7 @@ __start:
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
lui $a0, %hi(unimplemented_memory_type)
bne $t0, $v0, fatal
addiu $a0, $a0, %hi(unimplemented_memory_type)
addiu $a0, $a0, %lo(unimplemented_memory_type)
/* And here is our goal: DDR2 controller initialisation. */
lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)

View File

@ -38,7 +38,7 @@ write_bases (void)
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
& GRUB_MACHINE_PCI_WIN_MASK)
>> (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
<< (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
}

View File

@ -22,6 +22,10 @@
#include <grub/time.h>
#include <grub/ata.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
int
grub_cs5536_find (grub_pci_device_t *devp)
{

View File

@ -21,6 +21,8 @@
#include <grub/pci.h>
#include <grub/mm.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* FIXME: correctly support 64-bit architectures. */
/* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
struct grub_pci_dma_chunk *

View File

@ -24,6 +24,8 @@
#include <grub/usb.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_usb_controller_dev usb_controller =
{

View File

@ -29,6 +29,8 @@
#include <grub/cs5536.h>
#include <grub/loader.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_ohci_hcca
{
/* Pointers to Interrupt Endpoint Descriptors. Not used by

View File

@ -18,6 +18,9 @@
#include <grub/serial.h>
#include <grub/usbserial.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
void
grub_usbserial_fini (struct grub_serial_port *port)

View File

@ -24,6 +24,8 @@
#include <grub/usb.h>
#include <grub/usbserial.h>
GRUB_MOD_LICENSE ("GPLv3+");
enum
{
GRUB_FTDI_MODEM_CTRL = 0x01,

View File

@ -24,6 +24,8 @@
#include <grub/usb.h>
#include <grub/usbserial.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Convert speed to divisor. */
static grub_uint32_t
is_speed_supported (unsigned int speed)

View File

@ -26,6 +26,8 @@
#include <grub/i386/io.h>
#include <grub/time.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_UHCI_IOMASK (0x7FF << 5)
#define N_QH 256
@ -749,8 +751,7 @@ grub_uhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
else if (port == 1)
reg = GRUB_UHCI_REG_PORTSC2;
else
return grub_error (GRUB_ERR_OUT_OF_RANGE,
"UHCI Root Hub port does not exist");
return GRUB_USB_SPEED_NONE;
status = grub_uhci_readreg16 (u, reg);

View File

@ -24,8 +24,10 @@
#include <grub/list.h>
#include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_usb_controller_dev_t grub_usb_list;
struct grub_usb_attach_desc *attach_hooks;
static struct grub_usb_attach_desc *attach_hooks;
void
grub_usb_controller_dev_register (grub_usb_controller_dev_t usb)

View File

@ -39,7 +39,7 @@ struct grub_usb_hub
grub_usb_device_t dev;
};
struct grub_usb_hub *hubs;
static struct grub_usb_hub *hubs;
/* Add a device that currently has device number 0 and resides on
CONTROLLER, the Hub reported that the device speed is SPEED. */
@ -110,7 +110,7 @@ static grub_usb_err_t
grub_usb_add_hub (grub_usb_device_t dev)
{
struct grub_usb_usb_hubdesc hubdesc;
grub_err_t err;
grub_usb_err_t err;
int i;
err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN

View File

@ -97,7 +97,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
if (! transfer)
{
grub_dma_free (data_chunk);
return grub_errno;
return GRUB_USB_ERR_INTERNAL;
}
setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata));
@ -105,7 +105,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
{
grub_free (transfer);
grub_dma_free (data_chunk);
return grub_errno;
return GRUB_USB_ERR_INTERNAL;
}
setupdata = grub_dma_get_virt (setupdata_chunk);
@ -139,7 +139,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
grub_free (transfer);
grub_dma_free (setupdata_chunk);
grub_dma_free (data_chunk);
return grub_errno;
return GRUB_USB_ERR_INTERNAL;
}
/* Build a Setup packet. XXX: Endianness. */

View File

@ -33,6 +33,8 @@
#include <grub/efi/api.h>
#endif
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"exclude", 'x', 0,
N_("Don't load host tables specified by comma-separated list."),

View File

@ -26,6 +26,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
int argc, char **args)

View File

@ -25,6 +25,8 @@
#include <grub/mm.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t (*grub_loader_boot_func) (void);
static grub_err_t (*grub_loader_unload_func) (void);
static int grub_loader_noreturn;

View File

@ -25,6 +25,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BUFFER_SIZE 512
static grub_err_t

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_source (grub_command_t cmd, int argc, char **args)
{

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_DATETIME_SET_YEAR 1
#define GRUB_DATETIME_SET_MONTH 2
#define GRUB_DATETIME_SET_DAY 4

View File

@ -23,6 +23,8 @@
#include <grub/i18n.h>
#include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_video_patch
{
const char *name;

View File

@ -25,6 +25,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;

View File

@ -23,6 +23,8 @@
#include <grub/efi/efi.h>
#include <grub/command.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define ADD_MEMORY_DESCRIPTOR(desc, size) \
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))

View File

@ -18,12 +18,15 @@
*/
#include <grub/types.h>
#include <grub/mm.h>
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/normal.h>
#include <grub/charset.h>
#include <grub/efi/api.h>
#include <grub/efi/efi.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct guid_mapping
{
grub_efi_guid_t guid;

View File

@ -23,6 +23,9 @@
#include <grub/charset.h>
#include <grub/efi/api.h>
#include <grub/efi/efi.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static void
disp_sal (void *table)

View File

@ -22,6 +22,9 @@
#include <grub/misc.h>
#include <grub/extcmd.h>
#include <grub/script_sh.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
grub_err_t
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,

View File

@ -29,6 +29,8 @@
#include <grub/fs.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Convert a LBA address to a CHS address in the INT 13 format. */
/* Taken from grub1. */
/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.

View File

@ -22,6 +22,8 @@
#include <grub/misc.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View File

@ -26,6 +26,8 @@
#include <grub/normal.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
@ -36,7 +38,7 @@ static const struct grub_arg_option options[] = {
{0, 0, 0, 0, 0, 0}
};
struct { const char *name; const char *hashname; } aliases[] =
static struct { const char *name; const char *hashname; } aliases[] =
{
{"sha256sum", "sha256"},
{"sha512sum", "sha512"},

View File

@ -26,6 +26,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"apm", 'B', 0, N_("Set Advanced Power Management\n"
"(1=low, ..., 254=high, 255=off)."),

View File

@ -26,6 +26,8 @@
#include <grub/normal.h>
#include <grub/charset.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
char **args)

View File

@ -25,6 +25,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = {
{"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
ARG_TYPE_INT},

View File

@ -21,6 +21,8 @@
#include <grub/misc.h>
#include <grub/cmos.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
parse_args (int argc, char *argv[], int *byte, int *bit)
{

View File

@ -27,6 +27,8 @@
#include <grub/i386/cpuid.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define cpuid(num,a,b,c,d) \
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \

View File

@ -29,6 +29,7 @@
#include <grub/memory.h>
#include <grub/machine/memory.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);

View File

@ -24,6 +24,8 @@
#include <grub/machine/int.h>
#include <grub/acpi.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},

View File

@ -22,6 +22,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
int
grub_apm_get_info (struct grub_apm_info *info)
{

View File

@ -29,6 +29,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
/* The speaker port. */

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View File

@ -27,6 +27,8 @@
#include <grub/cpu/io.h>
#include <grub/loader.h>
GRUB_MOD_LICENSE ("GPLv2+");
static char sendkey[0x20];
/* Length of sendkey. */
static int keylen = 0;

View File

@ -24,6 +24,8 @@
#include <grub/command.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),

View File

@ -24,6 +24,8 @@
#include <grub/cpu/io.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;

View File

@ -28,6 +28,8 @@
#include <grub/i18n.h>
#include <grub/file.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_keyboard_layout layout_us = {
.keyboard_map = {
/* Keyboard errors. Handled by driver. */

View File

@ -23,6 +23,8 @@
#include <grub/term.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"shift", 's', 0, N_("Check Shift key."), 0, 0},

View File

@ -33,6 +33,8 @@
#include <grub/disk.h>
#include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
legacy_file (const char *filename)
{

View File

@ -28,6 +28,8 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},

View File

@ -32,6 +32,8 @@
#include <grub/datetime.h>
#include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] =
{
{"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0},

Some files were not shown because too many files have changed in this diff Show More