]> git.proxmox.com Git - grub2.git/log
grub2.git
9 years agoAdd a new "none" platform that only builds utilities
Colin Watson [Tue, 23 Sep 2014 11:06:30 +0000 (12:06 +0100)]
Add a new "none" platform that only builds utilities

This makes it possible to build generally-useful utilities such as
grub-mount even if the rest of GRUB has not been ported to the target
CPU.

* configure.ac: Add "none" platform.  Default to it for unsupported
CPUs rather than stopping with a fatal error.  Don't downgrade
x86_64-none to i386.  Define COND_real_platform Automake conditional
if the platform is anything other than "none".  Don't do any include
directory linking for "none".
* Makefile.am: Skip building grub-core and all bootcheck targets if
!COND_real_platform.
* include/grub/time.h: Don't include <grub/cpu/time.h> if GRUB_UTIL
is defined.

9 years agocleanup: grub_cpu_to_XXX_compile_time for constants
Andrey Borzenkov [Mon, 22 Sep 2014 16:47:10 +0000 (20:47 +0400)]
cleanup: grub_cpu_to_XXX_compile_time for constants

This tries to catch all cases where grub_cpu_to_XXX was used for constant
expressions (including sizeof).

9 years agoRevert " Use -Wl,--no-relax rather than -mno-relax for uniformity."
Vladimir Serbinenko [Sun, 21 Sep 2014 17:02:11 +0000 (19:02 +0200)]
Revert " Use -Wl,--no-relax rather than -mno-relax for uniformity."

This reverts commit 063f2a04d158ec1b275a925dfbae74b124708cde.

9 years agoACPIhalt: Add more ACPI opcodes.
Valentin Dornauer [Sun, 21 Sep 2014 16:58:14 +0000 (18:58 +0200)]
ACPIhalt: Add more ACPI opcodes.

The AML parser implements only a small subset of possible AML
opcodes. On the Fujitsu Lifebook E744 this and another bug in
the parser (incorrect handling of TermArg data types) would lead
to the laptop not turning off (_S5 not found).

