Commit Graph

6009 Commits

Author SHA1 Message Date
Paulo Flabiano Smorigo ba584da163 .gitignore: add missing files and .exe variants. 2014-01-29 13:27:37 -02: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
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
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 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