Commit graph

1776 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
c7ba4f6984 Support BtrFS embedding.
* grub-core/fs/btrfs.c (grub_btrfs_embed) [GRUB_UTIL]: New function.
	(grub_btrfs_fs) [GRUB_UTIL]: Set embed.
	* include/grub/fs.h (grub_fs) [GRUB_UTIL]: New field embed.
	* util/grub-setup.c (setup): Use fs embedding if available.
	Add additional sanity check.
2011-11-05 14:47:25 +01:00
Vladimir 'phcoder' Serbinenko
8bec9a284b * include/grub/kernel.h (grub_module_header): Make type into uint32 as
expected by grub-mkimage and it's more clear since there is no implicit
	padding.
2011-11-04 13:18:30 +01:00
Vladimir 'phcoder' Serbinenko
91c3fdde0d * include/grub/ntfs.h: Add GRUB_NTFS_ prefix. All users updated. 2011-10-27 02:59:45 +02:00
Vladimir 'phcoder' Serbinenko
1869edb5bc ZFS multi-device and version 33 support.
* Makefile.util.def (libgrubkern): Add grub-core/fs/zfs/zfsinfo.c.
	* grub-core/fs/zfs/zfs.c (grub_zfs_device_desc): New struct.
	(grub_zfs_data): Add multidev-ice-related fields.
	(zio_checksum_verify): Zero-pad printed values. Print checksum name.
	(dva_get_offset): Make dva const.
	(zfs_fetch_nvlist): New function.
	(fill_vdev_info_real): Likewise.
	(fill_vdev_info): Likewise.
	(check_pool_label): Likewise.
	(scan_disk): Likewise.
	(scan_devices): Likewise.
	(read_device): Likewise.
	(read_dva): Likewise.
	(zio_read_gang): Use read_dva.
	(zio_read_data): Likewise.
	(zap_leaf_lookup): Add missing endian conversion.
	(zap_verify): Add missing endian conversion. All users updated.
	(fzap_lookup): Likewise.
	(fzap_iterate): Likewise.
	(dnode_get_path): Handle SA bonus.
	(nvlist_find_value): Make input const. All users updated.
	(unmount_device): New function.
	(zfs_unmount): Use unmount_device.
	(zfs_mount): Use scan_disk.
	(zfs_mtime): New function.
	(grub_zfs_open): Handle system attributes.
	(fill_fs_info): Likewise.
	(grub_zfs_dir): Likewise.
	(grub_zfs_fs): Add mtime.
	* grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add missing return.
	* include/grub/zfs/sa_impl.h (SA_TYPE_OFFSET): New definition.
	(SA_MTIME_OFFSET): Likewise.
	(SA_SYMLINK_OFFSET): Likewise.
	* include/grub/zfs/zfs.h (SPA_VERSION): Increase to 33.
	* util/grub-fstest.c (CMD_ZFSINFO): New enum value.
	(fstest): Support zfsinfo.
	(argp_parser): Likewise.
2011-10-27 02:49:50 +02:00
Vladimir 'phcoder' Serbinenko
34c5965451 Support version 33 including symlinks 2011-10-27 02:04:04 +02:00
Vladimir 'phcoder' Serbinenko
186b402804 * include/grub/datetime.h (grub_datetime2unixtime): Fix off-by-one
error.
2011-10-26 19:27:36 +02:00
Vladimir 'phcoder' Serbinenko
11e50e923a merge mainline into zfs 2011-10-26 19:26:24 +02:00
Vladimir 'phcoder' Serbinenko
a562fbb48b Bump spa version 2011-10-26 19:11:10 +02:00
Vladimir 'phcoder' Serbinenko
f646e14309 * 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.
2011-10-23 23:55:38 +02:00
Vladimir 'phcoder' Serbinenko
4e94ae6575 * include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
inline function rather than a define.
2011-10-23 23:25:06 +02:00
Vladimir 'phcoder' Serbinenko
db1326f5fb Move chainloader_real_boot out of the kernel 2011-10-21 00:16:59 +02:00
Vladimir 'phcoder' Serbinenko
766f7d0809 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.
2011-10-20 08:13:00 +02:00
Vladimir 'phcoder' Serbinenko
de9c615e5c 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.
2011-10-19 23:01:44 +02:00
Vladimir 'phcoder' Serbinenko
544c24876e 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.
2011-10-19 16:53:18 +02:00
Vladimir 'phcoder' Serbinenko
a97501d238 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.
2011-10-18 15:21:51 +02:00
Vladimir 'phcoder' Serbinenko
39705fadd7 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.
2011-10-16 15:23:29 +02:00
Vladimir 'phcoder' Serbinenko
2afb7f6cbf * configure.ac: Check for __ctzdi2 and __ctzsi2.
* include/grub/libgcc.h: Include __ctzdi2 and __ctzsi2 if present.
2011-10-16 15:15:35 +02:00
Vladimir 'phcoder' Serbinenko
038ec56a31 nslookup implementation 2011-10-14 19:21:59 +02:00
Vladimir 'phcoder' Serbinenko
0eb8ffb1f5 * 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.
2011-10-14 19:16:37 +02:00
Vladimir 'phcoder' Serbinenko
0cb9503b70 support routed pings 2011-10-13 20:53:22 +02:00
Vladimir 'phcoder' Serbinenko
bd40efbf0b several net bugfixes and improvements and fix some memory leaks 2011-10-13 18:31:53 +02:00
Vladimir 'phcoder' Serbinenko
da1b289afc IPv6. Apparently working. At least I could retrieve a file with http6 2011-10-13 01:22:56 +02:00
Vladimir 'phcoder' Serbinenko
7c006811f8 more ipv6 code. Now ipv6 ping succeeds 2011-10-12 23:15:02 +02:00
Vladimir 'phcoder' Serbinenko
a53cf6534d some more ipv6 code 2011-10-12 10:20:55 +02:00
Robert Millan
a98f4a0808 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}.
2011-10-09 21:13:00 +02:00
Vladimir 'phcoder' Serbinenko
eb6a7b9788 Hopefully fix EFI problem. Not tested 2011-10-05 23:33:36 +02:00
Vladimir 'phcoder' Serbinenko
8530b00aa9 Fix compilation on 64-bit targets 2011-10-05 23:19:11 +02:00
Vladimir 'phcoder' Serbinenko
9aad3cd91d IPv6 support. Several fixes and unifications 2011-10-05 22:15:30 +02:00
Vladimir 'phcoder' Serbinenko
4f71e077b9 HTTP seek support. Various bugfixes. 2011-10-05 17:39:13 +02:00
Vladimir 'phcoder' Serbinenko
aa6b91afe9 merge mainline into net 2011-10-05 13:32:40 +02:00
Szymon Janc
709e61a55f merge trunk 2011-10-04 20:21:12 +02:00
Vladimir 'phcoder' Serbinenko
9305dd1a82 Some CS5536 code 2011-10-01 22:51:12 +02:00
Vladimir 'phcoder' Serbinenko
0a213f4cdb Move p2v and v2p to pci.h 2011-10-01 21:37:02 +02:00
Aleš Nesrsta
2f82ea948d EHCI implementation by Aleš Nesrsta. 2011-10-01 20:18:47 +02:00
Mario Limonciello
cca7ccd8ff Remove extra declaration of sleep for mingw32.
* util/misc.c (sleep) [__MINGW32__]: Removed.
	* include/grub/util/misc.h (sleep) [__MINGW32__]: Likewise.
2011-09-29 10:32:24 +02:00
Grégoire Sutre
e0b0dc837b Make knetbsd pass bootinfo bootdisk and bootwedge. 2011-09-28 23:45:57 +02:00
Szymon Janc
1f0e4eed6b * include/grub/file.h (grub_file_filter_id): Set
GRUB_FILE_FILTER_LZOPIO as GRUB_FILE_FILTER_COMPRESSION_LAST.
2011-08-22 09:18:22 +02:00
Szymon Janc
540c000f0d merge trunk 2011-08-20 09:49:15 +02:00
Vladimir 'phcoder' Serbinenko
f87abff538 * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
2011-08-19 23:11:09 +02:00
Vladimir 'phcoder' Serbinenko
d94497eaca * 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.
2011-08-19 23:08:36 +02:00
Vladimir 'phcoder' Serbinenko
0d1fd0113b * 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.
2011-08-19 23:04:18 +02:00
Vladimir 'phcoder' Serbinenko
1227c13390 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.
2011-08-19 22:56:49 +02:00
Vladimir 'phcoder' Serbinenko
14a2562cf7 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.
2011-08-19 22:46:11 +02:00
Szymon Janc
d6beefcfc9 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.
2011-08-17 19:40:25 +02:00
Szymon Janc
b2d7e331e2 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.
2011-08-14 11:41:19 +02:00
Szymon Janc
1f1a380be9 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.
2011-08-14 11:39:31 +02:00
Szymon Janc
99cecb4fc7 merge trunk 2011-08-13 15:00:48 +02:00
Robert Millan
66816d8556 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
2011-08-03 13:30:46 +02:00
Vladimir 'phcoder' Serbinenko
6795300e7f Support ATA disks with 4K sectors.
* include/grub/ata.h (grub_ata): New member log_sector_size.
	* grub-core/disk/ata.c (grub_ata_dumpinfo): Show sector size.
	(grub_ata_identify): Read sector size.
	(grub_ata_readwrite): Use log_sector_size rather than hardcoded value.
2011-07-25 08:14:34 +02:00
Vladimir 'phcoder' Serbinenko
6be1c01fd7 * include/grub/video.h: add missing EXPORT_FUND on
grub_video_edid_checksum and grub_video_edid_preferred_mode.
2011-07-23 17:18:31 +02:00
Vladimir 'phcoder' Serbinenko
a116743910 * include/grub/mips/kernel.h: Fix define conflict. 2011-07-23 17:14:38 +02:00
Vladimir 'phcoder' Serbinenko
80e722366d First attempt at http 2011-07-23 03:49:02 +02:00
Colin Watson
8fc4fa45c5 Preferred resolution detection for VBE.
* grub-core/video/video.c (grub_video_edid_checksum): New function.
(grub_video_edid_preferred_mode): Likewise.  Try EDID followed by
the Flat Panel extension, in line with the X.org VESA driver.
* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_flat_panel_info):
New function.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.
(grub_vbe_get_preferred_mode): Likewise.
(grub_video_vbe_setup): When the mode is "auto", try to get the
preferred mode from VBE, and use the largest mode that is no larger
than the preferred mode (some BIOSes expose a preferred mode that is
not in their mode list!).  If this fails, fall back to 640x480 as a
safe conservative choice.
(grub_video_vbe_get_edid): New function.
(grub_video_vbe_adapter): Add get_edid.
* include/grub/video.h (struct grub_vbe_edid_info): New structure.
(struct grub_video_adapter): Add get_edid.
(grub_video_edid_checksum): Add prototype.
(grub_video_edid_preferred_mode): Likewise.
* include/grub/i386/pc/vbe.h (struct grub_vbe_flat_panel_info): New
structure.

