Revert grub/machine/init.h addition by Pavel (since it breaks on
i386-ieee1275 and others):
* util/i386/pc/misc.c: Remove grub/machine/init.h.
* util/powerpc/ieee1275/misc.c: Likewise.
* util/biosdisk.c: Include grub/util/biosdisk.h.
* util/grub-fstest.c (execute_command): Make static.
* util/grub-mkdevicemap.c (check_device): Likewise.
* util/i386/pc/misc.c: Include grub/machine/init.h.
* util/powerpc/ieee1275/misc.c: Likewise.
* util/lvm.c: Include grub/util/lvm.h.
* util/misc.c: Include grub/kernel.h, grub/misc.h and
grub/cache.h.
* util/raid.c: Include grub/util/raid.h.
(grub_util_getdiskname): Make static.
* configure.ac: Probe for `help2man'.
* Makefile.in (builddir): New variable.
(HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
or otherwise add a few flags/options to it.
(install-local): For every executable utility or script that is
installed, invoke $(HELP2MAN) to install a manpage based on --help
output.
* util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
that it doesn't prevent --help from working in build tree.
* util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
with `bug-grub@gnu.org'.
* util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
* util/update-grub.in (usage): New function.
Implement proper argument check, with support for --help and --version
(as well as existing -y).
* util/powerpc/ieee1275/grub-mkrescue.in: New file.
* conf/powerpc-ieee1275.rmk: Add grub-mkrescue support for
PowerPC.
* DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
* include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
(grub_util_get_dev_abstraction): New function prototype.
* util/getroot.c: Include `<grub/util/getroot.h>'
(grub_util_get_grub_dev): Move detection of abstraction type to ...
(grub_util_get_dev_abstraction): ... here (new function).
* util/grub-probe.c: Convert PRINT_* to an enum. Add
`PRINT_ABSTRACTION'.
(probe): Probe for abstraction type when requested.
(main): Understand `--target=abstraction'.
* util/i386/efi/grub-install.in: Add abstraction module to core
image when it is found to be necessary.
* util/i386/pc/grub-install.in: Likewise.
* util/powerpc/ieee1275/grub-install.in: Likewise.
* util/update-grub_lib.in (font_path): Return system path without
converting to GRUB path.
* util/update-grub.in: Convert system path returned by font_path()
to a GRUB path. Use `grub-probe -t abstraction' to determine what
abstraction module is needed for loading fonts (if any). Export
that as `GRUB_PRELOAD_MODULES'.
* util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
insmod commands).
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
flag when running on SmartFirmware.
* term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
"output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
was set.
* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
rather than decreasing it.
* util/i386/pc/grub-setup.c (setup): When embedding is required, but
there's not enough space to do it, fail in the same way as when it
can't be done because there are no partitions.
* util/powerpc/ieee1275/grub-install.in: Improve error message shown
when nvsetenv failed.
* util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
invocation to fail, in order to support partition-less media.
* util/i386/pc/grub-install.in: Likewise.
* util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
which fs or partmap modules are needed (akin to its sister scripts).
Also use grub-probe to get rid of unportable /proc/mounts check.
Print the same informational message that the other scripts do, before
exitting.
./configure --program-transform-name="s/grub/grub2/"
And the installed files (in this case for i386-pc) will be:
/usr/lib/grub2/i386-pc/*
/usr/local/sbin/grub2-emu
/usr/local/sbin/grub2-install
...etc
Also grub2-install place boot files in "/boot/grub2"
This allows easy integration into distributions as it allows grub2 to
sit side by side with a grub legacy install without.
* conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
* kern/powerpc/ieee1275/init.c (_end): Add declaration.
(_start): Likewise.
(grub_arch_modules_addr): Return address after `_end'.
* util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
(load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
(add_segments): Calculate `_end' from phdr size and location.
(ALIGN_UP): Moved to ...
* include/grub/misc.h: here.
* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
New macro.
(GRUB_IEEE1275_MODULE_BASE): Removed.
Add --with-platform to configure. Use pkglibdir instead of
pkgdatadir. This is reported by Roger Leigh.
* util/powerpc/ieee1275/grub-install.in (datadir): Removed.
(host_vendor): Likewise.
(host_os): Likewise.
(pkgdatadir): Likewise.
(platform): New variable.
(pkglibdir): Likewise.
Use PKGLIBDIR instead of PKGDATADIR.
* util/i386/pc/grub-install.in (datadir): Removed.
(host_vendor): Likewise.
(host_os): Likewise.
(pkgdatadir): Likewise.
(platform): New variable.
(pkglibdir): Likewise.
Use PKGLIBDIR instead of PKGDATADIR.
* util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
instead of GRUB_DATADIR.
(main): Likewise.
* util/i386/pc/grub-mkimage.c (usage): Likewise.
(main): Likewise.
* util/i386/efi/grub-mkimage.c (usage): Likewise.
(main): Likewise.
* configure.ac (--with-platform): New option.
Use PLATFORM instead of HOST_VENDOR to specify a platform.
* Makefile.in: Include a makefile based on PLATFORM instead of
HOST_VENDOR.
(pkgdatadir): Not appended by the machine type.
(pkglibdir): Appended by the machine type.
(host_vendor): Removed.
(platform): New variable.
(BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
(install-local): Use PKGLIBDIR instead of PKGDATADIR.
(uninstall): Likewise.
* util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
number regex so multidigit numbers are recognized correctly.
* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
debugging message before attempting to claim memory.
(grub_rescue_cmd_initrd): Add a claim debugging message and try
multiple addresses in case of failure.
* configure.ac: Fix the test for cross-compiling.
* genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
define GRUB_UTIL anymore.
* util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
so this function works on other systems than just big endian.
(load_modules): Likewise.
(add_segments): Likewise.
* util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
(note_path): Remove variable.
(GRUB_IEEE1275_NOTE_NAME): New macro.
(GRUB_IEEE1275_NOTE_TYPE): Likewise.
(grub_ieee1275_note_hdr): New structure.
(grub_ieee1275_note_desc): Likewise.
(grub_ieee1275_note): Likewise.
(load_note): Remove `dir' argument. All callers updated. Remove
`note_img' and `path'. Do not load a file from `note_path'.
Initialize a struct grub_ieee1275_note and write that to `out'.
Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.