]>
git.ipfire.org Git - thirdparty/grub.git/log
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 23:31:06 +0000 (01:31 +0200)]
* grub-core/fs/fat.c (grub_fat_label) [MODE_EXFAT]: Set *label to 0
if no label is found.
(grub_fat_iterate_dir): Fix file size type.
(grub_fat_iterate_dir): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:55:38 +0000 (23:55 +0200)]
* grub-core/lib/reed_solomon.c (gf_invert): Declare as const and
save some space.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Decrease.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:40:53 +0000 (23:40 +0200)]
* util/import_gcry.py: Automatically fix camellia.c and camellia.h.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:39:00 +0000 (23:39 +0200)]
* util/import_gcry.py: Accept space between # and include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:34:30 +0000 (23:34 +0200)]
* grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/longjmp.S.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:32:06 +0000 (23:32 +0200)]
Fine grainely disable warnings on lexer. Remove Wno-error on it.
* grub-core/Makefile.core.def (normal): Remove -Wno-error.
* grub-core/script/lexer.c: Declare yytext_ptr to avoid having
yylex_strncpy.
* grub-core/script/yylex.l: Add fine-grained #pragma.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:28:23 +0000 (23:28 +0200)]
* grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
New inline function.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy) [GRUB_UTIL]:
Likewise.
(memset) [GRUB_UTIL]: Likewise.
(memcmp) [GRUB_UTIL]: Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:25:06 +0000 (23:25 +0200)]
* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
inline function rather than a define.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:22:38 +0000 (23:22 +0200)]
* util/grub-setup.c: Add missing include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:20:11 +0000 (23:20 +0200)]
* util/ieee1275/grub-ofpathname.c: Add missing include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:04:57 +0000 (23:04 +0200)]
* grub-core/kern/i386/pc/startup.S (grub_exit): Add missing zeroing-out.
* grub-core/lib/i386/reboot_trampoline.S (grub_reboot_start):
Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:55:32 +0000 (22:55 +0200)]
* grub-core/io/lzopio.c (test_header): Fix incorrect memcmp instead of
grub_memcmp usage.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:53:21 +0000 (22:53 +0200)]
* util/grub-install.in: Add datarootdir as per automake manual
suggestion.
* util/grub-mknetdir.in: Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:40:26 +0000 (22:40 +0200)]
* util/grub.d/10_hurd.in: Add datarootdir as per automake manual
suggestion.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 20 Oct 2011 06:13:00 +0000 (08:13 +0200)]
Remove redundant grub_kernel_image_size.
* grub-core/kern/i386/coreboot/init.c (grub_machine_init): Use
_edata and _start.
* grub-core/kern/i386/coreboot/startup.S: Move multiboot header after
the small code. It moves it only by few bytes but simplifies the code.
* grub-core/kern/i386/pc/init.c (grub_machine_init): Use _edata and
_start.
* grub-core/kern/i386/pc/startup.S: Use _edata and _start.
(grub_kernel_image_size): Removed.
* grub-core/kern/i386/qemu/startup.S: Use _edata and _start.
(grub_kernel_image_size): Removed.
[APPLE_CC]: Remove apple compiler support. i386-qemu port can't be
compiled with Apple toolchain.
* grub-core/kern/sparc64/ieee1275/crt0.S: Remove leftover fields.
* include/grub/i386/pc/kernel.h (grub_kernel_image_size): Removed.
* include/grub/i386/qemu/kernel.h (grub_kernel_image_size): Removed.
(grub_total_module_size): Likewise.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE):
Removed.
(GRUB_KERNEL_I386_PC_COMPRESSED_SIZE): Put it lower.
(GRUB_KERNEL_I386_PC_INSTALL_DOS_PART): Likewise.
(GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise.
(GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Likewise.
(GRUB_KERNEL_I386_QEMU_KERNEL_IMAGE_SIZE): Removed.
(GRUB_KERNEL_SPARC64_IEEE1275_KERNEL_IMAGE_SIZE): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_COMPRESSED_SIZE): Likewise.
* include/grub/sparc64/ieee1275/kernel.h (grub_kernel_image_size):
Removed.
(grub_total_module_size): Removed.
* util/grub-mkimage.c (image_target_desc): Remove image_size.
(image_targets): Likewise.
Set .compressed_size to no field on sparc.
(generate_image): Remove kernel_image_size handling.
Szymon Janc [Wed, 19 Oct 2011 21:11:48 +0000 (23:11 +0200)]
* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible
NULL pointer dereference.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 21:01:44 +0000 (23:01 +0200)]
Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
done with a dedicated section.
* grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
Ensure the correct position of boot_path.
* grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
* grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
other fields.
* grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
* include/grub/boot.h: Removed. All references removed.
* include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
Removed.
(GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:35:41 +0000 (20:35 +0200)]
* util/grub-install.in: Declare IEEE1275 as able to find out the disk
name.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:30:06 +0000 (20:30 +0200)]
* grub-core/kern/main.c (grub_set_prefix_and_root): Init prefix.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:28:09 +0000 (20:28 +0200)]
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Don't add the bogus brackets.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:19:25 +0000 (20:19 +0200)]
ExFAT support.
* Makefile.util.def (libgrubmods.a): Add grub-core/fs/exfat.c.
* grub-core/Makefile.core.def (exfat): New module.
* grub-core/fs/exfat.c: New file.
* grub-core/fs/fat.c (GRUB_FAT_DIR_ENTRY_SIZE): Removed.
(GRUB_FAT_ATTR_*): Make into an enum.
(GRUB_FAT_ATTR_LONG_NAME) [MODE_EXFAT]: Removed.
(GRUB_FAT_ATTR_VALID) [MODE_EXFAT]: Remove GRUB_FAT_ATTR_VOLUME_ID.
(GRUB_FAT_ATTR_VOLUME_ID) [MODE_EXFAT]: Removed.
(GRUB_FAT_MAXFILE): Removed.
(grub_exfat_bpb) [MODE_EXFAT]: New struct.
(grub_current_fat_bpb_t): New type.
(grub_fat_dir_entry) [MODE_EXFAT]: New struct.
(grub_fat_dir_node) [MODE_EXFAT]: New struct.
(grub_fat_dir_node_t): New type.
(grub_fat_data) [MODE_EXFAT]: Remove root_sector and num_root_sectors.
(fat_log2) [MODE_EXFAT]: Removed.
(grub_fat_mount): Use grub_current_fat_bpb_t. Add some sanity checks.
(grub_fat_mount) [MODE_EXFAT]: Handle ExFAT.
(grub_fat_iterate_dir) [MODE_EXFAT]: New function.
(grub_fat_find_dir) [MODE_EXFAT]: Handle ExFAT.
(grub_fat_label) [MODE_EXFAT]: New function.
(grub_fat_fs) [MODE_EXFAT]: Set name to "exfat" and
reserved_first_sector to 0.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 14:53:18 +0000 (16:53 +0200)]
Move grub_reboot out of the kernel.
* grub-core/Makefile.core.def (reboot): Add platform-specific files.
* grub-core/kern/efi/efi.c (grub_reboot): Moved to ...
* grub-core/lib/efi/reboot.c: ... here.
* grub-core/kern/i386/efi/startup.S: Remove including of realmode.S.
* grub-core/kern/i386/ieee1275/startup.S: Likewise.
* grub-core/kern/i386/pc/startup.S (grub_exit): Inline cold_reboot.
* grub-core/kern/i386/realmode.S (grub_reboot): Moved to...
* grub-core/lib/i386/reboot_trampoline.S: ... here.
* grub-core/kern/ieee1275/openfw.c (grub_reboot): Moved to...
* grub-core/lib/ieee1275/reboot.c: ... here.
* grub-core/kern/mips/arc/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/arc/reboot.c: ... here.
* grub-core/kern/mips/loongson/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/loongson/reboot.c: ...here.
* grub-core/kern/mips/qemu_mips/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/qemu_mips/reboot.c: ... here.
* include/grub/emu/misc.h (grub_reboot): New function declaration.
* include/grub/i386/reboot.h: New file.
* include/grub/mips/loongson/ec.h: Fix includes.
* include/grub/mips/qemu_mips/kernel.h (grub_reboot): Removed.
* include/grub/misc.h (grub_reboot): Don't mark as kernel function.
* grub-core/lib/i386/reboot.c: New file.
Vladimir 'phcoder' Serbinenko [Tue, 18 Oct 2011 13:21:51 +0000 (15:21 +0200)]
Make grub_prefix into module to fix the arbitrary limit and save
some space.
* grub-core/kern/emu/main.c (grub_prefix): Removed.
* grub-core/kern/i386/coreboot/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/efi/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/ieee1275/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/pc/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/qemu/startup.S (grub_prefix): Likewise.
* grub-core/kern/ia64/efi/startup.S (grub_prefix): Likewise.
* grub-core/kern/mips/startup.S (grub_prefix): Likewise.
* grub-core/kern/powerpc/ieee1275/startup.S (grub_prefix): Likewise.
* grub-core/kern/sparc64/ieee1275/crt0.S (grub_prefix): Likewise.
* grub-core/kern/x86_64/efi/startup.S (grub_prefix): Likewise.
* include/grub/ia64/efi/kernel.h: Removed.
* include/grub/kernel.h: New module type OBJ_TYPE_PREFIX.
(grub_prefix): Removed.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_PREFIX): Removed.
(GRUB_KERNEL_I386_PC_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_QEMU_PREFIX): Likewise.
(GRUB_KERNEL_I386_QEMU_PREFIX_END): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_LOONGSON_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_EFI_PREFIX): Likewise.
(GRUB_KERNEL_I386_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_IA64_EFI_PREFIX): Likewise.
(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_X86_64_EFI_PREFIX): Likewise.
(GRUB_KERNEL_X86_64_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_COREBOOT_PREFIX): Likewise.
(GRUB_KERNEL_I386_COREBOOT_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_MULTIBOOT_PREFIX): Likewise.
(GRUB_KERNEL_I386_MULTIBOOT_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_I386_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_MACHINE_PREFIX): Likewise.
(GRUB_KERNEL_MACHINE_PREFIX_END): Likewise.
* grub-core/kern/main.c (grub_set_prefix_and_root): Retrieve grub_prefix
from module.
* util/grub-mkimage.c (image_target_desc): Removed prefix and
prefix_end.
(image_targets): Likewise.
(generate_image): Put prefix as a module.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 13:23:29 +0000 (15:23 +0200)]
Replace grub_module_iterate with FOR_MODULES.
* grub-core/disk/memdisk.c (GRUB_MOD_INIT): Switched to new interface.
* grub-core/kern/efi/efi.c (grub_arch_modules_addr): Renamed to...
(grub_efi_modules_addr): ...this.
* grub-core/kern/efi/init.c (grub_modbase): New variable.
(grub_efi_init): Set grub_modbase.
* grub-core/kern/emu/main.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
* grub-core/kern/i386/coreboot/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/i386/pc/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/ieee1275/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/main.c (grub_module_iterate): Remove.
(grub_modules_get_end): Use grub_modbase.
(grub_load_modules): Use FOR_MODULES.
(grub_load_config): Likewise.
* grub-core/kern/mips/arc/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr):
Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* include/grub/efi/efi.h (grub_efi_modules_addr): New declaration.
* include/grub/kernel.h (grub_arch_modules_addr): Removed.
(grub_module_iterate): Likewise.
(grub_modbase): New variable declaration.
(FOR_MODULES): New macro.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 13:15:35 +0000 (15:15 +0200)]
* configure.ac: Check for __ctzdi2 and __ctzsi2.
* include/grub/libgcc.h: Include __ctzdi2 and __ctzsi2 if present.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:57:48 +0000 (11:57 +0200)]
Fix few obvious type discrepancies.
* grub-core/fs/affs.c (grub_affs_read_file): Use grub_off_t for offset.
* grub-core/fs/afs.c (grub_afs_read_file): Likewise.
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Remove leftover
variable.
* grub-core/fs/hfs.c (grub_hfs_read_file): Use grub_off_t for offset
and connected types.
* grub-core/fs/nilfs2.c (grub_nilfs2_read_file): Use grub_off_t for
offset.
(grub_nilfs2_iterate_dir): Use grub_off_t for fpos.
* grub-core/fs/sfs.c (grub_sfs_read_file): Use grub_off_t for offset.
* grub-core/fs/ufs.c (grub_ufs_read_file): Use grub_off_t for offset
and connected types.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:53:27 +0000 (11:53 +0200)]
Fix python 3.x incompatibilities.
* gentpl.py: Put brackets around print strings.
* util/import_gcry.py: Open explicitly as utf-8.
Use in instead of has_key.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:48:54 +0000 (11:48 +0200)]
* grub-core/fs/xfs.c (grub_xfs_inode): New field fork_offset.
(GRUB_XFS_INO_AGBITS): Make into inline function.
(GRUB_XFS_INO_INOINAG): Likewise.
(GRUB_XFS_INO_AG): Likewise.
(GRUB_XFS_FSB_TO_BLOCK): Likewise.
(GRUB_XFS_EXTENT_OFFSET): Likewise.
(GRUB_XFS_EXTENT_BLOCK): Likewise.
(GRUB_XFS_EXTENT_SIZE): Likewise.
(GRUB_XFS_ROUND_TO_DIRENT): Likewise.
(GRUB_XFS_NEXT_DIRENT): Likewise.
(grub_xfs_read_block): Rewrite the btree parsing. Fixes invalid BMAP.
(grub_xfs_read_file): Fix offset type.
Robert Millan [Sat, 15 Oct 2011 16:37:55 +0000 (18:37 +0200)]
2011-10-15 Robert Millan <rmh@gnu.org>
* util/getroot.c (grub_util_get_grub_dev): Fix OS selection #ifdefs.
Robert Millan [Sat, 15 Oct 2011 11:33:41 +0000 (13:33 +0200)]
2011-10-15 Robert Millan <rmh@gnu.org>
Fix build problem on FreeBSD and GNU/kFreeBSD.
* util/getroot.c [__FreeBSD_kernel__]: Include `<sys/mount.h>'.
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 20:41:21 +0000 (22:41 +0200)]
Fix overflow with >2GiB file on HFS+. >4GiB wasn't tested.
* grub-core/fs/hfsplus.c (grub_hfsplus_btree): Use more appropriate
types.
(grub_hfsplus_btree_recoffset): Likewise.
(grub_hfsplus_btree_recptr): Likewise.
(grub_hfsplus_find_block): Likewise.
(grub_hfsplus_btree_search): Likewise.
(grub_hfsplus_read_block): Likewise.
(grub_hfsplus_read_file): Likewise.
(grub_hfsplus_mount): Likewise.
(grub_hfsplus_btree_iterate_node): Likewise.
(grub_hfsplus_btree_search): Likewise.
(grub_hfsplus_iterate_dir): Likewise.
(grub_hfsplus_read): A small code simplification.
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 17:20:44 +0000 (19:20 +0200)]
* grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Don't assume that children
of mapper nodes are mapper nodes.
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 17:16:37 +0000 (19:16 +0200)]
* grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.
* include/grub/misc.h (grub_isxdigit): New function.
* grub-core/video/colors.c (my_isxdigit): Removed. All users
switched to grub_isxdigit.
* grub-core/term/serial.c (grub_serial_find): Fix in case of port
number starting with a letter.
Robert Millan [Sun, 9 Oct 2011 19:13:00 +0000 (21:13 +0200)]
2011-10-09 Robert Millan <rmh@gnu.org>
LVM support for FreeBSD and GNU/kFreeBSD.
* util/lvm.c (grub_util_lvm_isvolume): Enable on FreeBSD and
GNU/kFreeBSD.
(LVM_DEV_MAPPER_STRING): Move from here ...
* include/grub/util/lvm.h (LVM_DEV_MAPPER_STRING): ... to here.
* util/getroot.c: Include `<grub/util/lvm.h>'.
(grub_util_get_dev_abstraction): Enable
grub_util_biosdisk_is_present() on FreeBSD and GNU/kFreeBSD.
Check for LVM abstraction on FreeBSD and GNU/kFreeBSD.
(grub_util_get_grub_dev): Replace "/dev/mapper/" with
`LVM_DEV_MAPPER_STRING'. Enable LVM and mdRAID only on platforms that
support it.
* util/grub-setup.c (main): Check for LVM also on FreeBSD and
GNU/kFreeBSD.
* util/grub.d/10_kfreebsd.in: Load `geom_linux_lvm' kernel module
when LVM abstraction is required for ${GRUB_DEVICE}.
Szymon Janc [Thu, 6 Oct 2011 18:45:14 +0000 (20:45 +0200)]
Add support for LZO compression in GRUB:
- import of minilzo library,
- LZO decompression for btrfs,
- lzop files decompression.
* grub-core/io/lzopio.c: New file.
* grub-core/lib/adler32.c: Likewise.
* grub-core/lib/minilzo/lzoconf.h: Likewise.
* grub-core/lib/minilzo/lzodefs.h: Likewise.
* grub-core/lib/minilzo/minilzo.c: Likewise.
* grub-core/lib/minilzo/minilzo.h: Likewise.
* Makefile.util.def (libgrubmods.a): Add grub-core/io/lzopio.c,
grub-core/lib/adler32.c, grub-core/io/lzopio.c,
grub-core/lib/minilzo/minilzo.c to common.
* Makefile.util.def (libgrubmods.a): Add flags required by minilzo to
cflags in cppflags.
* grub-core/Makefile.core.def (btrfs): Likewise.
* grub-core/Makefile.core.def (lzopio): New module.
(adler32): Likewise.
* grub-core/fs/btrfs.c: Include minilzo.h.
(GRUB_BTRFS_COMPRESSION_LZO): New define.
(GRUB_BTRFS_LZO_BLOCK_SIZE): Likewise.
(GRUB_BTRFS_LZO_BLOCK_MAX_CSIZE): Likewise.
(grub_btrfs_lzo_decompress): New function.
(grub_btrfs_extent_read): Add support for LZO compression type.
* include/grub/types.h (GRUB_UCHAR_MAX): New define.
(GRUB_USHRT_MAX): Likewise.
(GRUB_UINT_MAX): Likewise.
* grub-core/lib/posix_wrap/limits.h (USHRT_MAX): Likewise.
(UINT_MAX): Likewise.
(CHAR_BIT): Likewise.
* grub-core/lib/posix_wrap/sys/types.h (ULONG_MAX): Moved to
grub-core/lib/posix_wrap/limits.h
(UCHAR_MAX): Likewise.
* include/grub/file.h (grub_file_filter_id): New compression filter
GRUB_FILE_FILTER_LZOPIO.
* include/grub/file.h (grub_file_filter_id): Set
GRUB_FILE_FILTER_LZOPIO as GRUB_FILE_FILTER_COMPRESSION_LAST.
* include/grub/types.h (grub_get_unaligned16): New function.
(grub_get_unaligned32): Likewise.
(grub_get_unaligned64): Likewise.
* util/import_gcry.py (cryptolist): Add adler32.
Szymon Janc [Thu, 6 Oct 2011 17:00:10 +0000 (19:00 +0200)]
merge trunk
Vladimir 'phcoder' Serbinenko [Wed, 5 Oct 2011 09:53:36 +0000 (11:53 +0200)]
* grub-core/Makefile.core.def: Eliminate rarely used emu_condition. This
in perspective decreases the complexity of build system and fixes
compilation right now.
Szymon Janc [Tue, 4 Oct 2011 19:10:21 +0000 (21:10 +0200)]
* grub-core/io/lzopio.c (calculate_uncompressed_size): Fix return code.
Szymon Janc [Tue, 4 Oct 2011 18:21:12 +0000 (20:21 +0200)]
merge trunk
Szymon Janc [Mon, 3 Oct 2011 21:01:14 +0000 (23:01 +0200)]
* grub-core/Makefile.core.def (btrfs): Remove minilzo.c from common.
Szymon Janc [Mon, 3 Oct 2011 20:25:06 +0000 (22:25 +0200)]
* grub-core/fs/btrfs.c: Include <minilzo.h> instead of "minilzo.h".
* grub-core/io/lzopio.c: Likewise.
Szymon Janc [Mon, 3 Oct 2011 20:06:10 +0000 (22:06 +0200)]
* grub-core/io/lzopio.c: Improve crypt context alignment.
Szymon Janc [Mon, 3 Oct 2011 19:50:32 +0000 (21:50 +0200)]
* grub-core/fs/btrfs.c: Fix code style regressions.
starous [Sat, 1 Oct 2011 19:27:29 +0000 (21:27 +0200)]
@Rock changes - fixed coreboot problem
BVK Chaitanya [Sat, 1 Oct 2011 01:49:37 +0000 (18:49 -0700)]
* gentpl.py: Use Autogen macros so that the output template file
(Makefile.tpl) size is reduced.
Mads Kiilerich [Thu, 29 Sep 2011 08:50:25 +0000 (10:50 +0200)]
* grub-core/Makefile.core.def (kernel): Add kern/i386/int.S to
extra_dist.
Mario Limonciello [Thu, 29 Sep 2011 08:39:44 +0000 (10:39 +0200)]
* util/misc.c (grub_util_get_disk_size) [__MINGW32__]: Strip trailing
slashes on PHYSICALDRIVE%d paths when making Windows CreateFile calls.
Mario Limonciello [Thu, 29 Sep 2011 08:36:55 +0000 (10:36 +0200)]
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use
_fullpath.
Mario Limonciello [Thu, 29 Sep 2011 08:32:24 +0000 (10:32 +0200)]
Remove extra declaration of sleep for mingw32.
* util/misc.c (sleep) [__MINGW32__]: Removed.
* include/grub/util/misc.h (sleep) [__MINGW32__]: Likewise.
Grégoire Sutre [Wed, 28 Sep 2011 21:45:57 +0000 (23:45 +0200)]
Make knetbsd pass bootinfo bootdisk and bootwedge.
Thomas Haller [Wed, 28 Sep 2011 14:43:00 +0000 (16:43 +0200)]
* grub-core/loader/multiboot_elfxx.c (Elf_Shdr): Set according to
loader.
Andreas Born [Wed, 28 Sep 2011 12:19:21 +0000 (14:19 +0200)]
Fix incorrect identifiers in bash-completion.
* util/bash-completion.d/grub-completion.bash.in
(_grub_mkpasswd-pbkdf2): Rename to ...
(_grub_mkpasswd_pbkdf2): ... this. All users updated.
(_grub_script-check): Rename to ...
(_grub_script_check): ... this. All users updated.
Vladimir 'phcoder' Serbinenko [Wed, 28 Sep 2011 12:07:53 +0000 (14:07 +0200)]
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
Return 0 if disk isn't biosdisk.
Grégoire Sutre [Sat, 17 Sep 2011 21:40:10 +0000 (23:40 +0200)]
Add LIBUTIL for grub-mkrelpath and grub-fstest. Fixes build on NetBSD.
Grégoire Sutre [Sat, 17 Sep 2011 21:01:48 +0000 (23:01 +0200)]
Get sector size from disk label for NetBSD.
Szymon Janc [Tue, 6 Sep 2011 19:21:13 +0000 (21:21 +0200)]
* grub-core/io/lzopio.c (test_header): Some cleanups.
Colin Watson [Mon, 5 Sep 2011 12:58:33 +0000 (13:58 +0100)]
* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Return 1 for
*/README* as well as README*.
Reported by: Axel Beckert.
Szymon Janc [Wed, 24 Aug 2011 09:24:10 +0000 (11:24 +0200)]
* grub-core/fs/btrfs.c: Some minor cleanups.
Szymon Janc [Tue, 23 Aug 2011 17:53:49 +0000 (19:53 +0200)]
* Makefile.util.def (libgrubmods.a): Add grub-core/io/lzopio.c to
common.
Szymon Janc [Tue, 23 Aug 2011 17:49:01 +0000 (19:49 +0200)]
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Random fixes and some
cleanup.
Vladimir 'phcoder' Serbinenko [Tue, 23 Aug 2011 09:20:56 +0000 (11:20 +0200)]
* grub-core/kern/mips/loongson/init.c (grub_machine_init): Handle the
case of less than 256 MiB of RAM.
Vladimir 'phcoder' Serbinenko [Tue, 23 Aug 2011 09:19:26 +0000 (11:19 +0200)]
* grub-core/commands/wildcard.c (make_regex): Handle @.
Vladimir 'phcoder' Serbinenko [Tue, 23 Aug 2011 09:18:00 +0000 (11:18 +0200)]
* util/grub-install.in: Move cryptodisk logic to appropriate place.
Szymon Janc [Mon, 22 Aug 2011 07:18:22 +0000 (09:18 +0200)]
* include/grub/file.h (grub_file_filter_id): Set
GRUB_FILE_FILTER_LZOPIO as GRUB_FILE_FILTER_COMPRESSION_LAST.
Szymon Janc [Sun, 21 Aug 2011 16:48:19 +0000 (18:48 +0200)]
Various bug fixes and improvements in lzopio. Should properly handle more
files now. Also added support for lzop checksums verification.
Szymon Janc [Sun, 21 Aug 2011 12:49:07 +0000 (14:49 +0200)]
Return correct adler32 value in read() call.
Szymon Janc [Sat, 20 Aug 2011 19:10:00 +0000 (21:10 +0200)]
* acinclude.m4: Use AC_LANG_PROGRAM macro to generate source code for
AC_LANG_CONFTEST macros.
Szymon Janc [Sat, 20 Aug 2011 18:21:36 +0000 (20:21 +0200)]
merge trunk
Szymon Janc [Sat, 20 Aug 2011 16:24:54 +0000 (18:24 +0200)]
Add support for adler32 checksuming.
* grub-core/lib/adler32.c: New file.
* Makefile.util.def (library): Add grub-core/lib/adler32.c to common.
* util/import_gcry.py (cryptolist): Add adler32.
Szymon Janc [Sat, 20 Aug 2011 11:04:38 +0000 (13:04 +0200)]
Add grub-fstest option to uncompress data for commands.
* util/grub-fstest.c (uncompress): New var.
(options): New option -u.
Szymon Janc [Sat, 20 Aug 2011 10:02:35 +0000 (12:02 +0200)]
merge trunk
Szymon Janc [Sat, 20 Aug 2011 09:58:41 +0000 (11:58 +0200)]
* grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
GRUB_VIDEO_DRIVER_RADEON_FULOONG2E to switch case statement.
Szymon Janc [Sat, 20 Aug 2011 09:48:46 +0000 (11:48 +0200)]
* grub-core/io/gzio.c (grub_gzio_open): Always return original io if
file type was not recognized correctly (not gzip or corrupted).
Szymon Janc [Sat, 20 Aug 2011 07:49:15 +0000 (09:49 +0200)]
merge trunk
Szymon Janc [Sat, 20 Aug 2011 00:05:08 +0000 (02:05 +0200)]
More work on LZO for btrfs support. Some fixes and code refactoring.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 21:11:09 +0000 (23:11 +0200)]
* grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 21:08:36 +0000 (23:08 +0200)]
* grub-core/Makefile.core.def (kernel): Add video/radeon_fuloong2e.c on
loongson.
* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
video_radeon_fuloong2e.
* grub-core/video/radeon_fuloong2e.c: New file.
* include/grub/video.h (grub_video_id_t): Add new ID
GRUB_VIDEO_DRIVER_RADEON_FULOONG2E.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 21:04:18 +0000 (23:04 +0200)]
* include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_COP0_PRID): New
define.
* grub-core/kern/mips/loongson/init.c (grub_machine_init): Check
that PRID matches the detected subplatform and reset the subplatform
if it doesn't.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 20:59:24 +0000 (22:59 +0200)]
* grub-core/kern/misc.c (grub_vprintf): Fix a bug on malloc failure.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 20:56:49 +0000 (22:56 +0200)]
Fix PCI iterating on functions >= 4.
* grub-core/bus/pci.c (grub_pci_iterate): Remove useless ghost skipping.
* include/grub/mips/loongson/pci.h (GRUB_LOONGSON_OHCI_GHOST_FUNCTION):
Removed.
(GRUB_LOONGSON_EHCI_GHOST_FUNCTION): Likewise.
(grub_pci_read): Fix bitmask.
(grub_pci_read_word): Likewise.
(grub_pci_read_byte): Likewise.
(grub_pci_write): Likewise.
(grub_pci_write_word): Likewise.
(grub_pci_write_byte): Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 20:49:48 +0000 (22:49 +0200)]
* configure.ac: Don't impose march=loongson2f on loongson platform. (It
can still be specified in TARGET_CFLAGS)
Vladimir 'phcoder' Serbinenko [Fri, 19 Aug 2011 20:46:11 +0000 (22:46 +0200)]
Rename Fuloong into Fuloong 2F. Add new ID for Fuloong2E.
* grub-core/Makefile.core.def (fwstart_fuloong): Rename fwstart_fuloong
into fwstart_fuloong2f. Use boot/mips/loongson/fuloong2f.S.
* grub-core/boot/mips/loongson/fuloong.S: Rename to ...
* grub-core/boot/mips/loongson/fuloong2f.S: ... this.
(FULOONG): Rename to ...
(FULOONG2F): ... this. All users updated.
* grub-core/boot/mips/startup_raw.S (machtype_fuloong_str): Rename to
(machtype_fuloong2f_str): ... this.
(machtype_fuloong2e_str): New string.
Check for machtype_fuloong2e_str.
* grub-core/loader/mips/linux.c (loongson_machtypes)
[GRUB_MACHINE_MIPS_LOONGSON]: Add GRUB_ARCH_MACHINE_FULOONG2E.
* grub-core/term/serial.c (loongson_defserial)
[GRUB_MACHINE_MIPS_LOONGSON]: New array.
(grub_serial_register) [GRUB_MACHINE_MIPS_LOONGSON]: Use
loongson_defserial.
* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_FULOONG):
Rename to ...
(GRUB_ARCH_MACHINE_FULOONG2F): ... this.
(GRUB_ARCH_MACHINE_FULOONG2E): New const.
* util/grub-mkimage.c (image_target_desc): Rename IMAGE_FULOONG_FLASH
to IMAGE_FULOONG2F_FLASH. All users updated.
(image_targets): Rename images.
* util/grub-mkstandalone.in: Accept fuloong2f and fuloong2e.
Szymon Janc [Fri, 19 Aug 2011 19:28:09 +0000 (21:28 +0200)]
Make enable of disk cache statistics code configurable.
* configure.ac: --enable-cache-stats added.
* config.h.in (DISK_CACHE_STATS): New define.
* grub-core/Makefile.core.def (cacheinfo): New command.
* include/grub/disk.h(grub_disk_cache_get_performance): New function.
* grub-core/commands/cacheinfo.c: New file.
* grub-core/commands/minicmd.c (grub_rescue_cmd_info): Updated and
moved to cacheinfo.c.
* grub-core/kern/disk.c: Use DISK_CACHE_STATS to disable disk cache
debug code.
* include/grub/disk.h: Likewise.
Szymon Janc [Fri, 19 Aug 2011 18:06:42 +0000 (20:06 +0200)]
* Makefile.am (AUTOMAKE_OPTIONS): = Added -Wno-portability flag.
* grub-core/Makefile.am: Likewise.
Szymon Janc [Fri, 19 Aug 2011 15:24:18 +0000 (17:24 +0200)]
* configure.ac: Fixed typo in --enable-cache-stats description.
Szymon Janc [Wed, 17 Aug 2011 17:40:25 +0000 (19:40 +0200)]
Add initial support for lzop files decompression.
* grub-core/Makefile.core.def (lzopio): New module.
* grub-core/io/lzopio.c: New file.
* include/grub/file.h (grub_file_filter_id): New compression filter
GRUB_FILE_FILTER_LZOPIO.
Vladimir 'phcoder' Serbinenko [Tue, 16 Aug 2011 21:12:20 +0000 (23:12 +0200)]
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_iterate): Skip with
non-zero pull.
Vladimir 'phcoder' Serbinenko [Tue, 16 Aug 2011 21:10:38 +0000 (23:10 +0200)]
* grub-core/fs/jfs.c (grub_jfs_read_file): New parameter ino.
All users updated.
(grub_jfs_lookup_symlink): Use correct starting inode.
Vladimir 'phcoder' Serbinenko [Tue, 16 Aug 2011 14:19:06 +0000 (16:19 +0200)]
* util/grub-setup.c (main): Add missing gcry initialisation.
Vladimir 'phcoder' Serbinenko [Tue, 16 Aug 2011 14:11:10 +0000 (16:11 +0200)]
Don't accept text modes on EFI when booting Linux.
* grub-core/loader/i386/linux.c (ACCEPTS_PURE_TEXT): New define.
(grub_linux_boot) [!ACCEPTS_PURE_TEXT]: Restrict to graphics modes.
Mario Limonciello [Mon, 15 Aug 2011 22:30:11 +0000 (23:30 +0100)]
* util/grub-probe.c (probe): Canonicalise the path argument, fixing
use of "/path/.." as in grub-install for EFI as well as handling
symlinks correctly.
Fixes Debian bug #637768.
Colin Watson [Mon, 15 Aug 2011 22:21:29 +0000 (23:21 +0100)]
* util/grub-probe.c: Remove duplicate #include.
Szymon Janc [Sun, 14 Aug 2011 09:46:05 +0000 (11:46 +0200)]
Add support for LZO compression in btrfs.
* Makefile.util.def (libgrubmods.a): Add minilzo.c and add required flags
to cflags in cppflags.
* Makefile.core.def (btrfs): Likewise.
* grub-core/fs/btrfs.c: Include minilzo.h.
(grub_btrfs_superblock): Add sectorsize, nodesize, leafsize, stripsize and
dummy5 field.
(GRUB_BTRFS_COMPRESSION_LZO): New define.
(grub_btrfs_extent_read): Add support for LZO compression type.
Szymon Janc [Sun, 14 Aug 2011 09:42:53 +0000 (11:42 +0200)]
* grub-core/fs/btrfs.c: Some code style fixes.
Szymon Janc [Sun, 14 Aug 2011 09:41:19 +0000 (11:41 +0200)]
Add helper functions for easier unaligned memory access.
* include/grub/types.h (grub_get_unaligned16): New function.
(grub_get_unaligned32): Likewise.
(grub_get_unaligned64): Likewise.
Szymon Janc [Sun, 14 Aug 2011 09:39:31 +0000 (11:39 +0200)]
Import minilzo library for LZO decompression support.
* grub-core/lib/minilzo/lzoconf.h: New file.
* grub-core/lib/minilzo/lzodefs.h: Likewise.
* grub-core/lib/minilzo/minilzo.c: Likewise.
* grub-core/lib/minilzo/minilzo.h: Likewise.
* include/grub/types.h (GRUB_UCHAR_MAX): New define.
(GRUB_USHRT_MAX): Likewise.
(GRUB_UINT_MAX): Likewise.
* grub-core/lib/posix_wrap/limits.h (USHRT_MAX): New define.
(UINT_MAX): Likewise.
(CHAR_BIT): Likewise.
* grub-core/lib/posix_wrap/sys/types.h (ULONG_MAX): Moved to
grub-core/lib/posix_wrap/limits.h
(UCHAR_MAX): Likewise.
Szymon Janc [Sat, 13 Aug 2011 13:00:48 +0000 (15:00 +0200)]
merge trunk
Robert Millan [Wed, 10 Aug 2011 20:24:02 +0000 (22:24 +0200)]
2011-08-10 Robert Millan <rmh@gnu.org>
Detect LSI MegaRAID SAS (`mfi') devices on GNU/kFreeBSD.
* util/deviceiter.c [__FreeBSD_kernel__] (get_mfi_disk_name): New
function.
[__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for mfi
(/dev/mfid[0-9]+) devices using get_mfi_disk_name().
Robert Millan [Wed, 3 Aug 2011 11:30:46 +0000 (13:30 +0200)]
2011-08-03 Robert Millan <rmh@gnu.org>
* include/grub/zfs/zap_leaf.h (typedef union zap_leaf_chunk): Mark
la_array as packed.
Reported by: Zachary Bedell
Colin Watson [Tue, 26 Jul 2011 15:19:47 +0000 (16:19 +0100)]
* configure.ac: The Loongson port requires grub-mkfont due to its
use of -DUSE_ASCII_FAILBACK. Raise an error if it is not going to
be built.