Commit graph

8973 commits

Author SHA1 Message Date
Vladimir Serbinenko
480c89858e * grub-core/commands/verify.c (grub_pubkey_open): Fix memdisk
check.
2014-06-21 20:10:48 +02:00
Vladimir Serbinenko
4b8b9135f1 * grub-core/kern/misc.c (__bzero): Don't compile in GRUB_UTIL.
Reported by: Yves Blusseau <blusseau@zetam.org>.
2014-04-20 16:12:41 +02:00
Piotr Krysiuk
5a6db38d62 Allow loading old kernels by placing GDT in conventional memory. 2014-04-20 16:00:55 +02:00
Colin Watson
3a310e842f Tolerate devices with no filesystem UUID returned by os-prober
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
UUID.  Other parts of grub-mkconfig tolerate these, they were
previously allowed here up to commit
55e706c918, and they can arise in
practice when the system has active LVM snapshots.
Fixes Ubuntu bug #1287436.
2014-04-10 16:54:33 +01:00
Colin Watson
c4badfe836 Improve LVM "logical_volumes" string matching
* grub-core/disk/lvm.c (grub_lvm_detect): Search for
"logical_volumes" block a little more accurately.
2014-04-10 14:42:41 +01:00
Vladimir Serbinenko
a72fc329eb * grub-core/lib/syslinux_parse.c: Fix timeout quoting. 2014-04-06 00:44:44 +02:00
Vladimir Serbinenko
2009da62f2 Add missing #endif 2014-04-04 08:11:15 +02:00
Vladimir Serbinenko
6f6d4aa02c * include/grub/libgcc.h: Remove ctzsi2 and ctzdi2. They're no longer pulled from libgcc. 2014-04-04 08:02:38 +02:00
Vladimir Serbinenko
8063ce197f Replace few instances of memcmp/memcpy in the code that should be grub_memcmp/grub_memcpy. 2014-04-04 07:58:42 +02:00
Vladimir Serbinenko
9706066791 * grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Support NVMe device names. 2014-04-03 21:31:12 +02:00
Thomas Falcon
4afd0107ef btrfs: fix get_root key comparison failures due to endianness
* grub-core/fs/btrfs.c (get_root): Convert
GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
2014-03-31 15:32:30 +01:00
Colin Watson
24024dac7f Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
Commit 588744d0dc caused grub-mkconfig
no longer to be forgiving of trailing spaces on grub-probe output
lines, which among other things means that util/grub.d/10_linux.in
no longer detects LVM.  To fix this, make grub-probe's output
delimiting more consistent.  As a bonus, this improves the coverage
of the -0 option.

Fixes Debian bug #735935.

* grub-core/disk/cryptodisk.c
(grub_util_cryptodisk_get_abstraction): Add a user-data argument.
* grub-core/disk/diskfilter.c (grub_diskfilter_get_partmap):
Likewise.
* include/grub/cryptodisk.h (grub_util_cryptodisk_get_abstraction):
Update prototype.
* include/grub/diskfilter.h (grub_diskfilter_get_partmap): Likewise.
* util/grub-install.c (push_partmap_module, push_cryptodisk_module,
probe_mods): Adjust for extra user-data arguments.
* util/grub-probe.c (do_print, probe_partmap, probe_cryptodisk_uuid,
probe_abstraction): Use configured delimiter.  Update callers.
2014-03-31 14:48:46 +01:00
Colin Watson
9b35fe819f Fix grub-probe -0 option
* util/grub-probe,c (options): Make -0 work again (broken by
conversion to argp).
(main): Simplify logic.
2014-03-31 13:51:17 +01:00
Vladimir Serbinenko
46b74dd3cb * grub-core/lib/relocator.c: Fix the case when end of leftover is used. 2014-03-26 08:48:30 +01:00
Fu Wei
68f17b2b30 * grub-core/loader/arm64/linux.c: Remove redundant "0x". 2014-03-26 08:13:07 +01:00
Nikunj A Dadhania
e4a1fe3919 ieee1275: check for IBM pseries emulated machine
is_qemu is not being set lead to disabling of feature like
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF. This resulted in cursor not being
displayed during the grub-menu edit.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-03-24 15:44:33 +00:00
Vladimir Serbinenko
86402b4e0f * include/grub/i386/openbsd_bootarg.h: Add addr and frequency fields.
* grub-core/loader/i386/bsd.c (grub_cmd_openbsd): Fill addr field.

	Suggested by: Markus Müller.