* grub-core/commands/acpihalt.c: Support OpAlias in the AML parser;
in skip_ext_op(), handle some Type2Opcodes more correctly (TermArgs
aren't always simply strings!); Add function to skip TermArgs
* include/grub/acpi.h: Add new opcodes

9 years ago * grub-core/normal/main.c: Don't drop to rescue console in
Vladimir Serbinenko [Sun, 21 Sep 2014 16:51:09 +0000 (18:51 +0200)]
* grub-core/normal/main.c: Don't drop to rescue console in
case of password-protected prompt and no menu entries.

9 years ago * grub-core/commands/keylayouts.c: Ignore unknown keys.
Vladimir Serbinenko [Sun, 21 Sep 2014 16:49:49 +0000 (18:49 +0200)]
* grub-core/commands/keylayouts.c: Ignore unknown keys.

9 years ago * grub-core/gmodule.pl.in: Accept newer binutils which output
Vladimir Serbinenko [Sun, 21 Sep 2014 16:23:23 +0000 (18:23 +0200)]
* grub-core/gmodule.pl.in: Accept newer binutils which output
empty column rather than 0x0.

9 years agoFix wrong commit
Vladimir Serbinenko [Sun, 21 Sep 2014 16:18:03 +0000 (18:18 +0200)]
Fix wrong commit

9 years ago * grub-core/osdep/unix/config.c: Remove extraneous comma.
Michael Chang [Sun, 21 Sep 2014 15:49:13 +0000 (17:49 +0200)]
* grub-core/osdep/unix/config.c: Remove extraneous comma.

9 years agoInitialized initrd_ctx so we don't free a random pointer from the stack.
Peter Jones [Wed, 17 Sep 2014 20:30:11 +0000 (16:30 -0400)]
Initialized initrd_ctx so we don't free a random pointer from the stack.

Currently, if "linux" fails, the "goto fail;" in grub_cmd_initrd sends us
into grub_initrd_close() without grub_initrd_init() being called, and thus
it never clears initrd_ctx->components.  grub_initrd_close() then frees that
address, which is stale data from the stack.  If the stack happens to have a
stale *address* there that matches a recent allocation, then you'll get a
double free later.

So initialize the memory up front.

Signed-off-by: Peter Jones <pjones@redhat.com>
9 years agoTidy up ChangeLog formatting.
Colin Watson [Fri, 19 Sep 2014 13:50:51 +0000 (14:50 +0100)]
Tidy up ChangeLog formatting.

9 years agoFix build with glibc 2.20
Khem Raj [Wed, 3 Sep 2014 08:15:08 +0000 (01:15 -0700)]
Fix build with glibc 2.20

* grub-core/kern/emu/hostfs.c: squahes below warning
  warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Submitted

9 years agoFix incorrect address reference in btrfs
Michael Chang [Thu, 14 Aug 2014 10:17:45 +0000 (18:17 +0800)]
Fix incorrect address reference in btrfs

We encountered a weird random kernel initrd unpacking error on btrfs
and finally found it was caused by incorrect address reference in range
check for type GRUB_BTRFS_EXTENT_REGULAR and the entire result is
unpredictable.

This is a quick fix to make the address reference to the
grub_btrfs_extent_data structure correctly, not the pointer variable
to it.

Any suggestions to this patch is welcome.

9 years agoSupport grub-emu on x32 (ILP32 but with x86-64 instruction set)
Colin Watson [Sun, 7 Sep 2014 22:04:35 +0000 (23:04 +0100)]
Support grub-emu on x32 (ILP32 but with x86-64 instruction set)

* configure.ac: Remove -m64 from checks for -mcmodel=large and
-mno-red-zone.  These are always either unnecessary (x86_64-emu) or
already in TARGET_CFLAGS at this point, and they produce incorrect
results when building for x32.
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
* include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.

9 years ago* configure.ac: Remove several unnecessary semicolons.
Colin Watson [Sun, 7 Sep 2014 19:47:43 +0000 (20:47 +0100)]
* configure.ac: Remove several unnecessary semicolons.

9 years ago* grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):
Colin Watson [Mon, 25 Aug 2014 22:19:48 +0000 (15:19 -0700)]
* grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):
Initialise pend to pacify GCC.

9 years agoFix typo (gettext_print instead of gettext_printf)
Andrey Borzenkov [Thu, 14 Aug 2014 17:02:31 +0000 (21:02 +0400)]
Fix typo (gettext_print instead of gettext_printf)

9 years ago * grub-core/term/at_keyboard.c: Retry probing keyboard if
Vladimir Serbinenko [Wed, 13 Aug 2014 21:04:01 +0000 (23:04 +0200)]
* grub-core/term/at_keyboard.c: Retry probing keyboard if
scancode setup failed.

9 years ago * grub-core/kern/disk_common.c: Clump disk size to 1EiB.
Vladimir Serbinenko [Sun, 10 Aug 2014 09:27:36 +0000 (11:27 +0200)]
* grub-core/kern/disk_common.c: Clump disk size to 1EiB.

9 years ago * grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Add
Vladimir Serbinenko [Sun, 10 Aug 2014 09:27:13 +0000 (11:27 +0200)]
* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Add
safety to avoid triggerring VirtualBox bug.

9 years agoFix Changelog
Vladimir Serbinenko [Sun, 10 Aug 2014 08:04:04 +0000 (10:04 +0200)]
Fix Changelog

9 years ago * grub-core/fs/cbfs.c: Don't probe disks of unknow size.
Vladimir Serbinenko [Sun, 10 Aug 2014 07:50:36 +0000 (09:50 +0200)]
* grub-core/fs/cbfs.c: Don't probe disks of unknow size.

Fixes hang on virtualbox.

9 years agoFix an infinite loop in grub-mkconfig
Colin Watson [Tue, 8 Jul 2014 22:54:30 +0000 (23:54 +0100)]
Fix an infinite loop in grub-mkconfig