* grub-core/commands/videoinfo.c (print_edid): New function.
(grub_cmd_videoinfo): Print EDID if available.

* util/grub.d/00_header.in (GRUB_GFXMODE): Default to "auto".  This
is more appropriate on a wider range of platforms than 640x480.
* docs/grub.texi (Simple configuration): Update GRUB_GFXMODE
documentation.
2011-07-21 19:46:44 +01:00
Vladimir 'phcoder' Serbinenko
c410299b05 TCP listening support 2011-07-10 23:37:28 +02:00
Vladimir 'phcoder' Serbinenko
f4e6e2909b TCP fragmentation 2011-07-10 11:26:34 +02:00
Vladimir 'phcoder' Serbinenko
3a2e860334 TCP improvements 2011-07-10 09:52:08 +02:00
Vladimir 'phcoder' Serbinenko
3a7af37260 basic tcp implementation 2011-07-10 08:46:48 +02:00
Vladimir 'phcoder' Serbinenko
92bb3cfc17 Use priority queue to reassemble TFTP packets 2011-07-09 01:28:47 +02:00
Vladimir 'phcoder' Serbinenko
fecdbd6b17 support ip fragmentation 2011-07-09 00:27:27 +02:00
Vladimir 'phcoder' Serbinenko
e2955971a3 move packet allocation to recv code to allow bigger buffers 2011-07-08 20:38:12 +02:00
Vladimir 'phcoder' Serbinenko
6a1af81a97 add mtu information 2011-07-08 18:49:35 +02:00
Vladimir 'phcoder' Serbinenko
1367c143dd several cleanups. Ping reply support 2011-07-08 14:41:52 +02:00
Vladimir 'phcoder' Serbinenko
4db3461696 Priority queue implementation 2011-07-08 04:07:15 +02:00
Vladimir Serbinenko
a251b71915 LUKS and GELI support.
* Makefile.util.def (libgrubkern.a): Add grub-core/lib/crypto.c,
	grub-core/disk/luks.c, grub-core/disk/geli.c,
	grub-core/disk/cryptodisk.c, grub-core/disk/AFSplitter.c,
	grub-core/lib/pbkdf2.c, grub-core/commands/extcmd.c,
	grub-core/lib/arg.c.
	(libgrubmods.a): Remove gcrypts cflags and cppflags.
	Remove grub-core/commands/extcmd.c, grub-core/lib/arg.c,
	grub-core/lib/crypto.c, grub-core/lib/libgcrypt-grub/cipher/sha512.c,
	grub-core/lib/libgcrypt-grub/cipher/crc.c and grub-core/lib/pbkdf2.c.
	(grub-bin2h): Add libgcry.a.
	(grub-mkimage): Likewise.
	(grub-mkrelpath): Likewise.
	(grub-script-check): Likewise.
	(grub-editenv): Likewise.
	(grub-mkpasswd-pbkdf2): Likewise.
	(grub-pe2elf): Likewise.
	(grub-fstest): Likewise.
	(grub-mkfont): Likewise.
	(grub-mkdevicemap): Likewise.
	(grub-probe): Likewise.
	(grub-ofpath): Likewise.
	(grub-mklayout): Likewise.
	(example_unit_test): Likewise.
	(grub-menulst2cfg): Likewise.
	* autogen.sh (UTIL_DEFS): Add Makefile.utilgcry.def.
	* grub-core/Makefile.core.def (cryptodisk): New module.
	(luks): Likewise.
	(geli): Likewise.
	* grub-core/disk/AFSplitter.c: New file.
	* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/geli.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/kern/emu/getroot.c (get_dm_uuid): New function based on
	grub_util_is_lvm.
	(grub_util_get_dm_abstraction): New function.
	(grub_util_follow_gpart_up): Likewise.
	(grub_util_get_geom_abstraction): Likewise.
	(grub_util_get_dev_abstraction): Use new functions.
	(grub_util_pull_device): Pull GELI and LUKS.
	(grub_util_get_grub_dev): Handle LUKS and GELI.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): New function.
	(grub_util_biosdisk_open): Use grub_util_get_fd_sectors.
	(follow_geom_up): Removed.
	(grub_util_fd_seek): New function.
	(open_device): Use grub_util_fd_seek.
	(nread): Rename to ..
	(grub_util_fd_read): ... this. All users updated.
	* grub-core/lib/crypto.c (grub_crypto_ecb_decrypt): A better prototype.
	(grub_crypto_cbc_decrypt): Likewise.
	(grub_crypto_hmac_write): Likewise.
	(grub_crypto_hmac_buffer): Likewise.
	(grub_password_get): Extend to util.
	* include/grub/crypto.h (gcry_cipher_spec) [GRUB_UTIL]:
	New member modname.
	(gcry_md_spec) [GRUB_UTIL]: Likewise.
	* include/grub/cryptodisk.h: New file.
	* include/grub/disk.h (grub_disk_dev_id): Rename LUKS to CRYPTODISK.
	* include/grub/emu/getroot.h (grub_dev_abstraction_types): Add
	LUKS and GELI.
	(grub_util_follow_gpart_up): New proto.
	* include/grub/emu/hostdisk.h (grub_util_fd_seek): Likewise.
	(grub_util_fd_read): Likewise.
	(grub_cryptodisk_cheat_mount): Likewise.
	(grub_util_cryptodisk_print_uuid): Likewise.
	(grub_util_get_fd_sectors): Likewise.
	* util/grub-fstest.c (mount_crypt): New var.
	(fstest): Mount crypto if requested.
	(options): New option -C.
	(argp_parser): Parse -C.
	(main): Init and fini gcry.
	* util/grub-install.in: Support cryptodisk install.
	* util/grub-mkconfig.in: Export GRUB_ENABLE_CRYPTODISK.
	* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Support
	cryptodisk.
	(prepare_grub_to_access_device): Likewise.
	* util/grub-mkpasswd-pbkdf2.c (main): Use grub_password_get.
	* util/grub-probe.c (probe_partmap): Support cryptodisk UUID probe.
	(probe_cryptodisk_uuid): New function.
	(probe_abstraction): Likewise.
	(probe): Use new functions.
	* util/import_gcry.py: Create Makefile.utilgcry.def.
	Add modname member.

	Also-By: Michael Gorven <michael@gorven.za.net>

	Also-By: Clemens Fruhwirth <clemens@endorphin.org>
2011-07-07 23:52:58 +02:00
Vladimir 'phcoder' Serbinenko
0044d1db2e Simplify disk opening 2011-07-07 21:46:25 +02:00
Vladimir 'phcoder' Serbinenko
00542307eb merge mainline into lazy 2011-07-07 12:21:53 +02:00
Vladimir 'phcoder' Serbinenko
d1831ca48a Limit idle polling frequency 2011-07-06 18:21:07 +02:00
Vladimir 'phcoder' Serbinenko
138eeb3625 Move bootp into a separate file 2011-07-06 13:52:35 +02:00
Vladimir 'phcoder' Serbinenko
228ccedb5e poll cards when idle 2011-07-06 13:37:33 +02:00
Vladimir 'phcoder' Serbinenko
b975df6348 Send TFTP_ERROR on tftp premature close. Several cleanups 2011-07-06 12:53:37 +02:00
Vladimir 'phcoder' Serbinenko
d53bf34924 merge mainline into net 2011-07-06 01:35:41 +02:00
Vladimir 'phcoder' Serbinenko
93c06ff9c6 VGA text support in qemu-mips
* grub-core/Makefile.core.def (kernel): Add term/i386/pc/vga_text.c,
	term/i386/vga_common.c and kern/vga_init.c on qemu-mips.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init vga
	text.
	* grub-core/kern/i386/qemu/init.c: Renamed to ...
	* grub-core/kern/vga_init.c: ... this.
	* grub-core/kern/vga_init.c (VGA_ADDR) [__mips__]: Adjust.
	(grub_qemu_init_cirrus) [__mips__]: Skip PCI and adjust the I/O base.
	* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN) [__mips__]:
	Adjust.
	* include/grub/vga.h [GRUB_MACHINE_MIPS_QEMU_MIPS]: Declare
	GRUB_MACHINE_PCI_IO_BASE.