2014-02-28 10:50:05 +01:00
Vladimir Serbinenko
bec35dad2a * grub-core/kern/i386/pc/mmap.c: Fallback to EISA memory map
if E820 failed to return any regions.
2014-02-28 10:07:11 +01:00
Vladimir Serbinenko
dfc5ccfa97 * grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]: Ignore low
tables for low memory calculations.
2014-02-28 09:50:47 +01:00
Vladimir Serbinenko
4a70fed815 * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi): Limit
location to 640K.
2014-02-28 09:48:57 +01:00
Vladimir Serbinenko
f94b2b4eeb * grub-core/kern/i386/coreboot/mmap.c: Filter out 0xa0000-0x100000
region.
2014-02-28 09:47:57 +01:00
Vladimir Serbinenko
d0949e3747 * grub-core/disk/ahci.c: Ignore NPORTS field and rely on PI
exclusively.
2014-02-20 10:11:43 +01:00
Paulo Flabiano Smorigo
9585647a25 add bootpath parser for open firmware
It enables net boot even when there is no bootp/dhcp server.

* grub-core/net/drivers/ieee1275/ofnet.c: Add grub_ieee1275_parse_bootpath and
call it at grub_ieee1275_net_config_real.
* grub-core/kern/ieee1275/init.c: Add bootpath to grub_ieee1275_net_config.
* include/grub/ieee1275/ieee1275.h: Likewise.
2014-02-04 19:02:16 -02:00
Paulo Flabiano Smorigo
e4dbf247b6 add grub_env_set_net_property function
* grub-core/net/bootp.c: Remove set_env_limn_ro.
* grub-core/net/net.c: Add grub_env_set_net_property.
* include/grub/net.h: Likewise.
2014-02-04 18:41:38 -02:00
Vladimir Serbinenko
006c78f378 * util/grub-mkrescue.c: Build fix for argp.h with older gcc. 2014-02-03 14:35:51 +01:00
Vladimir Serbinenko
511ece7ceb * util/grub-mkfont.c: Build fix for argp.h with older gcc. 2014-02-03 14:34:27 +01:00
Vladimir Serbinenko
9abbaae7cd * grub-core/disk/ahci.c: Increase timeout. Some SSDs take up to
7 seconds to recover if last poweroff was bad.
2014-01-29 23:50:49 +01:00
Vladimir Serbinenko
d6b94c5eb2 * grub-core/disk/ahci.c: Properly handle transactions with no
transferred data.
2014-01-29 23:49:51 +01:00
Vladimir Serbinenko
07ea8daa86 * grub-core/disk/ahci.c: Add safety cleanups. 2014-01-29 23:46:17 +01:00
Vladimir Serbinenko
3142b2feac * grub-core/disk/ahci.c: Allocate and clean space for all possible 32
slots to avoid pointing to uninited area.
2014-01-29 23:45:18 +01:00
Vladimir Serbinenko
4686e163f2 * grub-core/disk/ahci.c: Do not enable I/O decoding and keep
enabling busmaster for the end.
2014-01-29 23:43:25 +01:00
Vladimir Serbinenko
ba424f37a9 * util/grub-mkfont.c: Downgrade warnings about unhandled features
to debug.
2014-01-29 23:41:48 +01:00
Vladimir Serbinenko
3beabdc8e4 Merge branch 'master' of git.sv.gnu.org:/srv/git/grub
Conflicts:
	ChangeLog
2014-01-29 23:40:11 +01:00
Paulo Flabiano Smorigo
ba584da163 .gitignore: add missing files and .exe variants. 2014-01-29 13:27:37 -02:00
Vladimir Serbinenko
7f64fb590c * grub-core/term/at_keyboard.c: Tolerate missing keyboard. 2014-01-26 03:31:10 +01:00
Mike Gilbert
35f2d96c0d grub-install: support for partitioned partx loop devices.
* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
	/dev/loopX as being the parent of /dev/loopXpY.
2014-01-26 02:56:04 +01:00
Vladimir Serbinenko
9afe2053c9 * grub-core/term/serial.c (grub_serial_register): Fix invalid free.
Ensure that pointers are inited to NULL and that pointers are not
	accessed after free.