* util/grub.d/10_hurd.in: Make kernel list progression not fail on
kernels whose paths contain regex metacharacters.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

Reported by: Heimo Stranner.

9 years ago* docs/grub-dev.texi (Finding your way around): The build system no
Colin Watson [Thu, 26 Jun 2014 13:20:17 +0000 (14:20 +0100)]
* docs/grub-dev.texi (Finding your way around): The build system no
longer uses AutoGen directly.

9 years ago * grub-core/commands/loadenv.c (check_blocklists): Fix overlap check.
Роман Пехов [Sat, 21 Jun 2014 23:51:50 +0000 (03:51 +0400)]
* grub-core/commands/loadenv.c (check_blocklists): Fix overlap check.

9 years ago * util/grub-install.c: Fix handling of --disk-module.
Glenn Washburn [Sat, 21 Jun 2014 23:45:11 +0000 (01:45 +0200)]
* util/grub-install.c: Fix handling of --disk-module.

9 years ago * grub-core/loader/i386/bsd.c (grub_netbsd_boot): Pass pointer to
Stephane Rochoy [Sat, 21 Jun 2014 23:35:52 +0000 (01:35 +0200)]
* grub-core/loader/i386/bsd.c (grub_netbsd_boot): Pass pointer to
EFI system table.

9 years ago * grub-core/commands/efi/lsefisystab.c (grub_cmd_lsefisystab): Show
Stephane Rochoy [Sat, 21 Jun 2014 23:34:57 +0000 (01:34 +0200)]
* grub-core/commands/efi/lsefisystab.c (grub_cmd_lsefisystab): Show
EFI system table physical address.

9 years ago * util/grub-gen-asciih.c (add_glyph): Fix uninitialised variable.
Trevor Woerner [Sat, 21 Jun 2014 18:26:47 +0000 (20:26 +0200)]
* util/grub-gen-asciih.c (add_glyph): Fix uninitialised variable.

9 years ago * grub-core/commands/verify.c (grub_pubkey_open): Trust procfs.
Vladimir Serbinenko [Thu, 15 May 2014 12:36:48 +0000 (14:36 +0200)]
* grub-core/commands/verify.c (grub_pubkey_open): Trust procfs.

9 years ago * grub-core/commands/verify.c (grub_pubkey_open): Fix memdisk
Vladimir Serbinenko [Mon, 12 May 2014 08:01:48 +0000 (10:01 +0200)]
* grub-core/commands/verify.c (grub_pubkey_open): Fix memdisk
check.

10 years ago * grub-core/kern/misc.c (__bzero): Don't compile in GRUB_UTIL.
Vladimir Serbinenko [Sun, 20 Apr 2014 14:12:41 +0000 (16:12 +0200)]
* grub-core/kern/misc.c (__bzero): Don't compile in GRUB_UTIL.

Reported by: Yves Blusseau <blusseau@zetam.org>.

10 years agoAllow loading old kernels by placing GDT in conventional memory.
Piotr Krysiuk [Sun, 20 Apr 2014 13:58:45 +0000 (15:58 +0200)]
Allow loading old kernels by placing GDT in conventional memory.

10 years agoTolerate devices with no filesystem UUID returned by os-prober
Colin Watson [Thu, 10 Apr 2014 15:54:33 +0000 (16:54 +0100)]
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
55e706c918922def17f5012c23cfe88c4c645208, and they can arise in
practice when the system has active LVM snapshots.
Fixes Ubuntu bug #1287436.

10 years agoImprove LVM "logical_volumes" string matching
Colin Watson [Thu, 10 Apr 2014 13:42:41 +0000 (14:42 +0100)]
Improve LVM "logical_volumes" string matching

* grub-core/disk/lvm.c (grub_lvm_detect): Search for
"logical_volumes" block a little more accurately.

10 years ago * grub-core/lib/syslinux_parse.c: Fix timeout quoting.
Vladimir Serbinenko [Sat, 5 Apr 2014 22:44:44 +0000 (00:44 +0200)]
* grub-core/lib/syslinux_parse.c: Fix timeout quoting.

