Commit graph

461 commits

Author SHA1 Message Date
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
Colin Watson
159b4a8bb7 (redraw_screen_rect): Allow blend/replace of text layer to be
controlled independently from whether there is a background bitmap.
(grub_gfxterm_fullscreen): Change blend_text_bg when changing
bitmap.
(destroy_window): Likewise.
(grub_gfxterm_background_image_cmd): Likewise.
2010-12-14 12:28:36 +00:00
Colin Watson
198cae0c96 Fix border repainting.
* grub-core/term/gfxterm.c (dirty_region_add): When a repaint is
already scheduled, merge the virtual screen with the requested
region rather than repainting only the virtual screen.
2010-12-13 13:58:53 +00:00
Colin Watson
9c55cbe8e7 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.
2010-12-10 17:47:38 +00: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
Colin Watson
1fb430f865 * grub-core/gettext/gettext.c (grub_gettext_init_ext): Factor out
.mo/.mo.gz opening sequence to ...
(grub_mofile_open_lang): ... here.
(grub_gettext_init_ext): If opening ll_CC fails, try ll.
* util/grub.d/00_header.in (grub_lang): Include country part of
locale.
Reported by: Mario Limonciello.
2010-12-10 11:45:08 +00:00
Colin Watson
24b7938b32 * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Use `>> 1'
rather than `/ 2', as the latter requires -Wa,--divide which would
require bumping our minimum binutils version.
2010-12-04 16:19:26 +00: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
Colin Watson
ea20f6e03a merge some more commits from before Savannah compromise (mirrored by Launchpad) 2010-12-01 16:19:26 +00:00
Szymon Janc
3f0f38317b * grub-core/commands/regexp.c (grub_cmd_regexp): Remove unused
variable.
	* grub-core/commands/wildcard.c (match_files): Likewise.
2010-11-30 21:35:59 +01:00
Robert Millan
3a4253b2c4 2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/loader/i386/bsd.c
	(grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module_elf): Check
	whether kernel is loaded using grub_loader_is_loaded(), rather
	than `kernel_type', which may still be `KERNEL_TYPE_NONE' under
	certain error conditions.
2010-11-30 19:33:12 +01:00
Colin Watson
725d286634 merge commits from before Savannah compromise 2010-11-30 17:01:52 +00:00
Robert Millan
c5c9cd3e7d Add missing include 2010-11-30 16:23:41 +01:00
Robert Millan
8c317b270f 2010-11-30 Robert Millan <rmh@gnu.org>
* grub-core/commands/echo.c (grub_cmd_echo): Call grub_refresh()
	after printing a message.
2010-11-30 15:36:47 +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
Robert Millan
4e7db17be9 2010-11-26 Robert Millan <rmh@gnu.org>
* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN): Beautify.
	Update all users.
2010-11-26 15:35:40 +01:00
BVK Chaitanya
2c7859b36f merge with mainline 2010-11-25 19:54:50 +05:30
BVK Chaitanya
dfda224dd8 variable ordering 2010-11-25 19:07:02 +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
5a4072785b * grub-core/Makefile.core.def (xz_decompress): Move -lgcc from
ldflags to ldadd, to fix link line ordering.
(none_decompress): Likewise.
2010-11-24 19:32:49 +00:00
Colin Watson
3030d8ec49 * grub-core/Makefile.core.def (kernel): Add kern/emu/cache.S for emu
platforms.
(grub-emu-lite): Remove kern/emu/cache.S.
2010-11-24 12:07:14 +00:00
Colin Watson
038b3ce8dc * grub-core/Makefile.am (gentrigtables): Put -lm after $<; some
linkers are picky about this.
2010-11-23 13:00:05 +00:00
Colin Watson
bf16e98e3c * grub-core/Makefile.am (command.lst): Adjust sed expression
ordering so that extended and priority commands aren't treated as
ordinary commands.
2010-11-23 12:52:40 +00:00
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
Vladimir 'phcoder' Serbinenko
7f8b0fd7f0 * grub-core/loader/i386/linux.c (grub_cmd_linux): Pass correctly the
bootloader version instead of 0.
2010-11-19 22:58:06 +01:00
Vladimir 'phcoder' Serbinenko
dfd240b122 * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix spurious
warning.
2010-11-19 22:52:27 +01:00
Vladimir 'phcoder' Serbinenko
7b61e6096b * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Don't try to
retrieve the metadat sector if size isn't known.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
2010-11-19 22:48:26 +01:00
BVK Chaitanya
f866fe808b reuse code from legacy parser 2010-11-19 19:08:44 +05:30
BVK Chaitanya
9acdcbf325 use single quotes in menuentry setparams command 2010-11-19 10:15:25 +05:30
Robert Millan
9dfe92d07a 2010-11-18 Robert Millan <rmh@gnu.org>
* grub-core/fs/btrfs.c (grub_btrfs_mount): Replace grub_strncmp()
	with grub_memcmp().
2010-11-18 16:52:27 +01:00
Vladimir 'phcoder' Serbinenko
41cc919ef7 * grub-core/normal/menu_entry.c (print_up): Fix displacement of up
arrow.
	Reported by: Jordan Uggla.
2010-11-18 02:08:01 +01:00
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
f18088844f Make legacy_source behave like source.
* grub-core/commands/legacycfg.c (legacy_file): Don't call
	grub_show_menu.
	(grub_cmd_legacy_source): Call grub_show_menu if needed.