2014-01-26 02:36:05 +01:00
Andrey Borzenkov
5ae584c0b0 fix Mingw W64-32 cross compile failure due to printf redefinition in libintl.h
In file included from util/misc.c:36:0:
./include/grub/emu/misc.h:56:1: error: 'libintl_printf' is an unrecognized format function type [-Werror=format=]
 char * EXPORT_FUNC(xasprintf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))) WARN_UNUSED_RESULT;
 ^
./include/grub/emu/misc.h:58:1: error: 'libintl_printf' is an unrecognized format function type [-Werror=format=]

The reason is libintl.h which redefines printf as libintl_printf. The problem
is not present in native MinGW build which avoids redefinition.  Use
(format (__printf__) instead which is valid replacement in GCC.

v2: add grub-core/lib/libgcrypt/src/g10lib.h
v3: modify g10lib.h during import
2014-01-25 21:49:41 +04:00
Andrey Borzenkov
1440b7ebae do not set default prefix in grub-mkimage
Default prefix is likely wrong on Unix and completely wrong on Windows.
Let caller set it explicitly to avoid any ambiguity.
2014-01-25 19:54:51 +04:00
Vladimir Serbinenko
61c8482b20 Fix several translatable strings.
Suggested by: D. Prévot.
2014-01-24 18:20:27 +01:00
Vladimir Serbinenko
95cd131ea0 * util/grub-install.c: List available targets. 2014-01-24 18:09:25 +01:00
Colin Watson
d08059309f * util/grub-install.c (write_to_disk): Add an info message. 2014-01-23 12:05:36 +00:00
Andrey Borzenkov
eec4237a32 add GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime files
Not all toolkits provide static libraries. This patch enables creation of self
contained distribution that does not require pre-existing runtime libraries.
Intended usage is

export GRUB_WINDOWS_EXTRA_DIST="/path/to/liblzma.dll /path/to/libintl.dll"
make
make windowszip

As those libraries and locations are dependent on toolchain in use, trying
to autodetect them is likely impossible. So just provide a simple way to
package everything in one step.

Also remove $(windowsdir) after ZIP was created same as other "make dist"
targets.
2014-01-21 20:54:09 +04:00
Andrey Borzenkov
443b322262 Show detected path to DejaVuSans in configure summary 2014-01-21 19:41:11 +04:00
Andrey Borzenkov
36387ece6b look for DejaVu also in /usr/share/fonts/truetype
It is installed in this path on openSUSE.
2014-01-21 19:29:33 +04:00
Paulo Flabiano Smorigo
6f65e36cc4 increase network try interval gradually
* grub-core/net/arp.c (grub_net_arp_send_request): Increase network try
interval gradually.
* grub-core/net/icmp6.c (grub_net_icmp6_send_request): Likewise.
* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
* grub-core/net/tftp.c (tftp_open): Likewise.
* include/grub/net.h (GRUB_NET_INTERVAL_ADDITION): New define.
2014-01-21 11:06:35 -02:00
Paulo Flabiano Smorigo
d99d2f8416 change stop condition to avoid infinite loops
In net/net.c there is a while (1) that only exits if there is a stop
condition and more then 10 packages or if there is no package received.

If GRUB is idle and enter in this loop, the only condition to leave is
if it doesn't have incoming packages. In a network with heavy traffic
this never happens.
2014-01-21 10:54:49 -02:00
Colin Watson
049f63824c Ignore EPERM when modifying kern.geom.debugflags
Many tests fail when run as a non-root user on FreeBSD.  The failures
all amount to an inability to open files using grub_util_fd_open,
because we cannot set the kern.geom.debugflags sysctl.  This sysctl is
indeed important to allow us to do such things as installing GRUB to the
MBR, but if we need to do that and can't then we will get an error
later.  Enforcing it here is unnecessary and prevents otherwise
perfectly reasonable operations.
2014-01-19 14:38:07 +00:00
Andrey Borzenkov
015045471e use MODULE_FILES for genemuinit* instead of MOD_FILES
MinGW native nm does not support ELF binaries.
2014-01-18 23:15:40 +04:00
Vladimir Serbinenko
b204b718cc * util/grub-install.c: Fix a typo. 2014-01-18 20:02:51 +01:00