Commit graph

8979 commits

Author SHA1 Message Date
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
Vladimir Serbinenko
41155a5722 * grub-core/normal/main.c (read_config_file): Buffer config file.
Reduces boot time.
2014-01-18 19:54:09 +01:00
Andrey Borzenkov
e0a850947f fix removal of {cpu,machine} links on mingw/msys
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds,
but results in what looks like hard link. Subsequent "rm -f dir2" (e.g.
during second config.status invocation) fails. Check that we also can
remove link to directory.

Make it more clear in message that we are checking "ln -s".
2014-01-18 22:48:04 +04:00
Vladimir Serbinenko
0b47c57ad6 * Makefile.am (default_payload.elf): Add modules
multiboot cbmemc linux16 gzio echo help.
2014-01-18 19:43:19 +01:00
Mike Gilbert
6ba983559d * Makefile.util.def: Link grub-ofpathname with zfs libs. 2014-01-18 19:41:15 +01:00
Vladimir Serbinenko
6c519b5c6c * grub-core/commands/macbless.c: Rename FILE and DIR to avoid
conflicts.

	Reported by: Andrey Borzenkov.
2014-01-18 19:26:40 +01:00
Andrey Borzenkov
f371dd5da8 fix include loop on MinGW due to libintl.h pulling stdio.h
In file included from ./include/grub/dl.h:23:0,
                 from grub-core/lib/libgcrypt-grub/cipher/rfc2268.c:3:
./include/grub/list.h:34:18: warning: conflicting types for 'grub_list_push' [en
abled by default]
 void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
                  ^
./include/grub/symbol.h:68:25: note: in definition of macro 'EXPORT_FUNC'
 # define EXPORT_FUNC(x) x
                         ^
In file included from ./include/grub/fs.h:30:0,
                 from ./include/grub/file.h:25,
                 from ./grub-core/lib/posix_wrap/stdio.h:23,
                 from c:\mingw\include\libintl.h:314,
                 from ./include/grub/i18n.h:33,
                 from ./include/grub/misc.h:27,
                 from ./include/grub/list.h:25,
                 from ./include/grub/dl.h:28,
                 from grub-core/lib/libgcrypt-grub/cipher/rfc2268.c:3:
./include/grub/partition.h:106:3: note: previous implicit declaration of 'grub_l
ist_push' was here
   grub_list_push (GRUB_AS_LIST_P (&grub_partition_map_list),
   ^
list.h needs just ATTRIBUTE_ERROR from misc.h; split compiler features
into separate file grub/compiler.h and include it instead.
2014-01-18 21:22:57 +04:00
Andrey Borzenkov
1ecf96fcc4 add BUILD_EXEEXT support to fix make clean on Windows
Add $(BUILD_EXEEXT) to ensure files are removed. Also add CLEANFILES where
appropriate.
2014-01-18 20:41:24 +04:00
Andrey Borzenkov
5ef569df5b Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
In 94cee4a4c2 I overlooked that config.h
unconditionally sets _FILE_OFFSET_BITS, so it cannot be used to detect
MinGW W64 environment. It looks like Emacs folks already found
solution; instead of _FILE_OFFSET_BITS use _W64 as suggested in
http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00723.html
2014-01-18 20:04:11 +04:00
Andrey Borzenkov
9b9c4686f0 Fix ChangeLog date 2014-01-18 20:01:16 +04:00
Vladimir Serbinenko
3abb956371 * grub-core/term/terminfo.c: Recognize keys F1-F12. 2014-01-18 16:57:35 +01:00
Andrey Borzenkov
dcecae1a49 reintroduce BUILD_LDFLAGS for the cross-compile case
This allows providing separate LDFLAGS for build and host environments, which
are not necessary the same for cross-compile case. In particular, it allows
building host programs statically to not depend on presence of libraries at
run-time (e.g. MinGW DLLs on Windows) while continue to use default dynamic
linking at build time.

Also fix obsolete comments in confgure.ac - we do use different environment
for build and host now.
2014-01-18 19:50:54 +04:00
Vladimir Serbinenko
ae80f31270 * util/grub-mount.c: Extend GCC warning workaround to grub-mount. 2014-01-18 16:43:29 +01:00
Vladimir Serbinenko
7e7293d745 * grub-core/kern/efi/efi.c: Ensure that the result starts with /
and has no //.
2014-01-18 16:41:47 +01:00
Vladimir Serbinenko
5acc8020b4 * NEWS: Add few missing entries. 2014-01-18 16:31:10 +01:00
Colin Watson
ff66b8e7d8 Prefer more portable test(1) constructs
* util/grub.d/00_header.in (make_timeout): Use && rather than test
-a.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/10_netbsd.in (netbsd_load_fs_module): Use || rather
than test -o.
* util/grub.d/30_os-prober.in: Use && rather than test -a, and ||
rather than test -o.
2014-01-17 15:29:43 +00:00
Colin Watson
09a836e59c freebsd/hostdisk.c is only ever compiled on FreeBSD
* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Remove
redundant preprocessor conditional.
2014-01-17 02:30:52 +00:00
Andrey Borzenkov
0776112c53 add part_apple to EFI rescue image to fix missing prefix
On Mac rescue image is booted from HFS+ partition, so bootpath looks like
/ACPI(a0341d0,0)/PCI(1,1f)/ATAPI(0,0,0)/HD(3,5d1,ca3,0000000000000000,20,0)/EndEntire

grub fails to find device for this path because it cannot scan partition
table. The simplest fix is to add part_apple by default.
2014-01-12 15:29:21 +04:00
Colin Watson
ccd21a65ed * Makefile.util.def (grub-macbless): Change mansection to 8. 2014-01-08 11:05:20 +00:00
Leif Lindholm
4d21c10199 arm64: set correct length of device path end entry
The length of the Device Path End entry in the grub_linux_boot()
function was incorrectly set to 0. This triggers an assert failure
in debug builds of Tianocore.

Set it to sizeof (grub_efi_device_path_t).
2014-01-07 17:52:50 +00:00
Andrey Borzenkov
e7cfa8d5e1 Change grub-mkrescue to use bootaa64.efi too
Also add ChangeLog entry for previous change.
2014-01-07 20:34:25 +04:00
Andrey Borzenkov
94cee4a4c2 fix 32 bit compilation on MinGW-w64
Use _FILE_OFFSET_BITS macro to distinguish between native MinGW and
32 bit under MinGW-64. The latter does not require fseeko/ftello
redefinition which it already does in case of _FILE_OFFSET_BITS=64.
2014-01-07 18:44:51 +04:00
Andrey Borzenkov
c9e839e2ca use {grub,boot}aa64.efi for boot images on AArch64
According to UEFI 2.4 specification, default boot file name on AArch64
is BOOTAA64.EFI (3.4.1.1 Removable Media Boot Behavior). Also set default
GRUB image name to grubaa64.efi to match it.
2014-01-07 10:38:54 +04:00
Andrey Borzenkov
668add258f strip .eh_frame section from arm64-efi kernel
Fixes grub-mkimage error "relocation 0x105 is not implemented yet."
2013-12-30 13:07:54 +00:00
Vladimir Serbinenko
0e309454f6 * NEWS: Add few missing entries. Correct existing ones. 2013-12-30 06:49:15 +01:00
Vladimir Serbinenko
093dec7370 Don't abort() on unavailable coreboot tables if not running on coreboot. 2013-12-28 17:25:14 +01:00
Andrey Borzenkov
989af02582 remove unused error.h from kern/emu/misc.c
Fixes compilation on mingw32, where include is apparently missing.
2013-12-28 09:04:10 +04:00
Colin Watson
8442d3e956 * NEWS: The cmosclean command in fact dates back to 1.99. Remove
mention of it from 2.02.
2013-12-28 02:20:27 +00:00
Vladimir Serbinenko
645ff636fe Merge branch 'master' of git.sv.gnu.org:/srv/git/grub
Conflicts:
	ChangeLog
2013-12-27 11:20:37 +01:00
Colin Watson
30a338460a * NEWS: First draft of 2.02 entry. 2013-12-27 03:05:38 +00:00
Colin Watson
51f941a0d8 * INSTALL (Cross-compiling the GRUB): Fix some spelling mistakes.
* docs/grub.texi (Getting the source code): Likewise.
2013-12-27 03:03:32 +00:00
Vladimir Serbinenko
5bda44d7f9 * grub-core/kern/arm/cache_armv6.S: Remove .arch directive.
As these functions are used on pre-ARMv6 CPUs as well we don't want
	to make assembler assume that architecture is higher than default one.
2013-12-25 23:31:42 +01:00
Andrey Borzenkov
a6e7719bbe fix EFI detection on Windows
We are on legacy BIOS if GetFirmwareEnvironmentVariable fails (returns
zero) *and* extended error information is ERROR_INVALID_FUNCTION.

Cf. http://msdn.microsoft.com/en-us/library/windows/desktop/ms724325%28v=vs.85%29.aspx
2013-12-25 22:36:28 +04:00
Vladimir Serbinenko
e8f07821cc * configure.ac: Set version to 2.02~beta2. 2013-12-24 21:53:23 +01:00
Vladimir Serbinenko
dc3286ade4 * grub-core/disk/efi/efidisk.c (name_devices): Skip Apple ghosts. 2013-12-24 20:32:14 +01:00
Andrey Borzenkov
46f8d358ef * util/grub-probe.c: Improve help message and simplify list handling. 2013-12-24 20:30:16 +01:00
Vladimir Serbinenko
09c479006c Fix buffer overflow in grub_efi_print_device_path. 2013-12-24 19:04:46 +01:00
Vladimir Serbinenko
4d6c69536e Show SATA device path. 2013-12-24 18:10:28 +01:00
Vladimir Serbinenko
faf4a65e1e Revert grub-file usage in grub-mkconfig. 2013-12-24 17:47:27 +01:00
Vladimir Serbinenko
e5fa26e573 Make newly-created files other than grub.cfg world-readable. 2013-12-24 17:36:10 +01:00
Andrey Borzenkov
569766e49b * util/grub.d/00_header.in: Improve compatibility with old config. 2013-12-24 17:26:05 +01:00
Vladimir Serbinenko
4127206896 Make rijndael.c respect aliasing rules.
Trivial backport of dfb4673da8ee52d95e0a62c9f49ca8599943f22e.
2013-12-24 16:57:28 +01:00
Vladimir Serbinenko
f7c7c4d4ad Make grub_util_device_is_mapped_stat available in grub-emu core. 2013-12-24 16:56:14 +01:00
Vladimir Serbinenko
57bc5d431b Add -Qn to TARGET_CFLAGS if it's supported.
Fixes compilation on cygwin.

	Reported by: Andrey Borzenkov.
	Suggested by: Andrey Borzenkov.
2013-12-24 15:00:46 +01:00
Vladimir Serbinenko
6a7957f9f5 Save TARGET_CC version in modinfo.sh.
Suggested by: Andrey Borzenkov.
2013-12-24 14:47:44 +01:00