2011-07-05 23:46:15 +02:00
Vladimir 'phcoder' Serbinenko
d734599439 MIPS qemu at_keyboard support.
* gentpl.py (videoinkernel): Add qemu-mips.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add necessary headers.
	* grub-core/Makefile.core.def (kernel): Add at_keyboard and layout.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init new
	modules.
	* grub-core/term/at_keyboard.c (grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't consider original set.
	* grub-core/term/serial.c (grub_serial_register)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Make com0 explicitly active.
2011-07-05 21:00:01 +02:00
Vladimir 'phcoder' Serbinenko
145c7b4661 merge mainline into net 2011-07-05 20:40:39 +02:00
Vladimir 'phcoder' Serbinenko
a07a81b335 CMOS support on sparc.
* gentpl.py (cmos): Add powerpc and sparc.
	* grub-core/Makefile.core.def (datetime): Add lib/ieee1275/cmos.c on
	powerpc and sparc.
	* grub-core/lib/cmos_datetime.c (grub_get_datetime)
	[__powerpc__ || __sparc__]: Rename to grub_get_datetime_cmos.
	(grub_set_datetime) [__powerpc__ || __sparc__]: Likewise to
	grub_set_datetime_cmos.
	* grub-core/lib/ieee1275/cmos.c: New file.
	* grub-core/lib/ieee1275/datetime.c (no_ieee1275_rtc): New vaiable.
	(find_rtc): Set no_ieee1275_rtc on error.
	(grub_get_datetime): Call grub_get_datetime_cmos on error.
	(grub_set_datetime): Call grub_set_datetime_cmos on error.
	* include/grub/cmos.h (grub_cmos_read): Return grub_err_t since it may
	fail. Move value to argument. All users updated
	(grub_cmos_write): Likewise.
	(grub_cmos_read) [__powerpc__ || __sparc__]: Rewritten.
	(grub_cmos_write) [__powerpc__ || __sparc__]: Likewise.
	* include/grub/datetime.h [__powerpc__ || __sparc__]: Declare
	grub_get_datetime_cmos and grub_set_datetime_cmos.
2011-07-05 20:24:20 +02:00
Vladimir 'phcoder' Serbinenko
0bc2cd0f82 Reintroduce open/close of net cards. Clean up ofnet. 2011-07-05 16:37:14 +02:00
Vladimir 'phcoder' Serbinenko
382077365b Fix mod_gap definition 2011-07-05 15:10:47 +02:00
Vladimir 'phcoder' Serbinenko
671a78acb0 cleanup pxe and efi network release 2011-07-05 14:34:10 +02:00
Vladimir 'phcoder' Serbinenko
7e0c2d162a Restructurisations, cleanups and few bugfixes 2011-07-02 22:13:33 +02:00
Vladimir 'phcoder' Serbinenko
c4d038f632 Don't react to adressed bootp packets unless in bootp transaction 2011-07-02 20:11:29 +02:00
Vladimir 'phcoder' Serbinenko
0c51bb63c5 add missing brackets in efi_wrap macroses 2011-07-02 18:57:24 +02:00
Vladimir 'phcoder' Serbinenko
03a0046581 merge mainline into net 2011-07-02 18:52:50 +02:00
Vladimir 'phcoder' Serbinenko
6708faafde Fix broken blksize negotiation, fix broken seek and change a way net device is filled n i386-pc 2011-07-02 17:58:23 +02:00
Vladimir 'phcoder' Serbinenko
cae730b452 Automatically determine prefix when netbooted on EFI 2011-07-02 16:56:35 +02:00
Vladimir 'phcoder' Serbinenko
574618a2e9 unify prefix handling across platforms 2011-07-02 14:09:36 +02:00
Vladimir 'phcoder' Serbinenko
5ebaad7eec * include/grub/loader.h (grub_loader_unregister_preboot_hook): Export. 2011-06-27 12:28:47 +02:00
Vladimir 'phcoder' Serbinenko
9fc9ce3795 Coreboot video support.
* grub-core/Makefile.core.def (vga): Extend to coreboot and multiboot.
	(vbe): Likewise.
	* grub-core/kern/i386/coreboot/startup.S: Include int.S.
	* grub-core/kern/i386/pc/startup.S (grub_bios_interrupt): Moved from
	here ...
	* grub-core/kern/i386/int.S: ... here.
	* grub-core/video/i386/pc/vbe.c: Updated includes.
	* grub-core/video/i386/pc/vga.c: Likewise.
	* include/grub/i386/coreboot/memory.h
	(GRUB_MEMORY_MACHINE_SCRATCH_ADDR): New definition.
	(GRUB_MEMORY_MACHINE_SCRATCH_SEG): Likewise.
	(GRUB_MEMORY_MACHINE_SCRATCH_SIZE): Likewise.
	* include/grub/i386/pc/int.h (GRUB_CPU_INT_FLAGS_DEFAULT) [!PCBIOS]:
	Disable interrupts.
	* include/grub/i386/pc/vga.h: Removed. All users updated.
2011-06-27 08:54:55 +02:00
Vladimir 'phcoder' Serbinenko
9d22909b85 efinet support 2011-06-26 22:42:04 +02:00
Vladimir 'phcoder' Serbinenko
d36f20db46 Don't do unaligned access when parsing DHCP packet 2011-06-26 22:37:19 +02:00
Vladimir 'phcoder' Serbinenko
80ca250565 Add backward compatibiulity with old (pxe) syntax. Several cleanups 2011-06-26 17:06:18 +02:00
Manoel Rebelo Abranches
90162423e9 Network infrastructure.
The ARP protocol was made by Paulo Pinatti <ppinatti@br.ibm.com>

	* include/grub/net/arp.h: New file.
	* include/grub/net/device.h: Likewise.
	* include/grub/net/ethernet.h: Likewise.
	* include/grub/net/ip.h: Likewise.
	* include/grub/net/netbuff.h: Likewise.
	* include/grub/net/tftp.h: Likewise.
	* include/grub/net/udp.h: Likewise.
	* include/grub/ieee1275/ofnet.h: Likewise.
	* include/grub/emu/export.h: Likewise.
	* include/grub/net.h: Likewise.
	* grub-core/net/arp.c: Likewise.
	* grub-core/net/ethernet.c: Likewise.
	* grub-core/net/ip.c: Likewise.
	* grub-core/net/udp.c: Likewise.
	* grub-core/net/tftp.c: Likewise.
	* grub-core/net/netbuff.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/net/drivers/emu/emunet.c: Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c: Likewise.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add net.h, ofnet.h and
	export.h.
	* grub-core/Makefile.core.def (net): New module.
	(tftp): Likewise.
	(ofnet): Likewise.
	(emunet): Likewise.
	* grub-core/commands/ls.c (grub_ls_list_devices) [!GRUB_UTIL]: List
	network protocols.
	* grub-core/kern/device.c (grub_net_open) : New variable.
	(grub_device_open): Handle network device.
	(grub_device_close): Likewise.
	* grub-core/kern/file.c (grub_file_net_seek) : New variable.
	(grub_grubnet_fini): Likewise.
	(grub_file_seek): Seek in network device.
	* grub-core/kern/fs.c (grub_fs_probe): Handle network devices.
	* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix): Handle
	network root.
	(grub_machine_fini): Call grub_grubnet_fini.
	* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Handle
	network.
	(grub_ieee1275_get_aliasdevname): New function.
	* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
	Add unofficial Solaris network info.
	(grub_multiboot_make_mbi): Likewise.
	* grub-core/fs/i386/pc/pxe.c: Moved from here ...
	* grub-core/net/i386/pc/pxe.c: ...here. Adapted for new design.
	* include/grub/device.h (grub_fs): Removed.
	* include/grub/err.h (grub_err_t): Add network-related values.
	* include/grub/i386/pc/pxe.h: Removed bootp parts.
	* include/grub/ieee1275/ieee1275.h (grub_ofnetcard_data): New struct.
	(grub_ieee1275_get_aliasdevname): New proto.
	* include/grub/net.h: Rewritten.

	Also-By: Paulo Pinatti <ppinatti@br.ibm.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-06-24 22:16:05 +02:00
Vladimir 'phcoder' Serbinenko
a057797f18 merge mine and abranches' branches. Fix several issues 2011-06-24 21:51:57 +02:00
Vladimir 'phcoder' Serbinenko
8b51fd98b9 bootp support 2011-06-24 20:35:25 +02:00
Vladimir 'phcoder' Serbinenko
290766fb77 ZFS zlib support
* grub-core/fs/zfs/zfs.c (zlib_decompress): New function.
	(decomp_table): Add zlib entries.
	(zio_read): USe 8 bits for compression function rather than 3.
	* include/grub/zfs/zio.h (zio_compress): Add zlib values.
2011-06-24 00:31:29 +02:00
Vladimir 'phcoder' Serbinenko
005dd67cb6 * grub-core/disk/ahci.c: Add missing license statements.
* grub-core/fs/romfs.c: Likewise.
	* grub-core/lib/ia64/setjmp.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: Likewise.
	* grub-core/loader/ia64/efi/linux.c: Likewise.
	* grub-core/video/colors.c: Likewise.
	* include/grub/dl.h (GRUB_MOD_DEP): New macro.
2011-06-24 00:29:21 +02:00
Vladimir 'phcoder' Serbinenko
5ab3f48a92 AHCI support.
* grub-core/Makefile.core.def (ata_pthru): Removed.
	(ahci): New module.
	(pata): Likewise.
	* grub-core/bus/usb/ohci.c (GRUB_MOD_FINI): Unregister preboot hook
	on unload.
	* grub-core/commands/hdparm.c (grub_hdparm_do_ata_cmd): Use ATA
	readwrite.
	(grub_hdparm_do_check_powermode_cmd): Likewise.
	(grub_hdparm_do_smart_cmd): Likewise.
	(grub_hdparm_set_val_cmd): Likewise.
	(grub_cmd_hdparm): Likewise. Check thta we have an ATA device.
	* grub-core/disk/ahci.c: New file.
	* grub-core/disk/ata.c: Factor out the low-level part into ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/ata_pthru.c: Contents moved to ...
	* grub-core/disk/pata.c: ... here.
	* grub-core/disk/scsi.c (grub_scsi_names): New array.
	(grub_scsi_iterate): Use grub_scsi_names.
	(grub_scsi_open): Likewise.
	* grub-core/kern/disk.c (grub_disk_ata_pass_through): Removed.
	* include/grub/ata.h (grub_ata_commands): Add DMA commands.
	(grub_ata_regs_t): New struct.
	(grub_disk_ata_pass_through_parms): Likewise.
	(grub_ata_device): Renamed to ...
	(grub_ata): ... this.
	(grub_ata_dev): New struct.
	Removed all low-level inline functions.
	* include/grub/scsi.h: Add PATA and AHCI subsystems.
	(grub_scsi_dev): Removed 'name' and 'id'. Added 'id' parameter to
	iterate hooks and open. All users updated.
	* util/grub-install.in: Handle AHCI disk module.
2011-06-24 00:07:55 +02:00
Vladimir 'phcoder' Serbinenko
a5edbcb3a1 merge mainline into 4096 2011-06-23 04:08:37 +02:00
Manoel R. Abranches
d6d205568f Close cards before boot. 2011-06-18 20:18:25 -03:00
Manoel R. Abranches
85fd555441 Merge Mainline. 2011-05-27 00:23:33 -03:00
Manoel R. Abranches
7dd64f1236 Use a net fs struct to handle open, reand and close in file. 2011-05-27 00:22:35 -03:00
Manoel Rebelo Abranches
f42313bdb0 Remove unused structs and functions. 2011-05-25 11:10:48 -03:00
Vladimir 'phcoder' Serbinenko
eea841440d fix several bugs 2011-05-19 15:39:34 +02:00
Colin Watson
e806ce60ee merge trunk 2011-05-18 16:53:36 +01:00
Vladimir 'phcoder' Serbinenko
bf947d36e3 Use full 64-bit division.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
	(grub_divmod64): ... this.
	* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
	version.
2011-05-18 15:35:19 +02:00
Colin Watson
e2965f4a32 Move gfxmenu color handling to video, so that gfxterm can use it
too.

* grub-core/gfxmenu/named_colors.c: Move to ...
* grub-core/video/colors.c: ... here.  Rename
grub_gui_get_named_color to grub_video_get_named_color.
* grub-core/gfxmenu/gui_string_util.c (my_isxdigit): Move to ...
* grub-core/video/colors.c (my_isxdigit): ... here.
* grub-core/gfxmenu/gui_string_util.c (parse_hex_color_component):
Move to ...
* grub-core/video/colors.c (parse_hex_color_component): ... here.
* grub-core/gfxmenu/gui_string_util.c (grub_gui_parse_color): Move
to ...
* grub-core/video/colors.c (grub_video_parse_color): ... here.

