Colin Watson
59b38922a1
Pacify compiler warning
...
* grub-core/osdep/linux/hostdisk.c
(grub_util_find_partition_start_os): Initialise start to avoid
spurious compiler warning.
2013-12-05 15:48:27 +00:00
Colin Watson
0480665b9d
On Linux, read partition start offsets from sysfs if possible
...
This lets us cope with block device drivers that don't implement
HDIO_GETGEO. Fixes Ubuntu bug #1237519 .
* grub-core/osdep/linux/hostdisk.c (sysfs_partition_path): New
function.
(sysfs_partition_start): Likewise.
(grub_util_find_partition_start_os): Try sysfs_partition_start
before HDIO_GETGEO.
2013-12-05 13:51:52 +00:00
Leif Lindholm
bbeee1c4a3
grub-core/lib/fdt.c: correctly update size_dt_struct in add_subnode()
2013-12-05 11:44:41 +00:00
Vladimir Serbinenko
e5ed2f6947
Handle unaligned .bss on sparc64.
...
Current code improperly assumes that both __bss_start and _end are
aligned to 8-bytes. Eliminating this assumption and explicitly align
modules.
2013-12-05 06:35:19 +01:00
Vladimir Serbinenko
4a73746a04
* grub-core/boot/sparc64/ieee1275/boot.S [CDBOOT]: Move scratchpad
...
so it doesn't land in the middle of loaded image.
2013-12-04 19:54:37 +01:00
Vladimir Serbinenko
8a3f0a24b5
* grub-core/kern/emu/main.c: Ignore missing prototype for main.
2013-12-04 10:28:23 +01:00
Vladimir Serbinenko
6f07c4e407
Pass font config to config.h and not by TARGET_CFLAGS as adding
...
arguments doesn't work if TARGET_CFLAGS is specified on command
line.
2013-12-04 10:25:53 +01:00
Vladimir Serbinenko
cd15c394cc
* grub-core/osdep/windows/emuconsole.c (grub_console_putchar):
...
Remove variable length arrays.
* grub-core/term/efi/console.c (grub_console_putchar): Likewise.
2013-12-04 10:05:33 +01:00
Vladimir Serbinenko
bb6e299ccb
* grub-core/kern/i386/qemu/init.c: Remove variable length arrays.
2013-12-04 09:48:36 +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
f315b508ae
Reduce nesting level.
2013-12-03 16:11:00 +00: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
Leif Lindholm
b29b77fee2
New port arm64-efi
2013-11-30 16:50:31 +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
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
d54f647a4a
* grub-core/osdep/linux/ofpath.c: Check return value of read.
2013-11-29 05:46:19 +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
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
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
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
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
c2b70d0981
Explicitly check for linking format to use for efiemu64 module
...
Similar to check for target linking format, also check for efiemu64
instead of hardcoding -melf_x86_64. This fixes compilation on *BSD
variants. We cannot easily reuse main target check because platforms
are different (main target is 32 bit and efiemu64 - 64 bit).
This commit adds EFIEMU64_LINK_FORMAT that contains detected
link option and is used in efiemu64.o linking instead of hardcoded
value.
Reported-By: Beeblebrox <zaphod@berentweb.com>
2013-11-25 22:32:55 +04:00
Vladimir Serbinenko
d2f7902af0
Make arm64 compileable with clang
2013-11-25 13:06:56 +01:00
Vladimir Serbinenko
1005bed722
Use b.ge form for instructions
2013-11-25 13:04:44 +01:00
Vladimir Serbinenko
d6c92cdc34
Merge branch 'master' into leiflindholm/arm64
...
Conflicts:
include/grub/util/install.h
2013-11-25 13:02:27 +01:00
Vladimir Serbinenko
61e1b9a49d
* grub-core/osdep/unix/platform.c (get_ofpathname): Trim ending newline.
...
Don't rely on PATH_MAX.
2013-11-25 07:34:49 +01:00
Vladimir Serbinenko
c98dd165b0
* grub-core/genmoddep.awk: Use more portable && rather than and.
2013-11-25 07:32:51 +01:00
Vladimir Serbinenko
5c066a81c2
Apple assembly doesn't handle symbol arithmetic well. So define an
...
offset symbol in boot.S and use it.
2013-11-24 07:12:12 +01:00
Vladimir Serbinenko
78f961efe9
Apple assembly doesn't handle symbol arithmetic well. So instead
...
of getting addres of kernel_sector + 4 define kernel_sector_high.
It also makes code more readable.
2013-11-24 07:11:00 +01:00
Vladimir Serbinenko
09bc0a577d
With Apple assembly in .macro environvemnt you have to use $$ instead
...
of $. So introduce new preprocessor macro MACRO_DOLLAR(x) which expands
to $$x on Apple and to $x on everything else.
2013-11-24 07:08:18 +01:00
Vladimir Serbinenko
b700a427d2
* grub-core/Makefile.am: Use correct TARGET_OBJCONV rather than
...
OBJCONV.
2013-11-24 05:27:20 +01:00
Vladimir Serbinenko
4480b95dcd
* grub-core/gdb/i386/machdep.S: Use xorl %eax, %eax on both Apple
...
and non-Apple. This instruction is shorter and faster,
so no reason not to use it on both.
2013-11-24 05:17:24 +01:00
Vladimir Serbinenko
e77c81f6f8
* grub-core/lib/reed_solomon.c: Use section _text, _text rather than
...
.text when compiling for Apple.
2013-11-24 05:14:11 +01:00
Vladimir Serbinenko
971dbee521
* grub-core/term/arc/console.c: Add missing cast to silence warning.
2013-11-24 05:05:34 +01:00
Vladimir Serbinenko
6f2e82be3a
* grub-core/boot/i386/pc/boot.S: Fix floppy probe. Due to missing
...
%dx restore the probe worked on non-existant drive. Reorganize the
code a little bit to free 2 bytes necessary for push/pop.
2013-11-24 05:05:33 +01:00
Vladimir Serbinenko
9eec9699b9
* grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):
...
Add missing cast to silence warning.
2013-11-23 15:35:01 +01:00
Vladimir Serbinenko
1bba40f578
Move common BIOS/coreboot memory map declarations to
...
include/grub/i386/memory_raw.h and eliminate duplicate declarations.
2013-11-23 12:39:21 +01:00
Vladimir Serbinenko
a92b5cb8d8
* grub-core/lib/libgcrypt/mpi/longlong.h: Use C version with mips
...
clang.
2013-11-23 00:36:13 +01:00
Vladimir Serbinenko
e1c22419ac
* grub-core/kern/xen/init.c: Do not map more pages than we can address.
2013-11-22 13:04:29 +01:00
Vladimir Serbinenko
189090cee9
* grub-core/kern/efi/mm.c: Limit allocations to 2GiB when not compiling
...
with -mcmodel=large.
2013-11-22 13:03:19 +01:00
Vladimir Serbinenko
1a5b7b404f
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Add
...
range-checking for 32-bit quantities.
2013-11-22 13:01:14 +01:00