* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
(OF_PATH_MAX): Removed.
(MAX_DISK_CAT): New const.
(find_obppath): Use allocated rather than preallocated buffer.
Return result. Argument of_path removed. All users updated.
Add missing fdstat.
(xrealpath): New function.
(block_device_get_sysfs_path_and_link): Remove sysfs argument.
Allocate rather than use preallocated buffer. All users updated.
(__of_path_common): Use allocated rather than preallocatecd buffer.
Return result. Argument of_path removed. All users updated.
(vendor_is_ATA): Read only needed part form the file.
(check_sas): Allocate depending on contents rather than fixed.
(main) [STANDALONE]: Handle NULL result.
* include/grub/types.h (UNUSED): Removed since it conflicts with
NetBSD headers. All users changed to direct __attribute__ ((unused)).
Reported by Grégoire Sutre.
* util/sparc64/ieee1275/grub-setup.c: New file.
* util/sparc64/ieee1275/grub-ofpathname.c: New file.
* util/sparc64/ieee1275/grub-mkimage.c: New file.
* util/sparc64/ieee1275/grub-install.in: New file.
* util/ieee1275/ofpath.c: New file.
* util/ieee1275/devicemap.c: New file.
* util/devicemap.c: New file.
* util/deviceiter.c: New file.
* kern/sparc64/ieee1275/init.c: New file.
* include/grub/util/ofpath.h: New file.
* include/grub/util/deviceiter.h: New file.
* util/grub-mkdevicemap.c: Include deviceiter.h.
Implement using grub_util_emit_devicemap_entry and
grub_util_iterate_devices.
* conf/i386-corebook.rmk: Build util/deviceiter.c and
util/devicemap.c into grub-mkdevicemap
* conf/i386-efi.rmk: Likewise.
* conf/i386-ieee1275.rmk: Likewise.
* conf/i386-pc.rmk: Likewise.
* conf/powerpc-ieee1275.rmk: Likewise.
* conf/sparc64-ieee1275.rmk: Add rules to build boot block
images and installation utilities. Build kernel as image
instead of as elf binary. Use common rules as much as possible.