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
36dd20ad0b
* grub-core/kern/main.c (grub_set_prefix_and_root): Init prefix.
2011-10-19 20:30:06 +02:00
Vladimir 'phcoder' Serbinenko
f8f72eb890
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
...
Don't add the bogus brackets.
2011-10-19 20:28:09 +02:00
Vladimir 'phcoder' Serbinenko
a374751b16
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.
2011-10-19 20:19:25 +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
366e34fa5a
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.
2011-10-16 11:57:48 +02:00
Vladimir 'phcoder' Serbinenko
3b619ae116
* 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.
2011-10-16 11:48:54 +02:00
Vladimir 'phcoder' Serbinenko
d891955241
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.
2011-10-14 22:41:21 +02:00
Vladimir 'phcoder' Serbinenko
c81296b65f
* grub-core/kern/emu/hostdisk.c
...
(convert_system_partition_to_system_disk): Don't assume that children
of mapper nodes are mapper nodes.
2011-10-14 19:20:44 +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
Szymon Janc
a664449575
merge trunk
2011-10-06 19:00:10 +02:00
Vladimir 'phcoder' Serbinenko
fe942b7dbb
* grub-core/Makefile.core.def: Eliminate rarely used emu_condition. This
...
in perspective decreases the complexity of build system and fixes
compilation right now.
2011-10-05 11:53:36 +02:00
Szymon Janc
bc4d3f4809
* grub-core/io/lzopio.c (calculate_uncompressed_size): Fix return code.
2011-10-04 21:10:21 +02:00
Szymon Janc
709e61a55f
merge trunk
2011-10-04 20:21:12 +02:00
Szymon Janc
b871e8ebcc
* grub-core/Makefile.core.def (btrfs): Remove minilzo.c from common.
2011-10-03 23:01:14 +02:00
Szymon Janc
0e2b7e39f2
* grub-core/fs/btrfs.c: Include <minilzo.h> instead of "minilzo.h".
...
* grub-core/io/lzopio.c: Likewise.
2011-10-03 22:25:06 +02:00
Szymon Janc
c5ed9266fc
* grub-core/io/lzopio.c: Improve crypt context alignment.
2011-10-03 22:06:10 +02:00
Szymon Janc
139d67a82f
* grub-core/fs/btrfs.c: Fix code style regressions.
2011-10-03 21:50:32 +02:00
starous
ce79cc99d5
@Rock changes - fixed coreboot problem
2011-10-01 21:27:29 +02:00
Mads Kiilerich
fc5efcc083
* grub-core/Makefile.core.def (kernel): Add kern/i386/int.S to
...
extra_dist.
2011-09-29 10:50:25 +02:00
Mario Limonciello
c05de0329b
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use
...
_fullpath.
2011-09-29 10:36:55 +02:00
Grégoire Sutre
e0b0dc837b
Make knetbsd pass bootinfo bootdisk and bootwedge.
2011-09-28 23:45:57 +02:00
Thomas Haller
91a1a164d6
* grub-core/loader/multiboot_elfxx.c (Elf_Shdr): Set according to
...
loader.
2011-09-28 16:43:00 +02:00
Vladimir 'phcoder' Serbinenko
6991503094
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
...
Return 0 if disk isn't biosdisk.
2011-09-28 14:07:53 +02:00
Grégoire Sutre
1a7d7db97f
Get sector size from disk label for NetBSD.
2011-09-17 23:01:48 +02:00
Szymon Janc
9c4f9ca010
* grub-core/io/lzopio.c (test_header): Some cleanups.
2011-09-06 21:21:13 +02:00
Szymon Janc
579c12fbb4
* grub-core/fs/btrfs.c: Some minor cleanups.
2011-08-24 11:24:10 +02:00
Szymon Janc
00b98c9b2e
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Random fixes and some
...
cleanup.
2011-08-23 19:49:01 +02:00
Vladimir 'phcoder' Serbinenko
ca51c4a04f
* grub-core/kern/mips/loongson/init.c (grub_machine_init): Handle the
...
case of less than 256 MiB of RAM.
2011-08-23 11:20:56 +02:00
Vladimir 'phcoder' Serbinenko
ab80f326f4
* grub-core/commands/wildcard.c (make_regex): Handle @.
2011-08-23 11:19:26 +02:00
Szymon Janc
90b0a05579
Various bug fixes and improvements in lzopio. Should properly handle more
...
files now. Also added support for lzop checksums verification.
2011-08-21 18:48:19 +02:00
Szymon Janc
6401c37058
Return correct adler32 value in read() call.
2011-08-21 14:49:07 +02:00
Szymon Janc
9a8d32a24f
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.
2011-08-20 18:24:54 +02:00
Szymon Janc
b3e9c48799
merge trunk
2011-08-20 12:02:35 +02:00
Szymon Janc
fe8d4a7bc2
* grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
...
GRUB_VIDEO_DRIVER_RADEON_FULOONG2E to switch case statement.
2011-08-20 11:58:41 +02:00
Szymon Janc
a5219af189
* grub-core/io/gzio.c (grub_gzio_open): Always return original io if
...
file type was not recognized correctly (not gzip or corrupted).
2011-08-20 11:48:46 +02:00
Szymon Janc
540c000f0d
merge trunk
2011-08-20 09:49:15 +02:00
Szymon Janc
4334690fbf
More work on LZO for btrfs support. Some fixes and code refactoring.
2011-08-20 02:05:08 +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
84beb0eeb9
* grub-core/kern/misc.c (grub_vprintf): Fix a bug on malloc failure.
2011-08-19 22:59:24 +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
b526cbb6fa
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.
2011-08-19 21:28:09 +02:00
Szymon Janc
fb739ccd79
* Makefile.am (AUTOMAKE_OPTIONS): = Added -Wno-portability flag.
...
* grub-core/Makefile.am: Likewise.
2011-08-19 20:06:42 +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
Vladimir 'phcoder' Serbinenko
2bba8cfd55
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_iterate): Skip with
...
non-zero pull.
2011-08-16 23:12:20 +02:00