* include/grub/gui.h (grub_gui_color_t): Move to ...
* include/grub/video.h (grub_video_rgba_color_t): ... here.
* include/grub/gui.h (grub_gui_color_rgb): Move to ...
* include/grub/video.h (grub_video_rgba_color_rgb): ... here.
* include/grub/gui.h (grub_gui_map_color): Move to ...
* include/grub/video.h (grub_video_map_rgba_color): ... here.
* include/grub/gui_string_util.h (grub_gui_get_named_color): Move
to ...
* include/grub/video.h (grub_video_get_named_color): ... here.
* include/grub/gui_string_util.h (grub_gui_parse_color): Move to ...
* include/grub/video.h (grub_video_parse_color): ... here.

* grub-core/Makefile.core.def (kernel) [videoinkernel]: Add
video/colors.c.
(gfxmenu): Remove gfxmenu/named_colors.c.
(video) [videomodules]: Add video/colors.c.

Add a background_color command.

* grub-core/term/gfxterm.c (grub_gfxterm_background_color_cmd): New
function.
(GRUB_MOD_INIT): Register background_color command.
(GRUB_MOD_FINI): Unregister background_color command.
(redraw_screen_rect): Allow blend/replace of text layer to be
controlled independently from whether there is a background bitmap.
(grub_gfxterm_background_image_cmd): Change blend_text_bg when
changing bitmap.
2011-05-18 12:44:24 +01:00
Vladimir 'phcoder' Serbinenko
1e4b43901a * grub-core/fs/fat.c: Include grub/fat.h.
(grub_fat_bpb): Moved to ...
	* include/grub/fat.h (grub_fat_bpb): ... here. New file.
	* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
	grub/ntfs.h.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
	Moved from here...
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
	here.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
	New function.
	(grub_chainloader_cmd): Patch BPB if --bpb is given.
	(GRUB_MOD_INIT): Show --bpb.
	* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
	* grub-core/normal/main.c (features): New variable.
	(GRUB_MOD_INIT): Set feature_* variables.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
	proto.
	* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
2011-05-18 12:48:14 +02:00
Vladimir 'phcoder' Serbinenko
69b11a560c add missing file 2011-05-18 12:41:22 +02:00
Vladimir 'phcoder' Serbinenko
548937c6d6 merge mainline into ahci 2011-05-18 12:36:26 +02:00
Vladimir 'phcoder' Serbinenko
e3a1073fd2 FreeDOS direct loading support.
* docs/grub.texi (Supported OS): Add FreeDOS.
	* grub-core/Makefile.core.def (freedos): New module.
	* grub-core/lib/i386/relocator.c (grub_relocator16_ebx): New extern
	variable.
	(grub_relocator16_boot): Handle %ebx.
	* grub-core/lib/i386/relocator16.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: New file.
2011-05-18 12:15:16 +02:00
Vladimir 'phcoder' Serbinenko
05caa461e8 Long Linux command line support.
* grub-core/loader/i386/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(maximal_cmdline_size): New variable.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* grub-core/loader/i386/pc/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* include/grub/i386/linux.h (GRUB_LINUX_SETUP_MOVE_SIZE): Removed.
	(linux_kernel_header): Add fields kernel_alignment, relocatable, pad
	and cmdline_size.
2011-05-18 09:56:33 +02:00
Vladimir Serbinenko
a2491e235c Improve devmapper support
* grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Removed.
	(grub_util_is_lvm): New function.
	(grub_util_get_dev_abstraction): Assume dmraid if not lvm rather
	than lvm if not dmraid.
	Handle mapped md nodes.
	* grub-core/kern/emu/hostdisk.c (device_is_mapped): Rename to ...
	(grub_util_device_is_mapped): ... this. Make always available. All users
	updated.
	(grub_util_get_dm_node_linear_info) [HAVE_DEVICE_MAPPER]: New function.
	(convert_system_partition_to_system_disk): Handle lvm, mpath and
	dmraid nodes.
	* include/grub/emu/misc.h (grub_util_device_is_mapped): New proto.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-18 09:35:47 +02:00
Vladimir 'phcoder' Serbinenko
b772baedcd Reduce memory footprint on SGI by putting modules before the kernel
as opposed to after.

	* grub-core/Makefile.core.def (kernel): Increase linking address.
	(none_decompress): Likewise.
	(xz_decompress): Likewise.
	* grub-core/boot/mips/startup_raw.S: Use prewritten uncompression
	address.
	* grub-core/kern/mips/arc/init.c (grub_machine_init): Handle memory
	layout change.
	(grub_arch_modules_addr): New function.
	* grub-core/kern/mips/init.c (grub_arch_modules_addr): Moved from here...
	* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): .. here
	* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr): ... and
	here.
	* grub-core/kern/mips/startup.S (total_size): Rename to ...
	(grub_total_modules_size): ... this. Make global.
	[GRUB_MACHINE_ARC]: Don't attempt to move modules out of the bss.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_LOONGSON_UNCOMPRESSED_ADDR):
	New definition.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR): Likewise.
	(GRUB_KERNEL_MIPS_ARC_LINK_ADDR): Increased.
	* util/grub-mkimage.c (image_target_desc): New flag
	PLATFORM_FLAGS_MODULES_BEFORE_KERNEL.
	(image_targets): Set PLATFORM_FLAGS_MODULES_BEFORE_KERNEL on mips-arc.
	(generate_image): Handle images with modules before kernel.
2011-05-17 21:15:54 +02:00
Vladimir 'phcoder' Serbinenko
566a191715 Prevent potential loss of memory map by overwrite on qemu-mips.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	Save ram size in $s4.
	* grub-core/kern/mips/qemu_mips/init.c (RAMSIZE): Removed.
	All users changed to grub_arch_memsize.
	* grub-core/kern/mips/startup.S (grub_arch_machine): Restrict to
	Loongson.
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Save grub_arch_memsize.
	* grub-core/loader/mips/linux.c (grub_linux_boot): Pass memory size.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): New
	external variable.