10 years agoAdd missing #endif
Vladimir Serbinenko [Fri, 4 Apr 2014 06:11:15 +0000 (08:11 +0200)]
Add missing #endif

10 years ago* include/grub/libgcc.h: Remove ctzsi2 and ctzdi2. They're no longer pulled from...
Vladimir Serbinenko [Fri, 4 Apr 2014 06:02:38 +0000 (08:02 +0200)]
* include/grub/libgcc.h: Remove ctzsi2 and ctzdi2. They're no longer pulled from libgcc.

10 years agoReplace few instances of memcmp/memcpy in the code that should be grub_memcmp/grub_me...
Vladimir Serbinenko [Fri, 4 Apr 2014 05:58:42 +0000 (07:58 +0200)]
Replace few instances of memcmp/memcpy in the code that should be grub_memcmp/grub_memcpy.

10 years ago* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Support NVMe device names.
Vladimir Serbinenko [Thu, 3 Apr 2014 19:31:12 +0000 (21:31 +0200)]
* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Support NVMe device names.

10 years agobtrfs: fix get_root key comparison failures due to endianness
Thomas Falcon [Mon, 31 Mar 2014 14:32:30 +0000 (15:32 +0100)]
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.

10 years agoFix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
Colin Watson [Mon, 31 Mar 2014 13:48:33 +0000 (14:48 +0100)]
Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.

Commit 588744d0dc655177d5883bdcb8f72ff5160109ed 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.

10 years agoFix grub-probe -0 option
Colin Watson [Mon, 31 Mar 2014 12:51:17 +0000 (13:51 +0100)]
Fix grub-probe -0 option

* util/grub-probe,c (options): Make -0 work again (broken by
conversion to argp).
(main): Simplify logic.

10 years ago * grub-core/lib/relocator.c: Fix the case when end of leftover is used.
Vladimir Serbinenko [Wed, 26 Mar 2014 07:48:30 +0000 (08:48 +0100)]
* grub-core/lib/relocator.c: Fix the case when end of leftover is used.

10 years ago * grub-core/loader/arm64/linux.c: Remove redundant "0x".
Fu Wei [Wed, 26 Mar 2014 07:13:07 +0000 (08:13 +0100)]
* grub-core/loader/arm64/linux.c: Remove redundant "0x".

10 years agoieee1275: check for IBM pseries emulated machine
Nikunj A Dadhania [Thu, 20 Mar 2014 11:27:12 +0000 (16:57 +0530)]
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>
10 years ago * include/grub/i386/openbsd_bootarg.h: Add addr and frequency fields.
Vladimir Serbinenko [Fri, 28 Feb 2014 09:50:05 +0000 (10:50 +0100)]
* 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.

10 years ago * grub-core/kern/i386/pc/mmap.c: Fallback to EISA memory map
Vladimir Serbinenko [Fri, 28 Feb 2014 09:07:11 +0000 (10:07 +0100)]
* grub-core/kern/i386/pc/mmap.c: Fallback to EISA memory map
if E820 failed to return any regions.

10 years ago * grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]: Ignore low
Vladimir Serbinenko [Fri, 28 Feb 2014 08:50:47 +0000 (09:50 +0100)]
* grub-core/mmap/i386/uppermem.c (lower_hook) [COREBOOT]: Ignore low
tables for low memory calculations.

10 years ago * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi): Limit
Vladimir Serbinenko [Fri, 28 Feb 2014 08:48:57 +0000 (09:48 +0100)]
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi): Limit
location to 640K.

10 years ago * grub-core/kern/i386/coreboot/mmap.c: Filter out 0xa0000-0x100000
Vladimir Serbinenko [Fri, 28 Feb 2014 08:47:57 +0000 (09:47 +0100)]
* grub-core/kern/i386/coreboot/mmap.c: Filter out 0xa0000-0x100000
region.

