2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
* disk/lvm.c: Rename VGS to VG_LIST.
(grub_lvm_iterate): Change VGS->LV to VG-LV.
(grub_lvm_open): Likewise.
Thanks to Michael Guntsche for finding this bug.
Move the prototypes of grub_setjmp and grub_longjmp to
cpu/setjmp.h, so that each architecture may specify different
attributes.
* include/grub/i386/setjmp.h (grub_setjmp): New prototype.
(grub_longjmp): Likewise.
* include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
(grub_longjmp): Likewise.
* include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
(grub_longjmp): Likewise.
* include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
[!GRUB_UTIL] (grub_longjmp): Removed.
* util/misc.c: Include config.h.
[!HAVE_MEMALIGN]: Do not include malloc.h.
(grub_memalign): Use posix_memalign, if present. Then, use
memalign, if present. Otherwise, emit an error.
* util/grub-emu.c: Do not include malloc.h.
* include/grub/util/misc.h: Include unistd.h. This is required for
FreeBSD, because off_t is defined in unistd.h. Reported by Harley
D. Eades III <hde@foobar-qux.org>.
* configure.ac (AC_GNU_SOURCE): Added.
(AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
type.
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.
* Makefile.in (LIBLZO): New variable.
* configure.ac: Check for LZO version 2.
* util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
lzo/lzo1x.h instead of lzo1x.h.
* conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
of -llzo.
* util/i386/pc/grub-setup.c (main): Do not free PREFIX
twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
* partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
copying the data from PARTITION to P.
* loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
function.
(grub_multiboot_load_elf32): Likewise.
(grub_multiboot_is_elf64): Likewise.
(grub_multiboot_load_elf64): Likewise.
(grub_multiboot_load_elf): Likewise.
(grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
an ELF32 or ELF64 file.
This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
From Serbinenko Vladimir <serbinenko.vova@list.ru>:
* kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
NULL before calling FS->LABEL.
* fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
* commands/ls.c (grub_ls_list_files): Show labels, if possible.
(grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
before calling FS->LABEL.
* kern/mm.c (grub_free): If the next free block which is being
merged is the first free block, set the first block to the block
being freed.
Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
* fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
descriptor. This is ported from GRUB Legacy.
* gencmdlist.sh: Added an extra semicolon to make it work with
old sed versions. Reported by Robert Bihlmeyer
<robbe@orcus.priv.at>.
From Hollis Blanchard <hollis@penguinppc.org>:
* kern/misc.c (memmove): New alias for grub_memmove.
(memcmp): New alias for grub_memcmp.
(memset): New alias for grub_memset.
* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
Change "int handle" to "grub_ieee1275_phandle_t handle".
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_get_property): Likewise.
Now this project is GRUB 2 rather than PUPA. The location of
the CVS repository was moved to GRUB's.
* configure.ac: Use bug-grub as the reporting address.
Use GRUB instead of PUPA.
Change the version number to 1.90.
* kern/i386/pc/lzo1x.S: New file.
* util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
(compress_kernel): New variable.
(generate_image): Heavily modified to support compressing a
large part of the core image.
* util/misc.c (pupa_util_read_image): Fix a file descriptor
leak.
(pupa_util_load_image): New function.
* kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
(pupa_compressed_size): New variable.
(codestart): Enable Gate A20 here.
Decompress the compressed part of the core image.
Rearrange the code to put functions and variables which are
required for initialization in the non-compressed part.
Include lzo1x.S.
* kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
here.
* include/pupa/util/misc.h (pupa_util_write_image): Declared.
* include/pupa/i386/pc/kernel.h
(PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
(PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
(PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
(PUPA_KERNEL_MACHINE_PREFIX): Likewise.
(PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
* conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
* genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
(Utility#rule): Likewise.
* configure.ac: Check if LZO is available.