* 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.
All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
and grub_, respectively. Because the conversion is trivial and
mechanical, I omit the details here. Please refer to the CVS
if you need more information.
* 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.
* include/i386/pc/util/biosdisk.h: New file.
* util/i386/pc/biosdisk.c: Likewise.
* util/i386/pc/pupa-setup.c: Likewise.
* Makefile.in (INCLUDE_DISTFILES): Added
include/pupa/i386/pc/util/biosdisk.h.
(UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
directory util/i386/pc.
(install-local): Added a rule for sbin_UTILITIES.
(uninstall): Likewise.
* util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
* util/misc.c (xrealloc): New function.
(pupa_malloc): Likewise.
(pupa_free): Likewise.
(pupa_realloc): Likewise.
(pupa_stop): Likewise.
(pupa_putchar): Likewise.
* kern/disk.c (pupa_disk_read): Prevent L from underflowing.
* include/pupa/util/misc.h (xrealloc): Declared.
* include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
macro.
(PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
(PUPA_BOOT_MACHINE_BPB_END): ... this.
* include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
[PUPA_UTIL] (pupa_fat_fini): Likewise.
* fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
way should be implemented.
[PUPA_UTIL] (pupa_fat_fini): Likewise.
* disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
the size of NAME for safety.
(pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
0x88.
* conf/i386-pc.rmk (sbin_UTILITIES): New variable.
(pupa_setup_SOURCES): Likewise.
* genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.