2011-05-17 19:32:51 +02:00
Vladimir 'phcoder' Serbinenko
3666d5f636 merge mainline and various cleanups 2011-05-17 14:02:18 +02:00
Vladimir 'phcoder' Serbinenko
400b93718f SGI ARCS port.
* Makefile.util.def (libgrubmods.a): Add dvh.c.
	* conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips
	platforms.
	* configure.ac: New target mips-arc.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	(xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR.
	(none_decompress): Likewise.
	(lsdev): New module.
	(datetime): Use lib/arc/datetime.c on ARC.
	(part_dvh): New module.
	* grub-core/commands/arc/lsdev.c: New file.
	* grub-core/disk/arc/arcdisk.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte
	aligned addresses.
	* grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian
	support.
	(grub_arch_dl_relocate_symbols): Likewise.
	* grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here...
	* grub-core/kern/mips/init.c (grub_get_rtc): ... here.
	* grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all
	platforms.
	* grub-core/lib/arc/datetime.c: New file.
	* grub-core/loader/mips/linux.c: Always include time.h. Don't include
	pci.h on non-loongson.
	(envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove.
	(grub_linux_boot): Set unused registers to 0.
	(grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp.
	* grub-core/mmap/mips/loongson/uppermem.c: Moved from here ...
	* grub-core/mmap/mips/uppermem.c: ...here.
	* grub-core/partmap/dvh.c: New file.
	* grub-core/term/arc/console.c: Likewise.
	* grub-core/term/terminfo.c (ANSI_C0_STR): New const.
	(grub_terminfo_set_current): Add terminal "arc".
	(grub_terminfo_readkey): Support ARC sequences.
	* include/grub/arc/arc.h: New file.
	* include/grub/arc/console.h: Likewise.
	* include/grub/disk.h (grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_ARCDISK_ID.
	* include/grub/mips/arc/kernel.h: New file.
	* include/grub/mips/arc/memory.h: Likewise.
	* include/grub/mips/arc/time.h: Likewise.
	* include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ...
	* include/grub/mips/kernel.h (grub_halt): ... here.
	* include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from
	here...
	* include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here.
	(GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ...
	* include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here
	* include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant
	proto.
	* include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved
	from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here.
	(GRUB_ARCH_LOWMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here.
	(GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here.
	(GRUB_ARCH_HIGHMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here.
	(grub_phys_addr_t): Moved from here ...
	* include/grub/mips/memory.h (grub_phys_addr_t): ... here.
	(grub_vtop): Moved from here ...
	* include/grub/mips/memory.h (grub_vtop): ... here.
	(grub_map_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_map_memory): ... here.
	(grub_unmap_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_unmap_memory): ... here.
	(grub_machine_mmap_iterate): Moved from here ...
	* include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here.
	(grub_mmap_get_lower): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_lower): ... here.
	(grub_mmap_get_upper): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_upper): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_get_rtc): Moved from
	here ...
	* include/grub/mips/time.h (grub_get_rtc): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from
	here ...
	* include/grub/mips/time.h (grub_cpu_idle): ... here.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New
	definition.
	(GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise.
	(GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise.
	(GRUB_MACHINE_LINK_ADDR): Likewise.
	* include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased
	to 6.
	* util/grub-install.in: Run dvhtool on ARC.
	* util/grub-mkimage.c (image_targets): Add mips-arc.
2011-05-17 09:17:38 +02:00
Vladimir 'phcoder' Serbinenko
0670a9751b merge mainline into ahci 2011-05-16 17:17:04 +02:00
Vladimir 'phcoder' Serbinenko
ff44d107ad Skip incorrect USB devices.
* grub-core/bus/usb/usb.c (grub_usb_device_initialize): Fail if
	configcnt == 0.
	* include/grub/usb.h (grub_usb_err_t): New enum value
	GRUB_USB_ERR_BADDEVICE.
2011-05-16 02:39:25 +02:00
Vladimir 'phcoder' Serbinenko
736e0ade54 Fuloong video init support.
* include/grub/vga.h (grub_vga_write_arx): inb monochrome address as
	well.
	(grub_vga_read_arx): New function.
	* grub-core/video/sis315pro.c (GRUB_SIS315PRO_MMIO_SPACE): New
	definition.
	(framebuffer): New members io, mmioptr and mmiobase.
	(read_sis_cmd): New function.
	(write_sis_cmd): Likewise.
	(grub_video_sis315pro_setup): Do the initialisation. Use 640x480
	rather than 640x400.
	* grub-core/video/sis315_init.c: New file.
2011-05-16 02:34:58 +02:00
Vladimir 'phcoder' Serbinenko
b756f75f07 Several FS mtime support.
* grub-core/fs/affs.c (grub_affs_time): New struct.
	(grub_affs_file): New field mtime.
	(grub_fshelp_node): Changed 'block' and 'parent' to more appropriate
	type. Removed 'size'. New field 'di'. All users updated.
	(grub_affs_mount): Simplify checsum checking.
	(grub_affs_iterate_dir): New helper grub_affs_create_node.
	(grub_affs_dir): Handle mtime.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'.
	(grub_hfs_filerec): New field mtime.
	(grub_hfs_dir): Handle mtime.
	(grub_hfs_mtime): New function.
	(grub_hfs_fs): Register grub_hfs_mtime.
	* grub-core/fs/iso9660.c (grub_iso9660_date2): New struct.
	(grub_iso9660_dir): New field mtime.
	(grub_fshelp_node): New field dirent.
	(iso9660_to_unixtime): New function.
	(iso9660_to_unixtime2): Likewise.
	(grub_iso9660_read_symlink): Use node->dirent.
	(grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_dir): Set mtime.
	(grub_iso9660_mtime): New function.
	(grub_iso9660_fs): Register grub_iso9660_mtime.
	* grub-core/fs/jfs.c (grub_jfs_time): New struct.
	(grub_jfs_inode): New fields atime, ctime and mtime.
	(grub_jfs_dir): Set mtime.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/ntfs.c (list_file): Set mtime.
	(grub_ntfs_dir): Likewise.
	* grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'.
	(grub_reiserfs_iterate_dir): Set mtime.
	(grub_reiserfs_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_obj): New field mtime.
	(grub_fshelp_node): Likewise.
	(grub_sfs_iterate_dir): Set mtime.
	(grub_sfs_dir): Likewise.
	* grub-core/fs/udf.c (grub_udf_dir): Set mtime.
	* grub-core/fs/xfs.c (grub_xfs_time): New struct.
	(grub_xfs_inode): New fields atime, mtime, ctime.
	(grub_xfs_dir): Set mtime.
	* include/grub/datetime.h (grub_datetime2unixtime): New function.
	* include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime.
	* include/grub/ntfs.h (grub_fshelp_node): New field mtime.

	Support UDF symlinks.

	* grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks.
	(grub_ufs_read_symlink): New function. All users updated.

	Check amiga partmap checksum.

	* grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes.
	(grub_amiga_partition): Likewise.
	(amiga_partition_map_checksum): New function.
	(amiga_partition_map_iterate): Check checksum.
2011-05-15 12:23:54 +02:00
Vladimir 'phcoder' Serbinenko
d4680a3556 Squashfs v4 support.
* Makefile.util.def (libgrubmods.a): Add squash4.
	* grub-core/Makefile.core.def (squash4): New module.
	* grub-core/fs/squash4.c: New file.
	* grub-core/io/gzio.c (grub_gzio): New members disk_input_off,
	disk_input_start, disk_input.
	(get_byte): Handle disk_input.
	(grub_zlib_disk_read): New function.
	* include/grub/deflate.h (grub_zlib_disk_read): New proto.
2011-05-15 11:58:22 +02:00
Tristan Gingold
32297d5ff7 IA64 support.
* Makefile.util.def (libgrubmods.a): Add grub-core/kern/ia64/dl_helper.c
	* configure.ac: Add ia64-efi target.
	Probe for __ia64_trampoline, __udivsi3, __umoddi3, __udivdi3,
	__divsi3, __modsi3, __umodsi3, __moddi3 and __divdi3 symbols.
	* gentpl.py: Add ia64_efi platform.
	Rename x86_efi to efi and Add ia64-efi. All users updated.
	* grub-core/Makefile.am: Set KERNEL_HEADER_FILES for ia64-efi.
	* grub-core/Makefile.core.def (kernel.img): Add compile flags for ia64.
	Remove kern/generic/rtc_get_time_ms.c on EFI.
	Add kern/ia64/efi/startup.S, kern/ia64/efi/init.c, kern/ia64/dl.c,
	kern/ia64/dl_helper.c on ia64-efi.
	Add kern/emu/cache.c on emu.
	(linux): Use on loader/ia64/efi/linux.c on ia64.
	* grub-core/gensymlist.sh (grub_register_exported_symbols): Check
	whether symbol is a function.
	* grub-core/kern/dl.c [GRUB_MACHINE_EMU]: Include sys/mman.h.
	(grub_symbol): New field 'isfunc'.
	(grub_dl_resolve_symbol): Return whole symbol rather than just address.
	(grub_dl_register_symbol): New argument 'isfunc'. All users updated.
	(grub_dl_load_segments): Place all sections into the same region.
	[__ia64__]: Create trampolines and got.
	[GRUB_MACHINE_EMU]: Call mprotect.
	(grub_dl_resolve_symbols): Resolve symbol type as well.
	[__ia64__]: Create function descriptors.
	* grub-core/kern/efi/efi.c (grub_get_rtc): Renamed to ...
	(grub_rtc_get_time_ms): ... this. Expressions simplified.
	(grub_get_rtc): New function.
	* grub-core/kern/emu/cache.c [__ia64__]: New file.
	* grub-core/kern/emu/cache.S: Renamed to ...
	* grub-core/kern/emu/cache_s.S: ... this.
	[__ia64__]: Add a nop.
	* grub-core/kern/emu/full.c (grub_arch_dl_get_tramp_got_size)
	[__ia64__]: New function.
	* grub-core/kern/emu/lite.c [__ia64__]: Include ../ia64/dl.c.
	* grub-core/kern/ia64/dl.c: New file.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/ia64/efi/init.c: New file.
	* grub-core/kern/ia64/efi/startup.S: Likewise.
	* grub-core/lib/efi/halt.c [__ia64__]: Don't try acpi.
	* grub-core/lib/ia64/longjmp.S: New file (from glibc).
	* grub-core/lib/ia64/setjmp.S: Likewise (from glibc).
	* grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/setjmp.S.
	* grub-core/loader/ia64/efi/linux.c: New file.
	* include/grub/dl.h (GRUB_MOD_NAME): Redefined using C rather than asm.
	(GRUB_MOD_DEP): Likewise.
	(grub_dl) [__ia64__]: New fields got and tramp.
	(grub_dl): New field 'base'.
	(grub_dl_register_symbol): New argument isfunc. All users updated.
	(GRUB_IA64_DL_TRAMP_ALIGN): New definition.
	(GRUB_IA64_DL_TRAMP_SIZE): Likewise.
	(GRUB_IA64_DL_GOT_ALIGN): Likewise.
	(grub_ia64_dl_get_tramp_got_size): New proto.
	(GRUB_ARCH_DL_TRAMP_ALIGN) [__ia64__]: Likewise
	(GRUB_ARCH_DL_GOT_ALIGN) [__ia64__]: Likewise
	(grub_arch_dl_get_tramp_got_size) [__ia64__]: Likewise
	* include/grub/efi/api.h: Skip call wrappers on ia64.
	* include/grub/efi/pe32.h (GRUB_PE32_MACHINE_IA64): New definition.
	* include/grub/efi/time.h (GRUB_TICKS_PER_SECOND): Change to 1000.
	* include/grub/elf.h (ELF_ST_INFO): New definition.
	* include/grub/ia64/efi/kernel.h: New file.
	* include/grub/ia64/efi/memory.h: Likewise.
	* include/grub/ia64/efi/time.h: Likewise.
	* include/grub/ia64/kernel.h: Likewise.
	* include/grub/ia64/setjmp.h: Likewise (from glibc).
	* include/grub/ia64/time.h: New file.
	* include/grub/ia64/types.h: Likewise.
	* include/grub/libgcc.h (__udivsi3, __umodsi3, __umoddi3, __udivdi3,
	__moddi3, __divdi3, __divsi3, __modsi3, __ia64_trampoline):
	New protos.
	* include/grub/offsets.h (GRUB_KERNEL_IA64_EFI_PREFIX): New definition.
	(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
	* include/grub/types.h (PRIxGRUB_ADDR): Likewise.
	* util/grub-mkimage.c (image_target_desc): New field pe_target.
	All users updated.
	(EFI64_HEADER_SIZE): New definition. All users updated.
	(image_targets): Add ia64-efi.
	* util/grub-mkimagexx.c (relocate_symbols): New arguments jumpers and
	jumpers_addr. All users updated.
	Create function descriptors.
	(count_funcs): New function.
	(unaligned_uint32): New struct.
	(MASK20): New definition.
	(MASK19): Likewise.
	(MASKF21): Likewise.
	(add_value_to_slot_20b): New function.
	(add_value_to_slot_21_real): Likewise.
	(add_value_to_slot_21): Likewise.
	(ia64_kernel_trampoline): New struct.
	(nopm): New variable.
	(jump): Likewise.
	(make_trampoline): New function.
	(relocate_addresses): Handle ia64.
	(make_reloc_section): Likewise.
	(load_image): Likewise.

	Also-By: Robert Millan <rmh.grub@aybabtu.com>

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-05-15 11:22:59 +02:00
Vladimir 'phcoder' Serbinenko
bee1aeb9a1 merge mainline into sgi 2011-05-15 02:23:36 +02:00
Vladimir 'phcoder' Serbinenko
5d063cdc10 Fuloong support.
* configure.ac: Rename yeeloong platform to loongson. All users updated.
	* grub-core/Makefile.core.def (fwstart_fuloong): New image.
	* grub-core/boot/mips/loongson/fuloong.S: New file.
	* grub-core/boot/mips/loongson/fwstart.S: Wait for CS5536 to come up.
	Explicitly init CS5536.
	[FULOONG]: Don't use serial until CS5536 is available.
	Set GPIO based on dumps.
	(serial_hw_init) [FULOONG]: Handle CS5536 parts.
	[FULOONG]: Handle GPIO and memory controller differences.
	Parse machine type in $a2.
	* grub-core/boot/mips/startup_raw.S: Determine and save the
	architecture.
	* grub-core/bus/cs5536.c (gpiodump): Move to fwstart.S.
	(grub_cs5536_init_geode): Remove gpio part. Conditionalise DIVIL
	init on architecture type.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
	SIS315E. Don't init at_keyboard on fuloong.
	(grub_halt): Support Fuloong.
	* grub-core/kern/mips/startup.S [LOONGSON]: Save $s7.
	* grub-core/loader/mips/linux.c (LOONGSON_MACHTYPE): Removed.
	(loongson_machtypes): New array.
	(grub_cmd_linux) [GRUB_MACHINE_MIPS_LOONGSON]: Pass the right machine
	type.
	* grub-core/term/ns8250.c (serial_get_divisor): New parameter port and
	config. All users updated. Handle CS5536 serial.
	* grub-core/term/serial.c (grub_serial_register): Conditionalise
	default port on machine type. Register serial as inactive.
	* grub-core/video/sis315pro.c: New file.
	* include/grub/cs5536.h (GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED): New
	definition.
	(GRUB_CS5536_MSR_MAILBOX_CONFIG): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART1_CONF): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART2_CONF): Likewise.
	* include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_SHUTDOWN_GPIO): Rename
	to ...
	(GRUB_CPU_YEELOONG_SHUTDOWN_GPIO): ... this.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_YEELOONG): New
	definition.
	(GRUB_ARCH_MACHINE_FULOONG): Likewise.
	(grub_arch_machine): New extern var.
	* include/grub/mips/loongson/serial.h
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200): ... this.
	(GRUB_MACHINE_SERIAL_PORT): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0): ... this.
	(GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200): New definition.
	(GRUB_MACHINE_SERIAL_PORT1): Likewise.
	(GRUB_MACHINE_SERIAL_PORT2): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS): Include ports 1 and 2.
	* include/grub/term.h (grub_term_register_input_inactive): New inline
	function.
	(grub_term_register_output_inactive): Likewise.
	* include/grub/video.h (grub_video_driver_id): New value
	GRUB_VIDEO_DRIVER_SIS315PRO.
	* util/grub-mkimage.c (image_target_desc): Rename name to dirname.
	New field "names". All users updated.
	New field value IMAGE_FULOONG_FLASH.
	(generate_image): USe separate fwstart hashes for yeeloong and fuloong.
2011-05-15 01:43:44 +02:00
Vladimir 'phcoder' Serbinenko
36084912c0 Give ATA device a bit more time on first try in order to allow disks
to spin up.

	* grub-core/disk/ata.c (grub_atapi_identify): Use GRUB_ATA_TOUT_DEV_INIT
	if dev->present is 1. Reset dev->present on failure.
	(grub_ata_device_initialize): Set dev->present to 1.
	* include/grub/ata.h (GRUB_ATA_TOUT_DEV_INIT): New value.
	(grub_ata_device): New member 'present'.
2011-05-13 21:41:18 +02:00
Vladimir 'phcoder' Serbinenko
19e1c41bbf Flush caches on DMA memory.
* grub-core/kern/mips/cache.S (grub_arch_sync_dma_caches): New function.
	* grub-core/bus/pci.c (grub_memalign_dma32): Flush caches.
	(grub_dma_free): Likewise.
	* include/grub/cache.h (grub_arch_sync_dma_caches): New declaration.
2011-05-13 20:56:50 +02:00
Vladimir 'phcoder' Serbinenko
96a29d188b Arc type cleanup 2011-05-13 18:03:20 +02:00
Vladimir 'phcoder' Serbinenko
ae6a81f0bb some additional key sequences for arc 2011-05-13 16:38:23 +02:00
Vladimir 'phcoder' Serbinenko
8906c3dd40 sgi support 2011-05-13 16:36:05 +02:00
Manoel R. Abranches
d8123bfb54 Correct some compile erros. 2011-05-12 13:20:43 -03:00
Manoel Rebelo Abranches
8db3b0eca9 Remove unused file 2011-05-10 14:08:18 -03:00
Vladimir 'phcoder' Serbinenko
7b58e65f24 track function symbols 2011-05-08 18:29:37 +02:00
Vladimir 'phcoder' Serbinenko
7216a1bff3 Set EFI ticks to 1000Hz simplifying much of the code and avoiding cotsly division 2011-05-08 17:05:47 +02:00
Vladimir 'phcoder' Serbinenko
5452733f35 more or less functional ia64 grub-mkimage 2011-05-08 12:39:08 +02:00
Manoel Rebelo Abranches
c5934345be Free memory when removing packet. 2011-05-06 14:03:51 -03:00
Manoel Rebelo Abranches
90eb90e24c Merge mainline. 2011-05-05 12:12:22 -03:00
Vladimir 'phcoder' Serbinenko
20a409405b Integrate geli into autoconfiguration system 2011-04-25 14:52:07 +02:00
Vladimir 'phcoder' Serbinenko
23432f6542 support UUID for geli 2011-04-24 21:11:14 +02:00
Vladimir 'phcoder' Serbinenko
171e2be183 geli xts support 2011-04-24 17:41:50 +02:00
Vladimir 'phcoder' Serbinenko
88ac3146d6 geli v5 (including rekeying support) 2011-04-24 17:15:55 +02:00
Vladimir 'phcoder' Serbinenko
3e90811d88 support non-512B sectors for geli 2011-04-24 14:59:38 +02:00
Vladimir 'phcoder' Serbinenko
572e3ea650 merge 4096 into luks 2011-04-24 03:12:06 +02:00
Vladimir 'phcoder' Serbinenko
848c83e75c add few necessarry const qualifiers for pointers 2011-04-24 02:38:42 +02:00
Vladimir 'phcoder' Serbinenko
1a1f408f20 geli support 2011-04-24 00:00:29 +02:00
Vladimir 'phcoder' Serbinenko
8585e54bec factor cryptodisk part out 2011-04-23 18:00:42 +02:00
Vladimir 'phcoder' Serbinenko
9d647e4e18 New -t luks_uuid 2011-04-22 23:51:16 +02:00
Vladimir 'phcoder' Serbinenko
50ad7d9cae luks grub-probe support 2011-04-22 23:39:36 +02:00
Vladimir 'phcoder' Serbinenko
24089d19e2 Add cheatmounting 2011-04-22 19:20:46 +02:00
Vladimir 'phcoder' Serbinenko
dcd73ec05e add gcry to utils 2011-04-22 19:04:21 +02:00
Vladimir 'phcoder' Serbinenko
0aaa85f1a0 merge lazy into luks 2011-04-22 15:13:12 +02:00
Vladimir 'phcoder' Serbinenko
4defebbec8 automatic raid members addition 2011-04-22 13:55:30 +02:00
Vladimir 'phcoder' Serbinenko
65b4742cd7 Add lost lvm/ prefix. Autoadd lvm subdevices. 2011-04-22 02:46:36 +02:00
Vladimir 'phcoder' Serbinenko
c0c837c10b merge devmapper into lazy 2011-04-22 01:21:26 +02:00
Vladimir 'phcoder' Serbinenko
5dad99b730 more linux-like name for LVM volumes 2011-04-22 01:10:24 +02:00
Vladimir 'phcoder' Serbinenko
24b905a11c Lazy LVM and RAID assembly 2011-04-22 00:09:07 +02:00
Vladimir 'phcoder' Serbinenko
a10e7a5a89 Support grub-probe -t drive 2011-04-21 12:39:31 +02:00
Colin Watson
1eb44ae37e merge trunk 2011-04-21 11:07:10 +01:00
Vladimir 'phcoder' Serbinenko
0c910e9626 merge devmapper into luks 2011-04-21 11:59:51 +02:00
Vladimir 'phcoder' Serbinenko
d97e7b5935 * include/grub/dl.h [ASM_FILE]: Adapt for assembly.
* grub-core/lib/i386/setjmp.S: Add missing GRUB_MOD_LICENSE.
	* grub-core/lib/x86_64/setjmp.S: Likewise.
	* grub-core/lib/mips/setjmp.S: Likewise.
	* grub-core/lib/powerpc/setjmp.S: Likewise.
	* grub-core/lib/sparc64/setjmp.S: Likewise.
2011-04-20 01:37:48 +02:00
Vladimir 'phcoder' Serbinenko
e8f28d4c0e * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):
New function.
	(grub_util_biosdisk_close): Use grub_util_biosdisk_flush.
	* include/grub/emu/hostdisk.h (grub_util_biosdisk_flush): New proto.
	* util/grub-setup.c (setup): Use grub_util_biosdisk_flush.