10 years ago * grub-core/disk/ahci.c: Ignore NPORTS field and rely on PI
Vladimir Serbinenko [Thu, 20 Feb 2014 09:11:43 +0000 (10:11 +0100)]
* grub-core/disk/ahci.c: Ignore NPORTS field and rely on PI
exclusively.

10 years agoadd bootpath parser for open firmware
Paulo Flabiano Smorigo [Tue, 4 Feb 2014 21:00:55 +0000 (19:00 -0200)]
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.

10 years agoadd grub_env_set_net_property function
Paulo Flabiano Smorigo [Tue, 4 Feb 2014 20:41:38 +0000 (18:41 -0200)]
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.

10 years ago * util/grub-mkrescue.c: Build fix for argp.h with older gcc.
Vladimir Serbinenko [Mon, 3 Feb 2014 13:35:51 +0000 (14:35 +0100)]
* util/grub-mkrescue.c: Build fix for argp.h with older gcc.

10 years ago * util/grub-mkfont.c: Build fix for argp.h with older gcc.
Vladimir Serbinenko [Mon, 3 Feb 2014 13:34:27 +0000 (14:34 +0100)]
* util/grub-mkfont.c: Build fix for argp.h with older gcc.

10 years ago * grub-core/disk/ahci.c: Increase timeout. Some SSDs take up to
Vladimir Serbinenko [Wed, 29 Jan 2014 22:50:49 +0000 (23:50 +0100)]
* grub-core/disk/ahci.c: Increase timeout. Some SSDs take up to
7 seconds to recover if last poweroff was bad.

10 years ago * grub-core/disk/ahci.c: Properly handle transactions with no
Vladimir Serbinenko [Wed, 29 Jan 2014 22:49:51 +0000 (23:49 +0100)]
* grub-core/disk/ahci.c: Properly handle transactions with no
transferred data.

10 years ago * grub-core/disk/ahci.c: Add safety cleanups.
Vladimir Serbinenko [Wed, 29 Jan 2014 22:46:17 +0000 (23:46 +0100)]
* grub-core/disk/ahci.c: Add safety cleanups.

10 years ago * grub-core/disk/ahci.c: Allocate and clean space for all possible 32
Vladimir Serbinenko [Wed, 29 Jan 2014 22:45:18 +0000 (23:45 +0100)]
* grub-core/disk/ahci.c: Allocate and clean space for all possible 32
slots to avoid pointing to uninited area.

10 years ago * grub-core/disk/ahci.c: Do not enable I/O decoding and keep
Vladimir Serbinenko [Wed, 29 Jan 2014 22:43:25 +0000 (23:43 +0100)]
* grub-core/disk/ahci.c: Do not enable I/O decoding and keep
enabling busmaster for the end.

10 years ago * util/grub-mkfont.c: Downgrade warnings about unhandled features
Vladimir Serbinenko [Wed, 29 Jan 2014 22:41:48 +0000 (23:41 +0100)]
* util/grub-mkfont.c: Downgrade warnings about unhandled features
to debug.