2010-11-17 08:41:18 +01:00
Vladimir 'phcoder' Serbinenko
e98937aaf0 * grub-core/term/at_keyboard.c (grub_keyboard_controller_read)
[GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: ifdef-ed out
	(now unused).
	(grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_YEELOONG || GRUB_MACHINE_QEMU]: Don't attempt to
	read the initial state since controller isn't inited yet.
2010-11-15 10:01:11 +01:00
Vladimir 'phcoder' Serbinenko
f6bbabc373 * grub-core/lib/relocator.c (malloc_in_range): Take into account that
allocate_regbeg may need to create new chunk header.
2010-11-15 09:50:58 +01:00
Vladimir 'phcoder' Serbinenko
22e7dbb2bb Fix quoting in legacy parser.
* grub-core/lib/legacy_parse.c (grub_legacy_escape): Correctly handle
	single quotes.
	(grub_legacy_parse): Likewise.
	Reported by: Jordan Uggla.
	Tested by: Jordan Uggla.
2010-11-15 00:33:28 +01:00
Vladimir 'phcoder' Serbinenko
03f80960cf Don't add -lgcc on i386 and x86_64.
* configure.ac (LIBS): Don't add -lgcc on i386 and x86_64.
	* conf/Makefile.common (LDADD_KERNEL): Likewise.
	* grub-core/Makefile.core.def (kernel): Use LDADD_KERNEL.
2010-11-14 23:36:20 +01:00
Modestas Vainius
d20a3b371c * grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_
fakeraid.
2010-11-14 17:09:13 +01:00
Giuseppe Caizzone
69c4feebb1 Add generic logical block size support for UDF.
* grub-core/fs/udf.c (GRUB_UDF_LOG2_BLKSIZE): Removed.
	(GRUB_UDF_BLKSZ): Removed.
	(struct grub_udf_data): New field "lbshift" to hold the logical	block
	size of the file system in log2 format. All users updated.
	(sblocklist): Change type to unsigned.
	(grub_udf_mount): Change type of "sblklist" to unsigned.
	Move AVDP search before VRS recognition, because the latter requires
	knowledge of the logical block size, which is detected during the
	former.
	Detect and validate logical block size during AVDP search, adding
	support for block sizes 512, 1024 and 4096.
	Make VRS recognition independent of block size.
2010-11-14 17:03:49 +01:00
Giuseppe Caizzone
e53609331b Add generic logical block size support for UDF.
* grub-core/fs/udf.c (GRUB_UDF_LOG2_BLKSIZE): Removed.
	(GRUB_UDF_BLKSZ): Removed.
	(struct grub_udf_data): New field "lbshift" to hold the logical	block
	size of the file system in log2 format. All users updated.
	(sblocklist): Change type to unsigned.
	(grub_udf_mount): Change type of "sblklist" to unsigned.
	Move AVDP search before VRS recognition, because the latter requires
	knowledge of the logical block size, which is detected during the
	former.
	Detect and validate logical block size during AVDP search, adding
	support for block sizes 512, 1024 and 4096.
	Make VRS recognition independent of block size.
2010-11-14 16:58:50 +01:00
Giuseppe Caizzone
cb0229c587 Properly handle deleted files on UDF.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Skip directory entries
	whose "characteristics" field has the bit GRUB_UDF_FID_CHAR_DELETED
	set.
2010-11-14 16:51:45 +01:00
Giuseppe Caizzone
406858a8a9 Support reading files larger than 2 GiB.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Change type of variable
	"offset" to grub_off_t.
	(grub_udf_read_file): Likewise for parameter "pos".
2010-11-14 16:48:17 +01:00
Vladimir 'phcoder' Serbinenko
1fd08bf111 * grub-core/disk/lvm.c (GRUB_MOD_FINI): Reset the vg_list. Fixes
LVM on RAID support.
2010-11-14 14:13:11 +01:00
Vladimir 'phcoder' Serbinenko
de1a024fff Properly define WORDS_BIGENDIAN in wrapped environments.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN): New
	definition.
	* grub-core/lib/posix_wrap/sys/types.h (WORDS_BIGENDIAN): Likewise.

	Reported by: Manoel Rebelo Abranches.
	Tested by: Manoel Rebelo Abranches.
2010-11-14 13:37:59 +01:00
Vladimir 'phcoder' Serbinenko
58c184be7b Support big ext2 files.
* grub-core/fs/ext2.c (grub_ext2_inode): Rename dir_acl to size_high.
	(grub_ext2_read_block): Support triple indirect blocks.
	(grub_ext2_read_file): Use 64-bit types and read size_high.
	(grub_ext2_open): Read size_high.
	Reported by: Ximin Luo.
	Tested by: Manoel Rebelo Abranches.
2010-11-13 16:11:24 +01:00
Vladimir 'phcoder' Serbinenko
10001ac54b * grub-core/kern/i386/pc/startup.S (multiboot_trampoline): Add missing
jump.
2010-11-12 08:45:16 +01:00
Manoel Rebelo Abranches
9c4cf53bfe 2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com>
* include/grub/elfload.h (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * kern/elf.c (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * grub-core/loader/powerpc/ieee1275/linux.c:
        (grub_linux_claimmap_iterate): New function. Uses the "available"property
        in the "memory" node for memory allocation for kernel in the PowerPC loader.
        (grub_linux_load32): Correctly find linux entry point offset.
        (grub_linux_load64): Likewise.
2010-11-08 11:14:54 -02:00