2011-04-19 22:39:14 +02:00
Vladimir 'phcoder' Serbinenko
abc474ef4b Take into account the decorations the computing menu entry width.
* grub-core/gfxmenu/widget-box.c (get_border_width): New function.
	(grub_gfxmenu_create_box): Register get_border_width.
	* grub-core/gfxmenu/gui_list.c (draw_menu): Use get_border_width
	if available.
	* include/grub/gfxwidgets.h (grub_gfxmenu_box): New member
	get_border_width.
2011-04-19 00:44:53 +02:00
Vladimir 'phcoder' Serbinenko
34faa5955a * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Support huge
chunks.
	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_BUG.
2011-04-18 23:10:19 +02:00
Vladimir 'phcoder' Serbinenko
93a777e388 Complete 64-bit division support.
* grub-core/kern/misc.c (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this. Support 64-bit divisor and reminder.
	* include/grub/misc.h (grub_divmod64): Rename to ...
	(grub_divmod64_full): ... this.
	(grub_divmod64): New inline function.
2011-04-18 23:03:52 +02:00
Vladimir 'phcoder' Serbinenko
fe6b2cbaa6 BtrFS support. Written by me (Vladimir) with important bugfixes and
even more important testing by Colin.

	* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
	* grub-core/Makefile.core.def (btrfs): Add crc.c.
	* grub-core/fs/btrfs.c: Stub replaced with real implementation.
	* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
	mem_input_off and mem_input. All users updated to accept in-RAM input.
	(gzio_seek): New function.
	(test_zlib_header): Likewise.
	(grub_gzio_read): Likewise.
	(grub_zlib_decompress): Likewise.
	* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
	Accept partial and non-virtual mounts.
	(grub_guess_root_device): Do rescanning after device_from_mountinfo to
	avoid receiving /dev/dm-X as device.
	* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
	Handle bind and partial mounts.
	* grub-core/lib/crc.c: New file.
	* include/grub/deflate.h: Likewise.
	* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
	proto.
	* include/grub/lib/crc.h: New file.
2011-04-11 23:26:41 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6 Implement automatic module license checking according to new GNU
guidelines.

	* grub-core/kern/dl.c (grub_dl_check_license): New function.
	(grub_dl_load_core): Use grub_dl_check_license.
	* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
	(GRUB_MOD_LICENSE): Likewise.
	(GRUB_MOD_DUAL_LICENSE): Likewise.
	All modules updated.
2011-04-11 23:01:51 +02:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e merge mainline into butter 2011-04-11 07:56:31 +02:00
Vladimir 'phcoder' Serbinenko
8b8a81fa6a Dynamically count the number of lines for the lower banner.
* grub-core/normal/menu_entry.c (per_term_screen): New member
	num_entries.
	(print_down): Use num_entries.
	(update_screen): Likewise.
	(grub_menu_entry_run): Set num_entries.
	* grub-core/normal/menu_text.c (menu_viewer_data): New member
	num_entries.
	(grub_print_message_indented): Move real part to ...
	(grub_print_message_indented_real): ... here. Additional argument
	dry_run.
	(draw_border): Additional argument num_entries.
	(print_message): Additional argument dry_run.
	(print_entries): Receive menu viewer data.
	(grub_menu_init_page): New argment num_entries.
	(menu_text_set_chosen_entry): Use num_entries.
	(grub_menu_try_text): Likewise.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument dry_run.
	All users updated.
	(grub_ucs4_count_lines): New function.
	* include/grub/term.h (grub_term_cursor_x): Moved from here ..
	* grub-core/normal/menu_text.c (grub_term_cursor_x): ... to here.
	* include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): Removed.
	(grub_term_border_height): Likewise.
	(grub_term_num_entries): Likewise.