10 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/grub
Vladimir Serbinenko [Wed, 29 Jan 2014 22:40:11 +0000 (23:40 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/grub

Conflicts:
ChangeLog

10 years ago.gitignore: add missing files and .exe variants.
Paulo Flabiano Smorigo [Wed, 29 Jan 2014 15:26:00 +0000 (13:26 -0200)]
.gitignore: add missing files and .exe variants.

10 years ago * grub-core/term/at_keyboard.c: Tolerate missing keyboard.
Vladimir Serbinenko [Sun, 26 Jan 2014 02:31:10 +0000 (03:31 +0100)]
* grub-core/term/at_keyboard.c: Tolerate missing keyboard.

10 years ago grub-install: support for partitioned partx loop devices.
Mike Gilbert [Sun, 26 Jan 2014 01:56:04 +0000 (02:56 +0100)]
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.

10 years ago * grub-core/term/serial.c (grub_serial_register): Fix invalid free.
Vladimir Serbinenko [Sun, 26 Jan 2014 01:36:05 +0000 (02:36 +0100)]
* 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.

10 years agofix Mingw W64-32 cross compile failure due to printf redefinition in libintl.h
Andrey Borzenkov [Sat, 25 Jan 2014 17:49:41 +0000 (21:49 +0400)]
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

10 years agodo not set default prefix in grub-mkimage
Andrey Borzenkov [Sat, 25 Jan 2014 15:54:51 +0000 (19:54 +0400)]
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.

10 years ago Fix several translatable strings.
Vladimir Serbinenko [Fri, 24 Jan 2014 17:20:27 +0000 (18:20 +0100)]
Fix several translatable strings.

Suggested by: D. Prévot.

10 years ago * util/grub-install.c: List available targets.
Vladimir Serbinenko [Fri, 24 Jan 2014 17:09:25 +0000 (18:09 +0100)]
* util/grub-install.c: List available targets.

10 years ago* util/grub-install.c (write_to_disk): Add an info message.
Colin Watson [Thu, 23 Jan 2014 12:05:36 +0000 (12:05 +0000)]
* util/grub-install.c (write_to_disk): Add an info message.

10 years agoadd GRUB_WINDOWS_EXTRA_DIST to allow shipping runtime files
Andrey Borzenkov [Tue, 21 Jan 2014 16:54:09 +0000 (20:54 +0400)]
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.

10 years agoShow detected path to DejaVuSans in configure summary
Andrey Borzenkov [Tue, 21 Jan 2014 15:41:11 +0000 (19:41 +0400)]
Show detected path to DejaVuSans in configure summary

10 years agolook for DejaVu also in /usr/share/fonts/truetype
Andrey Borzenkov [Tue, 21 Jan 2014 15:29:33 +0000 (19:29 +0400)]
look for DejaVu also in /usr/share/fonts/truetype

It is installed in this path on openSUSE.

10 years agoincrease network try interval gradually
Paulo Flabiano Smorigo [Tue, 21 Jan 2014 13:03:51 +0000 (11:03 -0200)]
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.

10 years agochange stop condition to avoid infinite loops
Paulo Flabiano Smorigo [Tue, 21 Jan 2014 12:49:39 +0000 (10:49 -0200)]
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.

10 years agoIgnore EPERM when modifying kern.geom.debugflags
Colin Watson [Fri, 17 Jan 2014 02:28:46 +0000 (02:28 +0000)]
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.

10 years agouse MODULE_FILES for genemuinit* instead of MOD_FILES
Andrey Borzenkov [Sat, 18 Jan 2014 19:15:40 +0000 (23:15 +0400)]
use MODULE_FILES for genemuinit* instead of MOD_FILES

MinGW native nm does not support ELF binaries.

10 years ago * util/grub-install.c: Fix a typo.
Vladimir Serbinenko [Sat, 18 Jan 2014 19:02:51 +0000 (20:02 +0100)]
* util/grub-install.c: Fix a typo.

10 years ago * grub-core/normal/main.c (read_config_file): Buffer config file.
Vladimir Serbinenko [Sat, 18 Jan 2014 18:54:09 +0000 (19:54 +0100)]
* grub-core/normal/main.c (read_config_file): Buffer config file.
Reduces boot time.

10 years agofix removal of {cpu,machine} links on mingw/msys
Andrey Borzenkov [Sat, 18 Jan 2014 18:48:04 +0000 (22:48 +0400)]
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".

10 years ago * Makefile.am (default_payload.elf): Add modules
Vladimir Serbinenko [Sat, 18 Jan 2014 18:43:19 +0000 (19:43 +0100)]
* Makefile.am (default_payload.elf): Add modules
multiboot cbmemc linux16 gzio echo help.

10 years ago * Makefile.util.def: Link grub-ofpathname with zfs libs.
Mike Gilbert [Sat, 18 Jan 2014 18:41:15 +0000 (19:41 +0100)]
* Makefile.util.def: Link grub-ofpathname with zfs libs.

10 years ago * grub-core/commands/macbless.c: Rename FILE and DIR to avoid
Vladimir Serbinenko [Sat, 18 Jan 2014 18:26:40 +0000 (19:26 +0100)]
* grub-core/commands/macbless.c: Rename FILE and DIR to avoid
conflicts.

Reported by: Andrey Borzenkov.

10 years agofix include loop on MinGW due to libintl.h pulling stdio.h
Andrey Borzenkov [Sat, 18 Jan 2014 17:22:57 +0000 (21:22 +0400)]
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.

10 years agoadd BUILD_EXEEXT support to fix make clean on Windows
Andrey Borzenkov [Sat, 18 Jan 2014 16:41:24 +0000 (20:41 +0400)]
add BUILD_EXEEXT support to fix make clean on Windows

Add $(BUILD_EXEEXT) to ensure files are removed. Also add CLEANFILES where
appropriate.

10 years agoUse _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS
Andrey Borzenkov [Sat, 18 Jan 2014 16:04:11 +0000 (20:04 +0400)]
Use _W64 to detect MinGW W64-32 instead of _FILE_OFFSET_BITS

In 94cee4a4c201bb506377b2c26e072eee8cb19d6f 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

10 years agoFix ChangeLog date
Andrey Borzenkov [Sat, 18 Jan 2014 16:01:16 +0000 (20:01 +0400)]
Fix ChangeLog date

10 years ago * grub-core/term/terminfo.c: Recognize keys F1-F12.
Vladimir Serbinenko [Sat, 18 Jan 2014 15:57:35 +0000 (16:57 +0100)]
* grub-core/term/terminfo.c: Recognize keys F1-F12.

10 years agoreintroduce BUILD_LDFLAGS for the cross-compile case
Andrey Borzenkov [Sat, 18 Jan 2014 15:50:54 +0000 (19:50 +0400)]
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.

10 years ago * util/grub-mount.c: Extend GCC warning workaround to grub-mount.
Vladimir Serbinenko [Sat, 18 Jan 2014 15:43:29 +0000 (16:43 +0100)]
* util/grub-mount.c: Extend GCC warning workaround to grub-mount.

10 years ago * grub-core/kern/efi/efi.c: Ensure that the result starts with /
Vladimir Serbinenko [Sat, 18 Jan 2014 15:41:47 +0000 (16:41 +0100)]
* grub-core/kern/efi/efi.c: Ensure that the result starts with /
and has no //.

10 years ago * NEWS: Add few missing entries.
Vladimir Serbinenko [Sat, 18 Jan 2014 15:31:10 +0000 (16:31 +0100)]
* NEWS: Add few missing entries.

10 years agoPrefer more portable test(1) constructs
Colin Watson [Fri, 17 Jan 2014 15:24:50 +0000 (15:24 +0000)]
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.

10 years agofreebsd/hostdisk.c is only ever compiled on FreeBSD
Colin Watson [Fri, 17 Jan 2014 02:30:52 +0000 (02:30 +0000)]
freebsd/hostdisk.c is only ever compiled on FreeBSD

* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Remove
redundant preprocessor conditional.

10 years agoadd part_apple to EFI rescue image to fix missing prefix
Andrey Borzenkov [Sun, 12 Jan 2014 11:29:21 +0000 (15:29 +0400)]
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.

10 years ago* Makefile.util.def (grub-macbless): Change mansection to 8.
Colin Watson [Wed, 8 Jan 2014 11:05:20 +0000 (11:05 +0000)]
* Makefile.util.def (grub-macbless): Change mansection to 8.

10 years agoarm64: set correct length of device path end entry
Leif Lindholm [Tue, 7 Jan 2014 17:52:50 +0000 (17:52 +0000)]
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).

10 years agoChange grub-mkrescue to use bootaa64.efi too
Andrey Borzenkov [Tue, 7 Jan 2014 16:34:25 +0000 (20:34 +0400)]
Change grub-mkrescue to use bootaa64.efi too

Also add ChangeLog entry for previous change.