Commit graph

8634 commits

Author SHA1 Message Date
Vladimir Serbinenko
85eb579ad9 * include/grub/types.h: Declare all byteswaps as inline functions
except compile-time ones.

	Solves variable shadowing in constructions like
	cpu_to_le (le_to_cpu(x) + 1).
2013-12-04 08:42:35 +01:00
Vladimir Serbinenko
47f88cc94e * grub-core/kern/efi/efi.c: Remove variable length arrays. 2013-12-04 08:39:22 +01:00
Vladimir Serbinenko
40b5739ff9 * grub-core/kern/uboot/init.c (uboot_timer_ms): Fix overflow after 71
minutes.
2013-12-04 08:26:39 +01:00
Vladimir Serbinenko
234d93464a * grub-core/disk/ieee1275/ofdisk.c: Remove variable length arrays.
* grub-core/net/drivers/ieee1275/ofnet.c: Likewise.
2013-12-04 08:10:01 +01:00
Colin Watson
0c0eab527f * grub-core/Makefile.core.def (setjmp): Distribute
lib/arm64/setjmp.S.
2013-12-03 18:11:18 +00:00
Colin Watson
44d4884779 Merge branch 'cjwatson/timeout-style' 2013-12-03 16:15:45 +00:00
Colin Watson
10955cda06 Credit and bug reference. 2013-12-03 16:14:01 +00:00
Colin Watson
f315b508ae Reduce nesting level. 2013-12-03 16:11:00 +00:00
Vladimir Serbinenko
9e4e6ddfbf * util/config.c: Add missing pointer adjustment.
Reported by: qwertial
2013-12-02 06:51:13 +01:00
Andrey Borzenkov
5037aa9a7b fix libgrub.pp build post arm64 merge
grub-core/kern/arm64/dl_helper.c:26:28: fatal error: grub/cpu/reloc.h: No such file or directory
2013-11-30 22:36:10 +04:00
Vladimir Serbinenko
8a952d20d1 Missing ChangeLog entry 2013-11-30 16:51:35 +01:00
Leif Lindholm
b29b77fee2 New port arm64-efi 2013-11-30 16:50:31 +01:00
Andrey Borzenkov
be0d45555e document sleep command exit codes 2013-11-30 14:57:11 +04:00
Vladimir Serbinenko
d74b9a1d1a Ensure that -mno-unaligned-access or some equivalent option is used. 2013-11-30 11:31:14 +01:00
Vladimir Serbinenko
35de6d4bac * grub-core/lib/libgcrypt/mpi/longlong.h: Fix compilation error with
-march=armv3.
2013-11-30 11:19:06 +01:00
Vladimir Serbinenko
ce55ed0389 Remove leftover GRUB_IA64_DL_TRAMP_SIZE. 2013-11-30 11:14:30 +01:00
Colin Watson
f70ab525f9 Remove a few references to GRUB_HIDDEN_TIMEOUT*
Reported by Andrey Borzenkov.
2013-11-29 17:19:37 +00:00
Colin Watson
9b70860ecc Consolidate timeout generation code a bit. 2013-11-29 16:11:53 +00:00
Colin Watson
095588ef34 Consistently ignore GRUB_TIMEOUT if GRUB_HIDDEN_TIMEOUT is set
Pointed out by Vladimir Serbinenko.
2013-11-29 15:30:44 +00:00
Colin Watson
2dbda2215c Fix documentation of behaviour after pressing ESC
Pointed out by Andrey Borzenkov.
2013-11-29 15:25:43 +00:00
Colin Watson
53cc63bf85 Add GRUB_TIMEOUT_STYLE_BUTTON support
Suggested by Vladimir Serbinenko.
2013-11-29 15:18:05 +00:00
Colin Watson
471b2683e7 Move deprecated grub-mkconfig options to a separate table
Suggested by Andrey Borzenkov.
2013-11-29 14:59:25 +00:00
Colin Watson
8ddf84bfb8 Fix "make -C docs dvi"
* docs/grub-dev.texi (Font Metrics): Exclude @image command from DVI
builds, since we don't have an EPS version of font_char_metrics.png.
Add leading dot to image extension per the Texinfo documentation.
2013-11-29 13:48:23 +00:00
Colin Watson
fd0df6d098 Fix build with FreeType 2.5.1
* util/grub-gen-asciih.c: Include FT_SYNTHESIS_H rather than
<freetype/ftsynth.h>, fixing build with FreeType 2.5.1.
* util/grub-gen-widthspec.c: Likewise.
* util/grub-mkfont.c: Likewise.
2013-11-29 12:19:36 +00:00
Andrey Borzenkov
69ca97c820 fix using grub device name as install device
Shell version of grub-install called grub-setup which resolved
install device name and called main setup routine. C version of
grub-install calls main setup routine directly, which leads
to the error:

grub2-install: info: grub-bios-setup  --verbose  --force  --skip-fs-probe --directory='/boot/grub2/i386-pc' --device-map='/boot/grub2/device.map' '(hd2)'.
grub2-install: info: reading /boot/grub2/i386-pc/boot.img.
grub2-install: info: reading /boot/grub2/i386-pc/core.img.
grub2-install: info: root is `(null)', dest is `(hd2)'.
grub2-install: info: Opening dest.
grub2-install: info: drive = -1.
grub2-install: error: disk `(hd2)' not found.

Move resolving of destination device name into main setup routine
so it is done consistently in both cases.
2013-11-29 11:32:34 +04:00
Vladimir Serbinenko
eec893ae49 * grub-core/kern/emu/hostfs.c (is_dir): Remove variable length arrays. 2013-11-29 05:52:20 +01:00
Vladimir Serbinenko
621e167fd6 * util/grub-fstest.c: Remove variable length arrays. 2013-11-29 05:50:32 +01:00
Vladimir Serbinenko
d54f647a4a * grub-core/osdep/linux/ofpath.c: Check return value of read. 2013-11-29 05:46:19 +01:00
Vladimir Serbinenko
c8a0f1b229 * util/mkimage.c (grub_install_generate_image): Use grub_crypto_hash for
computing crc32 rather than handling with md fundtions directly.
2013-11-29 04:14:26 +01:00
Vladimir Serbinenko
726409a513 * util/mkimage.c (grub_install_generate_image): Use grub_crypto_hash for
checking fwstart.img rather than md fundtions directly.
2013-11-29 04:05:44 +01:00
Vladimir Serbinenko
422e6e886c * util/grub-mkrescue.c (main): Check that fread succeeded. 2013-11-29 03:54:21 +01:00
Vladimir Serbinenko
af1faca3f8 * conf/Makefile.common: Remove -mexplicit-relocs and -DUSE_ASCII_FALLBACK on yeeloong.
-DUSE_ASCII_FALLBACK is already added by font snippets.
	-mexplicit-relocs isn't needed is compiler/assemblera are
	configured properly.
	If they're not we shouldn't attempt to fix it by ourselves.
	Binary compare between before and after shows no difference.
2013-11-29 03:45:50 +01:00
Vladimir Serbinenko
469021b4b3 Remove libgnulib.a and use its sources in dependencies directly.
This was the only instance of "library" in core config. A bug was
	reported that -fno-stack-protector wasn't passed to it. Instead of
	figuring out why it failed just remove this construction used
	needlessly.
2013-11-29 03:36:50 +01:00
Vladimir Serbinenko
83c256ba42 * grub-core/osdep/unix/password.c (grub_password_get): Check that
fgets succeeded.
2013-11-29 03:32:57 +01:00
Francesco Lavra
b67422d33d Fix command description in case of a device name passed as argument. 2013-11-28 17:25:52 +04:00
Colin Watson
827d87e9d6 Fix documentation of timeout expiry. 2013-11-28 11:01:53 +00:00
Colin Watson
8f236c1419 Revamp hidden timeout handling
Add a new timeout_style environment variable and a corresponding
GRUB_TIMEOUT_STYLE configuration key for grub-mkconfig.  This
controls hidden-timeout handling more simply than the previous
arrangements, and pressing any hotkeys associated with menu entries
during the hidden timeout will now boot the corresponding menu entry
immediately.

GRUB_HIDDEN_TIMEOUT=<non-empty> + GRUB_TIMEOUT=<non-zero> now
generates a warning, and if it shows the menu it will do so as if
the second timeout were not present.  Other combinations are
translated into reasonable equivalents.
2013-11-28 02:29:15 +00:00
Vladimir Serbinenko
2d76b4d81e Eliminate variable length arrays in grub_vsnprintf_real.
A bit tricky because this function has to continue to work without
	heap for short strings. Fixing prealloc to 32 arguments is reasonable
	but make all stack references use 32-bit offset rather than 8-bit one.
	So split va_args preparsing to separate function and put the prealloc
	into the caller.
2013-11-27 15:16:09 +01:00
Vladimir Serbinenko
4f9541226c Introduce grub_util_file_sync and use it instead of fsync(fileno(f)).
Fixes build for windows.
2013-11-27 14:13:50 +01:00
Vladimir Serbinenko
b1f742c103 * gentpl.py: Don't generate platform-dependent conditionals for
platform-independent targets.
2013-11-27 14:10:04 +01:00
Colin Watson
16ef26fd3a * grub-core/osdep/unix/exec.c (grub_util_exec_redirect): Remove
references to mdadm from otherwise generic code.
(grub_util_exec_pipe): Likewise.
(grub_util_exec_pipe_stderr): Likewise.
* grub-core/osdep/unix/getroot.c (grub_util_pull_lvm_by_command):
This function calls vgs, not mdadm; adjust variable names
accordingly.
2013-11-27 11:22:31 +00:00
Colin Watson
cf8c80ff77 Merge branch 'new-autogen' 2013-11-27 10:57:27 +00:00
Colin Watson
5c7206e45e Speed up test suite by avoiding fsync
Add grub_util_disable_fd_syncs call to turn grub_util_fd_sync calls into
no-ops, and use it in programs that copy files but do not need to take
special care to sync writes (grub-mknetdir, grub-rescue,
grub-mkstandalone).

On my laptop, this reduces partmap_test's runtime from 1236 seconds to
204 seconds.
2013-11-27 10:10:22 +00:00
Colin Watson
fc3f2b72cd * tests/util/grub-fs-tester.in: Execute xorriso from $PATH rather
than hardcoding /usr/local/bin/xorriso.
2013-11-26 23:51:48 +00:00
Colin Watson
34b2003def Handle #if/#endif and C-style comments in AutoGen definitions files. 2013-11-26 17:48:20 +00:00
Colin Watson
7e90f5ad25 Show file name in error messages from AutogenParser. 2013-11-26 17:42:56 +00:00
Colin Watson
ab4f15013a Generate Makefile.*.am directly from gentpl.py, eliminating the use of Autogen. The Autogen definitions files remain intact as they offer a useful abstraction. 2013-11-26 17:13:01 +00:00
Vladimir Serbinenko
1e4b358720 Add PCI command activation to all PCI drivers as required for coreboot
and maybe some other firmwares.
2013-11-26 14:21:11 +01:00
Vladimir Serbinenko
9208367d3f * grub-core/Makefile.am: Reduce gratuituous differences between Apple
and non-Apple variants of efiemu compile.
2013-11-26 11:38:12 +01:00
Andrey Borzenkov
67b9b7afd7 Add ChangeLog entry for previous commit 2013-11-25 23:14:04 +04:00