2011-04-10 13:56:23 +02:00
Vladimir 'phcoder' Serbinenko
4ed4ce5820 correct Changelog spelling 2011-04-08 13:59:07 +02:00
Vladimir 'phcoder' Serbinenko
461121ffb3 * include/grub/fs.h (grub_dirhook_info): Use unsigned for 1-bit fields. 2011-04-06 14:01:12 +02:00
Vladimir 'phcoder' Serbinenko
665900a389 * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Let a bit more
space for older compilers.
	(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.
2011-04-06 12:33:46 +02:00
Vladimir 'phcoder' Serbinenko
b38a498394 BPB patching support (untested) 2011-04-05 14:40:15 +02:00
Vladimir 'phcoder' Serbinenko
850e937329 Increase LVM implementation robustness in order not to crash on
configurations like pvmove. Previously code assumed that in some places
	only lvs or only pvs are used whereas it seems that they are used
	interchangeably.

	* grub-core/disk/lvm.c (read_node): New function.
	(read_lv): Use read_node.
	(grub_lvm_scan_device): Use only first mirror on pvmove'd lvs.
	Match volumes only at the end when all lvs are found. Take both
	pvs (first) and lvs (second) into account.
	* include/grub/lvm.h (grub_lvm_segment): Merge fields stripe_* and
	mirror_* into node_*. All users updated.
	(grub_lvm_stripe): Merge this ...
	(grub_lvm_mirror): ... and this ...
	(grub_lvm_node): ... into this. All users updated.
2011-04-03 16:28:14 +02:00
Manoel Rebelo Abranches
25f1579b43 Adapt protocols to new network struct. 2011-04-01 05:42:34 -03:00
Manoel Rebelo Abranches
09375846b9 Add mtu to ieee1275 driver data. 2011-04-01 05:41:37 -03:00
Manoel Rebelo Abranches
59b361a2df Use bootp packet to set prefix and card address. 2011-04-01 05:39:06 -03:00
Manoel Rebelo Abranches
50ee5d686d Merge mainline. 2011-04-01 04:45:37 -03:00
Vladimir 'phcoder' Serbinenko
fc18f6a3cb * util/grub.d/10_linux.in: Skip vmlinux-* on x86 platforms. 2011-03-29 19:47:34 +02:00
Vladimir 'phcoder' Serbinenko
09573499ff Initial variable sector size support 2011-03-29 02:02:55 +02:00
Colin Watson
58ed62d221 Avoid consuming lots of space and time if the first partition is not near the start of the disk (Debian bug #619458, Ubuntu bug #691569). 2011-03-25 17:22:12 +00:00
Vladimir 'phcoder' Serbinenko
3f71cded81 * include/grub/mm.h (GRUB_MM_CHECK): Rename to ...
(grub_mm_check): ... this. MAke a function-like macro and use GRUB_FILE.
2011-03-24 12:43:28 +01:00
Vladimir 'phcoder' Serbinenko
54da1febce Rename mipsel-yeeloong to mipsel-loongson 2011-02-19 13:18:05 +01:00
Colin Watson
28f9509eb7 merge trunk 2011-02-17 14:51:11 +00:00
Vladimir 'phcoder' Serbinenko
028501a0e0 Workaround yet another IEEE1275 bug.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS.
	* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate): Ignore
	adress_cells and size:cells if GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS
	is set.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS on powermacs.
2011-02-12 10:22:55 +03:00
Colin Watson
7e735e4349 * include/grub/file.h (not_easly_seekable): Rename to ...
(not_easily_seekable): ... this.  Update all users.
2011-02-08 13:21:13 +00:00
Vladimir 'phcoder' Serbinenko
88906eaa69 Fix accidental disable of Geode UARTs 2011-01-24 01:46:00 +01:00
Vladimir 'phcoder' Serbinenko
9f7322f50e Add missing UART2 definitions 2011-01-24 00:47:36 +01:00
Vladimir 'phcoder' Serbinenko
0889c3401c Explicitly enable MSR mailbox 2011-01-23 21:56:00 +01:00
Vladimir 'phcoder' Serbinenko
99388e0cf8 Fuloong shutdown support 2011-01-18 19:39:12 +01:00
Vladimir 'phcoder' Serbinenko
74eea126f4 fuloong support 2011-01-18 15:28:44 +01:00
Vladimir 'phcoder' Serbinenko
01b08a0f15 initial SIS315PRO support 2011-01-18 13:44:16 +01:00
Colin Watson
9b300caf84 grub_video_get_edid is not usable from grub_vbe_get_preferred_mode, as a
video adapter has not necessarily yet been set.  Use grub_video_vbe_get_edid
and grub_video_edid_checksum directly instead.  Remove grub_video_get_edid
as it now has no users.
Reported by: Marjo Mercado.
2011-01-17 12:07:47 +00:00
Colin Watson
13fc463f17 Make new grub_vbe_bios_* functions static. 2011-01-15 14:18:16 -06:00
Vladimir 'phcoder' Serbinenko
f440c33fd2 Make qemu-mips compile again. Still no grub-mkimage support 2011-01-14 17:37:11 +01:00
Colin Watson
6b978c4f04 merge trunk 2011-01-11 10:00:45 -06:00
Vladimir 'phcoder' Serbinenko
4531a206a1 * grub-core/fs/i386/pc/pxe.c (set_mac_env): Export variable.
(set_env_limn_ro): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/hook/datehook.c (GRUB_MOD_INIT): Likewise. Change to
	ARRAY_SIZE while on it.
	(GRUB_MOD_FINI): Change to ARRAY_SIZE.
	* grub-core/normal/context.c (grub_env_export): Move from here ...
	* grub-core/kern/env.c (grub_env_export): ... here.
	* grub-core/normal/context.c (grub_cmd_export): Skip exporting root and
	prefix.
	* grub-core/kern/main.c (grub_main): Export root and prefix.
	* include/grub/env.h (grub_env_export): Export.
	Reported by: Seth Goldberg.
2011-01-11 11:51:05 +01:00
Vladimir 'phcoder' Serbinenko
3395fe5230 Pass more appropriate video id to Linux.
* grub-core/loader/i386/linux.c (grub_linux_setup_video): Use
	grub_video_get_driver_id and variable gfxpayloadforcelfb to
	fill have_vga.
	(grub_linux_boot): Rely on grub_linux_setup_video to fill have_vga and
	shift params->lfb_size.
	* include/grub/i386/linux.h: Make an enume out of have_vga values.
2011-01-11 00:02:01 +01:00
Vladimir 'phcoder' Serbinenko
dcb883b162 Submenu default support.
* grub-core/normal/menu.c (grub_menu_execute_entry): New parameter
	auto_boot. All users updated.
	Declared static.
	Handle chosen and default with submenus.
	(grub_menu_execute_with_fallback): Declared static.
	Don't notify failure if autobooted. Upper level does it.
	(menuentry_eq): New function.
	(get_entry_number): Use menuentry_eq.
	(show_menu): New parameter "autobooted". All users updated.
	(grub_show_menu): Likewise.
	* include/grub/normal.h (grub_show_menu): Likewise.
	* include/grub/menu.h (grub_menu_execute_entry): Removed.
	(grub_menu_execute_with_fallback): Likewise.
2011-01-10 23:27:58 +01:00
Vladimir 'phcoder' Serbinenko
4b07826647 partitioned mdraid support (untested) 2011-01-08 16:33:49 +01:00
Colin Watson
b7d86d53c4 merge trunk 2011-01-07 17:26:15 +00:00
Szymon Janc
25953e1055 Improve loaders' kernel command line handling.
* grub-core/lib/cmdline.c: New file.
	* include/grub/lib/cmdline.h: Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Use
	grub_create_loader_cmdline to create kernel command line.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/Makefile.core.def (linux16): Add lib/cmdline.c on i386_pc.
	(linux): Add lib/cmdline.c on common.
2011-01-07 17:09:39 +01:00
Vladimir 'phcoder' Serbinenko
b3f8d28ad0 Run terminfo_cls on initing terminfo output to clear the screen and
move the cursor to (0,0).

	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_init_output):
	Call grub_terminfo_output_init.
	* grub-core/term/serial.c (grub_serial_term_output): Set .init.
	* grub-core/term/terminfo.c (grub_terminfo_output_init): New function.
	* include/grub/terminfo.h (grub_terminfo_output_init): New declaration.
2011-01-05 12:23:06 +01:00
Vladimir 'phcoder' Serbinenko
18a38098ad The E820 type 5 is BADRAM, not EXEC_CODE.
* grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed.
	(GRUB_E820_BADRAM): New define.
	* grub-core/loader/i386/linux.c (grub_linux_boot): Translate code
	into reserved. Propagate BADRAM.
	* grub-core/loader/i386/bsd.c (GRUB_E820_EXEC_CODE): Removed.
	(GRUB_E820_BADRAM): New define.
