* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
Increase from 0x50 to 0x60.
* util/i386/pc/grub-install.in: Detect cross-disk installs, and
use UUIDs to identify the root drive for them. If that's not
possible, abort.
* util/i386/pc/grub-setup.c (setup): Do not special-case, or even
check, for cross-disk installs.
* kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
is non-empty, use it to set the `prefix' environment variable instead
of the usual approach.
* kern/i386/linuxbios/init.c (make_install_device): Remove function.
(grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
environment variable instead of dummy make_install_device().
* kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
(start): Insert a data section, with `grub_prefix' variable.
* kern/i386/linuxbios/startup.S: Likewise.
* include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
New variable reference.
* include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
New macro. Defines offset of `grub_prefix' within startup.S (relative
to `start').
(GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
section within startup.S (relative to `start').
* include/grub/i386/coreboot/kernel.h: Likewise.
* util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
Overwrite grub_prefix with its contents, at the beginning of the
first segment.
(main): Understand -p|--prefix.
* term/i386/pc/vga_text.c (grub_console_cls): Use
grub_console_gotoxy() to go back to beginning of the screen.
Found by Patrick Georgi <patrick.georgi@coresystems.de>
* util/update-grub.in: Add a check for admin
group on Cygwin.
Remove old `grub.cfg.new' before creation.
Add `-f' to `mv' to handle the different filesystem
semantics of Windows.
* partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
(struct grub_apple_header): New struct. Describes the layout of
the partmap header.
(apple_partition_map_iterate): Check the header magic as well as the
partition magic (which was already being checked).
This prevents autoheader from being rerun by make if somebody changes
configure.ac or aclocal.m4 and runs autogen.sh.
Suggested by Christian Franke <Christian.Franke@t-online.de>
* disk/raid.c (grub_raid_scan_device): Do not abort when two disks
with the same number are found, just use issue a warning with
grub_dprintf(), as this error has been reported to be non-fatal.
* fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
smallino, as it's more descriptive, and i8count can be confused with
the other field count.
(grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
inode type.
* util/getroot.c (find_root_device): Skip devices that match
/dev/dm-[0-9]. This lets the real device be found for any type of
abstraction (LVM, EVMS, RAID..).
(grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
device is found first, find_root_device() will now skip it.
* util/i386/pc/grub-install.in: If `--debug' is specified,
pass `--verbose' to grub-setup.
Abort script if make_system_path_relative_to_its_root() fails.
* common.rmk (bin_UTILITIES): Add grub-pe2elf.
(grub_pe2elf_SOURCES): New macro.
(CLEANFILES): Add grub-pe2elf.
* include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
(GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
(GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
(GRUB_PE32_SCN_ALIGN_MASK): Likewise.
(GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
(GRUB_PE32_SYM_CLASS_STATIC): Likewise.
(GRUB_PE32_SYM_CLASS_FILE): Likewise.
(GRUB_PE32_DT_FUNCTION): Likewise.
(GRUB_PE32_REL_I386_DIR32): Likewise.
(GRUB_PE32_REL_I386_REL32): Likewise.
(grub_pe32_symbol): New structure.
(grub_pe32_reloc): Likewise.
* util/grub-pe2elf.c: New file.
* configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
start symbol in non pc platform.
* genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
The following patches are from Christian Franke.
* include/grub/dl.h: Remove .previous, gas supports this only
for ELF format.
* include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
Remove .type, gas supports this only for ELF format.
* kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
nullbytes in symbol table. This fixes an infinite loop if table is
zero filled.
* Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
TARGET_IMG_LDFLAGS and EXEEXT.
* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
TARGET_IMG_LDFLAGS_AC.
(grub_CHECK_STACK_ARG_PROBE): New function.
* conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
* conf/i386-pc-cygwin-ld-img.sc: New linker script.
* configure.ac: Add check for linker script "conf/${target}-img-ld.c"
to set TARGET_IMG_LD* accordingly.
Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
Add call to grub_CHECK_STACK_ARG_PROBE.
Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
* genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
* genmk.rb: Add EXEEXT to CLEANFILES.
* Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
define the codes for arrows and lines used for the menu).
(ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
as well.
* util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
fonts, because the latter are too slow.
* kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
load foreign architecture modules correctly anyway. Keep
support for loading host architecture modules, whether we
compile them or not.
* aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
target compiler is functional.
* configure.ac: Call grub_PROG_TARGET_CC once all target flags
are set up.
* configure.ac: Default to efi platform for x86_64-apple. Allow
powerpc64 CPU, default to ieee1275 platform for it. Split CPU
adjustments from the rest, only do them if target is not
explicitly given. Merge other adjustments with the final sanity
check. Remove an extraneous check for supported CPU. Be
specific which CPU and which platform is not supported.
* util/i386/efi/grub-mkimage.c (get_target_address): Return a
pointer, not an integer. This fixes a warning and prevents
precision loss on 64-bit systems.
(relocate_addresses): Remove unneeded cast.