2011-01-05 01:14:32 +01:00
Colin Watson
944404efb8 merge trunk 2011-01-04 15:41:07 +00:00
phcoder
bea3358389 First handling of ia64-efi in grub-mkimage 2011-01-03 13:46:36 +01:00
phcoder
c18271ed00 Fix compilation errors 2011-01-03 02:28:14 +01:00
Vladimir 'phcoder' Serbinenko
0718f66d12 Discard a bunch of junk code 2011-01-03 00:56:28 +01:00
phcoder
5faa440cb0 Discard several spurious differences from mainline 2011-01-03 00:47:21 +01:00
Vladimir 'phcoder' Serbinenko
0f35c665e6 merge mainline to ia64 2011-01-03 00:04:39 +01:00
Vladimir 'phcoder' Serbinenko
7edf63fce6 merge ia64-emu into ia64 2011-01-02 23:55:50 +01:00
phcoder
f49157dfe5 Restructure module loading and many fixes. Now normal.mod loads successfully 2011-01-02 23:30:25 +01:00
phcoder
73911575dd support for registering functions from modules (not tested yet) 2011-01-02 14:58:57 +01:00
phcoder
f9c30af6d0 Succesfully loaded return-only module on ia64-emu 2011-01-02 14:09:58 +01:00
Vladimir 'phcoder' Serbinenko
52f65ea0bc add moddi3 and divdi3 2011-01-01 15:28:39 +01:00
Vladimir 'phcoder' Serbinenko
3a04c65d00 Always add libgcc.h 2011-01-01 15:13:03 +01:00
Vladimir 'phcoder' Serbinenko
2f70097d3e merge mainline into filesys branch 2010-12-31 15:02:07 +01:00
Vladimir 'phcoder' Serbinenko
3d5f359d3b merge mainline into ahci 2010-12-26 11:20:12 +01:00
Vladimir 'phcoder' Serbinenko
b28fd807eb freedos support 2010-12-26 00:38:20 +01:00
Vladimir 'phcoder' Serbinenko
51f7e1acb7 DMA ATA commands support 2010-12-25 02:53:20 +01:00
Vladimir 'phcoder' Serbinenko
22a7cc9a6f fix 3rd argument to scsi_iterate 2010-12-24 17:09:56 +01:00
Vladimir 'phcoder' Serbinenko
de2690be7c merge mainline into ahci 2010-12-24 16:16:01 +01:00
Vladimir 'phcoder' Serbinenko
c7336d912c splitting generic ata from pata. 2010-12-24 16:07:53 +01:00
Colin Watson
e925b2b6d4 merge parse-color 2010-12-23 12:22:20 +00:00
Colin Watson
6d46121efb merge trunk 2010-12-23 12:20:48 +00:00
Colin Watson
1426ef3560 * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): The
previous patch increased the size of the RS code by 20 bytes (at
least with gcc-4.4), so increase this by 20 bytes to match.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.
2010-12-21 17:41:47 +00:00
Vladimir 'phcoder' Serbinenko
da94d203d9 Generate partmaps for plan9 2010-12-21 00:04:31 +01:00
Colin Watson
129185cfaa move more EDID-handling functions to generic code, and make videoinfo display EDID information 2010-12-14 18:03:34 +00:00
Colin Watson
25d884a52a move generic parts of EDID handling (structure, checksumming) to generic location 2010-12-14 17:06:32 +00:00
Colin Watson
e03f549b3e Preferred resolution detection for VBE.
* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_flat_panel_info):
New function.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.
(grub_vbe_edid_checksum): Likewise.
(grub_vbe_get_preferred_mode): Likewise.  Try EDID followed by the
Flat Panel extension, in line with the X.org VESA driver.
(grub_video_vbe_setup): When the mode is "auto", try to get the
preferred mode from VBE, and use the largest mode that is no larger
than the preferred mode (some BIOSes expose a preferred mode that is
not in their mode list!).  If this fails, fall back to 640x480 as a
safe conservative choice.
* include/grub/i386/pc/vbe.h (struct grub_vbe_flat_panel_info): New
structure.
(struct grub_vbe_edid_info): Likewise.
(grub_vbe_bios_get_flat_panel_info): Add prototype.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.

* util/grub.d/00_header.in (GRUB_GFXMODE): Default to "auto".  This
is more appropriate on a wider range of platforms than 640x480.
2010-12-14 16:22:19 +00:00
Vladimir 'phcoder' Serbinenko
0e5507c411 mtime support for ntfs 2010-12-12 01:00:33 +01:00
Vladimir 'phcoder' Serbinenko
ebec6850b9 HFS filesystem mtime support 2010-12-11 07:00:31 +01:00
Colin Watson
52832c554c Move gfxmenu color handling to video, so that gfxterm can use it
too.

* grub-core/gfxmenu/named_colors.c: Move to ...
* grub-core/video/colors.c: ... here.  Rename
grub_gui_get_named_color to grub_video_get_named_color.
* grub-core/gfxmenu/gui_string_util.c (my_isxdigit): Move to ...
* grub-core/video/colors.c (my_isxdigit): ... here.
* grub-core/gfxmenu/gui_string_util.c (parse_hex_color_component):
Move to ...
* grub-core/video/colors.c (parse_hex_color_component): ... here.
* grub-core/gfxmenu/gui_string_util.c (grub_gui_parse_color): Move
to ...
* grub-core/video/colors.c (grub_video_parse_color): ... here.

* include/grub/gui.h (grub_gui_color_t): Move to ...
* include/grub/video.h (grub_video_rgba_color_t): ... here.
* include/grub/gui.h (grub_gui_color_rgb): Move to ...
* include/grub/video.h (grub_video_rgba_color_rgb): ... here.
* include/grub/gui.h (grub_gui_map_color): Move to ...
* include/grub/video.h (grub_video_map_rgba_color): ... here.
* include/grub/gui_string_util.h (grub_gui_get_named_color): Move
to ...
* include/grub/video.h (grub_video_get_named_color): ... here.
* include/grub/gui_string_util.h (grub_gui_parse_color): Move to ...
* include/grub/video.h (grub_video_parse_color): ... here.

* grub-core/Makefile.core.def (kernel) [videoinkernel]: Add
video/colors.c.
(gfxmenu): Remove gfxmenu/named_colors.c.
(video_colors) [videomodules]: New module, containing
video/colors.c.
2010-12-10 16:45:58 +00:00
Vladimir 'phcoder' Serbinenko
f22c12e852 mtime for UDF support 2010-12-10 17:37:32 +01:00
Vladimir 'phcoder' Serbinenko
8eef1f8244 Compressed fragments and compressed data support 2010-12-09 20:41:41 +01:00
Vladimir 'phcoder' Serbinenko
8ff84951c5 ZFS mirror support 2010-12-06 02:31:22 +01:00
Vladimir 'phcoder' Serbinenko
fe79a8ad9d Fix fzap handling 2010-12-05 15:35:08 +01:00
Vladimir 'phcoder' Serbinenko
7a6e93788c ZFS zlib compression support 2010-12-04 00:40:44 +01:00
Vladimir 'phcoder' Serbinenko
78ab87f61d merge mainline into ZFS 2010-12-04 00:40:20 +01:00
Vladimir 'phcoder' Serbinenko
3be8e5ea96 BtrFS zlib compression support 2010-12-03 21:42:13 +01:00
Vladimir 'phcoder' Serbinenko
228cfb40bf support bind and subvolume mount 2010-12-02 14:26:46 +01:00
Robert Millan
15abb5547f Merge ZFS. 2010-12-01 22:57:49 +01:00
Robert Millan
54207d4b6c Update GPL for ZFS code to version 3, move copyright lines for Vladimir and me to FSF (covered by our assignments) 2010-12-01 22:55:26 +01:00
Robert Millan
bf78d5b251 2010-12-01 Robert Millan <rmh@gnu.org>
* grub-core/fs/zfs/zfs.c: New file.
	* grub-core/fs/zfs/zfs_fletcher.c: Likewise.
	* grub-core/fs/zfs/zfs_lzjb.c: Likewise.
	* grub-core/fs/zfs/zfs_sha256.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	
	* include/grub/zfs/dmu.h: Likewise.
	* include/grub/zfs/dmu_objset.h: Likewise.
	* include/grub/zfs/dnode.h: Likewise.
	* include/grub/zfs/dsl_dataset.h: Likewise.
	* include/grub/zfs/dsl_dir.h: Likewise.
	* include/grub/zfs/sa_impl.h: Likewise.
	* include/grub/zfs/spa.h: Likewise.
	* include/grub/zfs/uberblock_impl.h: Likewise.
	* include/grub/zfs/vdev_impl.h: Likewise.
	* include/grub/zfs/zap_impl.h: Likewise.
	* include/grub/zfs/zap_leaf.h: Likewise.
	* include/grub/zfs/zfs.h: Likewise.
	* include/grub/zfs/zfs_acl.h: Likewise.
	* include/grub/zfs/zfs_znode.h: Likewise.
	* include/grub/zfs/zil.h: Likewise.
	* include/grub/zfs/zio.h: Likewise.
	* include/grub/zfs/zio_checksum.h: Likewise.
	
	* Makefile.util.def: Build ZFS into libgrubmods.
	* grub-core/Makefile.core.def: Build zfs.mod.
2010-12-01 22:42:11 +01:00
Vladimir 'phcoder' Serbinenko
3836e89df1 Add crc32c for btrfs 2010-12-01 01:22:55 +01:00
Vladimir 'phcoder' Serbinenko
49d3ab4668 Avoid using tricks for initialising endian variables.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot):
	Make const.
	(GRUB_MOD_INIT): Don't byte-swap.
	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
	Use grub_cpu_to_le16_compile_time and grub_cpu_to_le32_compile_time.
	* include/grub/types.h (grub_swap_bytes16_compile_time): New macro.
	(grub_swap_bytes32_compile_time): Likewise.
	(grub_cpu_to_le32_compile_time): Likewise.
	(grub_cpu_to_le16_compile_time): Likewise.
2010-11-26 22:29:19 +01:00
BVK Chaitanya
2c7859b36f merge with mainline 2010-11-25 19:54:50 +05:30
BVK Chaitanya
7955bea0d8 fix changelog and doc 2010-11-25 19:05:16 +05:30
BVK Chaitanya
5b08062083 replaced with grub_strchrsub function 2010-11-25 18:56:20 +05:30
Colin Watson
7242bab6a4 * include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
Remove byte-swapping function calls, which are not valid in
structure initialisers.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot): Make
non-const.
(GRUB_MOD_INIT): Byte-swap data1, data2, and data3 fields of
grub_gpt_partition_type_bios_boot.
2010-11-23 10:48:46 +00:00
BVK Chaitanya
f866fe808b reuse code from legacy parser 2010-11-19 19:08:44 +05:30
Vladimir 'phcoder' Serbinenko
1afcc914c5 Make better UTF compliant.
* grub-core/normal/charset.c (grub_utf8_to_utf16): Handle 6- and 7-byte
	sequences as incorrect.
	(grub_is_valid_utf8): Likewise.
	(grub_utf8_to_ucs4): Likewise.
	(grub_ucs4_to_utf8): Handle codepoints outside of BMP.
	(grub_ucs4_to_utf8_alloc): Likewise.
	* include/grub/charset.h (grub_utf16_to_utf8): Likewise.
2010-11-17 16:13:16 +01:00
Vladimir 'phcoder' Serbinenko
a06eb03ad0 Support long command lines as per 2.06 Linux boot protocol 2010-11-13 21:27:08 +01:00