Commit graph

3658 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
41ca7b81a9 Fix letters reversing in qemu 2010-07-02 22:06:19 +02:00
Vladimir 'phcoder' Serbinenko
169ed0dc69 Add missing include 2010-07-02 22:05:47 +02:00
Vladimir 'phcoder' Serbinenko
a06cec31e7 Skip bidi if no RTL characters are present 2010-07-02 20:37:08 +02:00
Vladimir 'phcoder' Serbinenko
e8d0a8f85c Merge mainline into bidi 2010-07-02 19:35:07 +02:00
Colin Watson
50f0bcdab5 * include/grub/types.h: Define the C99-style PRIxGRUB_SIZE macro,
suitable for using within the format argument of printf when
converting grub_size_t.
* disk/usbms.c (grub_usbms_transfer): Use PRIxGRUB_SIZE rather than
"x" to convert grub_size_t arguments.
2010-07-02 18:04:54 +01:00
Vladimir 'phcoder' Serbinenko
4037210375 * gfxmenu/gui_list.c (draw_menu): Use viewport to simplify code and fix
too long captions.
	(list_get_minimal_size): Take selection box into account.
2010-07-02 18:28:54 +02:00
Vladimir 'phcoder' Serbinenko
942a10c71e * font/font.c (grub_font_get_glyph_with_fallback): Avoid dereferencing
NULL font.
2010-07-02 18:25:42 +02:00
Vladimir 'phcoder' Serbinenko
919e37b0ac Inline setcolorstate and move grub_Cls out of kernel.img 2010-07-02 18:20:48 +02:00
Colin Watson
2bdb2892b3 * util/deviceiter.c (grub_util_iterate_devices): Skip device-mapper
devices when iterating over /dev/disk/by-id; they will be handled
later if appropriate, which they aren't always (e.g. LVM).
2010-07-02 17:11:42 +01:00
Colin Watson
e03ed6c1ee * include/grub/misc.h (grub_reboot): Declare as noreturn.
* kern/efi/efi.c (grub_reboot): Don't return, even if reset_system
fails.
(grub_halt): Likewise.
* kern/ieee1275/openfw.c (grub_reboot): Don't return, even if
reset-all fails.
(grub_halt): Don't return, even if all of shut-down, power-off, and
poweroff fail.
2010-07-02 13:47:14 +01:00
Colin Watson
47695765a4 * kern/efi/init.c (grub_efi_init): set_watchdog_timer takes four
arguments, not three.
2010-07-02 13:42:18 +01:00
Colin Watson
507736c87c * util/grub-mkconfig_lib.in (uses_abstraction): New function.
* util/grub.d/10_linux.in: Use it to check for LVM, so that
LVM-on-RAID is handled correctly.
2010-07-02 12:32:05 +01:00
Colin Watson
e3c8cd3719 * docs/grub.texi (Changes from GRUB Legacy): New section.
(Future): Fix typo.
2010-07-02 12:13:48 +01:00
Colin Watson
8d4a2fec0d * util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Sometimes
grub.d/README accidentally ends up executable for one reason or
another.  Ignore it.
2010-07-02 10:50:04 +01:00
Vladimir 'phcoder' Serbinenko
1c4827beff * partmap/gpt.c (MAX_SECTOR_LOG): New definition.
(gpt_partition_map_iterate): Support non-512B sectors.
2010-07-02 02:47:10 +02:00
Vladimir 'phcoder' Serbinenko
d9a0c9413e * kern/efi/init.c (grub_efi_init): Disable watchdog.
Tested by: Seth Goldberg.
2010-07-02 02:43:09 +02:00
Vladimir 'phcoder' Serbinenko
48f27e87fc * loader/multiboot.c (grub_multiboot_boot) [GRUB_USE_MULTIBOOT2]:
Properly align mbi.
	Reported by: Seth Goldberg.
2010-07-02 00:40:37 +02:00
Vladimir 'phcoder' Serbinenko
b0c4f95642 * util/grub-mkrescue.in: Avoid module duplication. 2010-07-01 23:35:45 +02:00
Sean Finney
105a2e8c66 * util/grub.d/10_linux.in: Don't use UUID for LVM root. 2010-07-01 23:24:21 +02:00
Sean Finney
5944958c61 * disk/lvm.c (grub_lvm_scan_device): Skip snapshots.
2010-07-01  Vladimir Serbinenko  <phcoder@gmail.com>

	* disk/lvm.c (grub_lvm_checkvalue): New function.
	(grub_lvm_check_flag): Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-07-01 23:19:11 +02:00
Robert Millan
b79889ba76 2010-07-01 Robert Millan <rmh@gnu.org>
* kern/emu/hostdisk.c (convert_system_partition_to_system_disk):
	Support 'p' as partition separator on kernel of FreeBSD (used
	with GPT labels).
	(grub_util_biosdisk_get_grub_dev): Likewise.
2010-07-01 10:52:23 +02:00
Vladimir 'phcoder' Serbinenko
ec1d04f1de Yeeloong firmware port.
* boot/mips/yeeloong/fwstart.S: New file.
	* bus/cs5536.c (gpiodump): New const.
	(set_io_space): New function.
	(set_iod): Likewise.
	(set_p2d): Likewise.
	(grub_cs5536_init_geode): Likewise.
	* commands/mips/yeeloong/lsspd.c: New file.
	* conf/mips-qemu-mips.rmk (pkglib_MODULES): Add serial.mod.
	(serial_mod_SOURCES): New variable.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* conf/mips-yeeloong.rmk (kernel_img_SOURCES): Add term/serial.c,
	term/terminfo.c and term/tparm.c.
	(pkglib_IMAGES): Add fwstart.img.
	(fwstart_img_SOURCES): New variable.
	(fwstart_img_CFLAGS): Likewise.
	(fwstart_img_ASFLAGS): Likewise.
	(fwstart_img_LDFLAGS): Likewise.
	(fwstart_img_FORMAT): Likewise.
	(pkglib_MODULES): Add lsspd.mod.
	(lsspd_mod_SOURCES): New variable.
	(lsspd_mod_CFLAGS): Likewise.
	(lsspd_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add halt.mod.
	(halt_mod_SOURCES): New variable.
	(halt_mod_CFLAGS): Likewise.
	(halt_mod_LDFLAGS): Likewise.
	* conf/mips.rmk (pkglib_MODULES): Remove serial.mod.
	(serial_mod_SOURCES): Removed.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* disk/ata.c (check_device): New function.
	(grub_ata_device_initialize): Use check_device.
	(grub_ata_iterate): Recheck devices.
	(grub_ata_open): Likewise.
	(grub_atapi_iterate): Likewise.
	(grub_atapi_open): Likewise.
	* include/grub/ata.h (GRUB_ATA_CH0_PORT1): New macro.
	(GRUB_ATA_CH1_PORT1): Likewise.
	(GRUB_ATA_CH0_PORT2): Likewise.
	(GRUB_ATA_CH1_PORT2): Likewise.
	* include/grub/mips/loongson.h: New file.
	* include/grub/mips/yeeloong/ec.h: Likewise.
	* include/grub/mips/yeeloong/serial.h (GRUB_MACHINE_SERIAL_PORT): New definition.
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS) [ASM_FILE]: Remove.
	* include/grub/misc.h (grub_halt): Declare as noreturn.
	* include/grub/serial.h (UART_ENABLE_FIFO): Renamed to ...
	(UART_ENABLE_FIFO_TRIGGER14): ... this. All users updated.
	(UART_ENABLE_FIFO_TRIGGER1): New definition.
	(UART_ENABLE_DTRRTS): Likewise.
	(UART_ENABLE_MODEM): Removed.
	(UART_ENABLE_OUT2): New const.
	* include/grub/term.h (grub_term_register_input_active): New function.
	(grub_term_register_output_active): Likewise.
	* kern/mips/startup.S [GRUB_MACHINE_MIPS_YEELOONG]: Handle 0xffffffff
	argument.
	* kern/mips/yeeloong/init.c (grub_get_rtc): Macroify.
	(init_pci): New function.
	(grub_machine_init): Execute platform init when firmware. Init serial.
	(grub_halt): Implement.
	(grub_exit): Likewise.
	(grub_reboot): Likewise.
	* term/serial.c (serial_hw_init): Update macros.
	[GRUB_MACHINE_MIPS_YEELOONG]: Init on startup.
	* util/grub-mkimage.c (image_target_desc): New id IMAGE_YEELOONG_FLASH.
	(image_targets): New target mipsel-yeeloong-flash.
	(generate_image): Support IMAGE_YEELOONG_FLASH.
	* video/sm712.c (GRUB_SM712_TOTAL_MEMORY_SPACE): New definition.
	(grub_video_sm712_setup): Init card.
	(grub_video_sm712_set_palette): Removed.
	* video/sm712_init.c: New file.
2010-07-01 03:16:56 +02:00
Colin Watson
ff4a70d291 * Makefile.in (install-local): Temporarily prepend $(builddir) to
PATH when running help2man and then run it on the unadorned
executable names, rather than passing $(builddir)/* paths to
help2man.  This avoids the build directory ending up in generated
manual pages.
2010-06-30 13:36:58 +01:00
Vladimir 'phcoder' Serbinenko
b7e79e8a6a Merge mainline into yeeloongfw 2010-06-30 02:30:05 +02:00
Colin Watson
1246efeb8b * util/grub-mkconfig.in: Use 'set -e' rather than '#! /bin/sh -e',
to avoid accidents when debugging with 'sh -x'.
* util/grub-mkrescue.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2010-06-29 16:20:49 +01:00
Colin Watson
1ba9b88946 * commands/cat.c (grub_cmd_cat): Fix buffer overrun if '\r' is the
last character in the buffer.
Reported by: Vladimir Serbinenko.
2010-06-29 16:15:46 +01:00
Robert Millan
dccaf99d10 2010-06-29 Robert Millan <rmh@gnu.org>
* docs/grub.texi (Simple configuration): Document ${GRUB_BADRAM}.
	(Command-line and menu entry commands): Document `badram' command.
2010-06-29 00:48:53 +02:00
Robert Millan
d500ed127e 2010-06-28 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Export `GRUB_BADRAM' variable.
	* util/grub.d/00_header.in: When `GRUB_BADRAM' is set, issue badram
	command using ${GRUB_BADRAM} as parameter.
2010-06-28 23:52:03 +02:00
Colin Watson
20bc84a6ff * docs/grub.texi (Device map): New section.
(Themes): New section (stub).
* Makefile.in (docs/grub.info): The info documentation now builds
without errors.  Make sure it stays that way.
2010-06-28 12:02:39 +01:00
Vladimir 'phcoder' Serbinenko
4045dee1b9 Use normal parser for menu entries.
Reported by: Thomas Frauendorfer

	* include/grub/parser.h (grub_parser_execute): Don't export.
	* normal/menu.c (grub_menu_execute_entry_real): New function.
	(grub_menu_execute_entry): Use grub_menu_execute_entry_real.
2010-06-28 12:42:50 +02:00
Colin Watson
bca58c7bb6 * docs/grub.texi (Embedded configuration): New section (replacing
old "Preset Menu" stub).
(Images): New section.
(configfile): Note that any menu entries defined in `file' are shown
immediately.
2010-06-28 11:32:50 +01:00
Josh Triplett
dec53e635c * mmap/i386/pc/mmap_helper.S: Set CF on return. 2010-06-28 10:17:57 +02:00
Colin Watson
c06e40f728 * util/grub-install.in: Add --debug-image= option. 2010-06-28 09:06:41 +01:00
Colin Watson
cb88052ba3 Change grub-mkdevicemap to emit /dev/disk/by-id/ names where
possible on Linux.
* util/deviceiter.c (check_device): Rename to ...
(check_device_readable_unique): ... this.  Update all callers.
Maintain and check a list of which devices (by canonicalized name)
have already been seen.
(clear_seen_devices): New function.
(compare_file_names) [__linux__]: New function.
(grub_util_iterate_devices): Clear the list of seen devices on exit
and (just in case) on entry.
(grub_util_iterate_devices) [__linux__]: Iterate over non-partition
devices in /dev/disk/by-id/, in sorted order.  Remove DM-RAID
seen-devices list, superseded by general code in check_device.
2010-06-28 08:55:05 +01:00
Colin Watson
bbe346529e * commands/cat.c (options): New variable.
(grub_cmd_cat): Parse options.  If the --dos option is given, print
DOS-style "\r\n" line endings as simple newlines (Debian bug
#586358).
(GRUB_MOD_INIT): Use extcmd.
(GRUB_MOD_FINI): Likewise.
* docs/grub.texi (cat): Document --dos.
2010-06-28 08:51:46 +01:00
Vladimir 'phcoder' Serbinenko
412e09f355 XEN with Linux grub-mkconfig support.
* conf/common.rmk (grub-mkconfig_SCRIPTS) [linux]: Add 20_linux_xen.
	* util/grub-mkconfig.in: Export GRUB_CMDLINE_XEN and
	GRUB_CMDLINE_XEN_DEFAULT.
	* util/grub.d/20_linux_xen.in: New file.
2010-06-28 02:39:49 +02:00
Vladimir 'phcoder' Serbinenko
53f3ef38c5 Initialise VGA video on qemu ourselves.
* boot/i386/qemu/boot.S: Don't call 0xc000.
	* conf/i386-qemu.rmk (kern/i386/qemu/init.c_DEPENDENCIES): New variable.
	(kernel_img_SOURCES): Add kern/i386/qemu/init.c and bus/pci.c.
	(kernel_img_HEADERS): Add pci.h.
	* conf/i386.rmk (pkglib_MODULES) [qemu]: Remove pci.mod.
	* configure.ac: Force unifont on qemu and yeeloong.
	* include/grub/i386/qemu/kernel.h (grub_qemu_init_cirrus): New proto.
	(grub_vga_palette_write): Use correct register.
	* kern/i386/coreboot/init.c (grub_machine_init) [GRUB_MACHINE_QEMU]:
	Call grub_qemu_init_cirrus.
	* kern/i386/qemu/init.c: New file.
	* term/i386/pc/vga_text.c (inc_y): Never read outside the screen.

	* commands/videotest.c (grub_cmd_videotest): Handle double buffering.
2010-06-28 02:33:32 +02:00
Vladimir 'phcoder' Serbinenko
d86e186ff1 Fix detection of dom0 kernels 2010-06-28 02:24:08 +02:00
Pavel Roskin
c75be4fb0c * util/grub.d/10_linux.in: Add support for initrd images on Fedora
13.
2010-06-26 20:31:40 +01:00
Colin Watson
d803460357 * docs/grub.texi (Simple configuration): Explain that
GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY must be
set to `true' to disable their respective recovery entries, not
merely set.
2010-06-26 10:50:39 +01:00
Colin Watson
3fa0648724 Make the `source' command slightly faster.
* normal/main.c (grub_normal_execute): Don't re-read list files when
nested.
2010-06-26 10:46:54 +01:00
Colin Watson
e9b29642bd * loader/i386/multiboot_mbi.c (retrieve_video_parameters): Set red
field position and mask size to red fields from mode_info, not
green.
* loader/multiboot_mbi2.c (retrieve_video_parameters): Likewise.
Remove redundant tag->common.framebuffer_type assignment.
Reported by: Seth Goldberg.
2010-06-23 09:22:03 +01:00
Colin Watson
e726542fa3 Sync up other versions of the Linux loader with Robert Millan's
change of 2010-01-09, "Make loader output a bit more user-friendly".
* loader/i386/efi/linux.c (grub_linux_boot): Move debug info to
grub_dprintf().
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* loader/i386/ieee1275/linux.c (grub_cmd_linux): Likewise.
* loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2010-06-23 09:16:39 +01:00
Colin Watson
d6e98a17d7 * kern/efi/mm.c (grub_efi_mm_init): Handle systems with memory maps
larger than MEMORY_MAP_SIZE.
2010-06-21 17:59:51 +01:00
BVK Chaitanya
14d3f08e70 Fix parallel build.
* conf/common.rmk: Add grub_script.tab.h as a grub-script-check
	dependency.
	* script/parser.y: #include grub_script.tab.h header.
2010-06-21 20:34:30 +05:30
Vladimir 'phcoder' Serbinenko
994b0c27ea Add ChangeLog 2010-06-21 02:23:58 +02:00
Vladimir 'phcoder' Serbinenko
8e50ec9f05 Merge mainline into cirrus 2010-06-21 02:15:49 +02:00
Vladimir 'phcoder' Serbinenko
5410ebd1f6 Don't read outside of VGA screen 2010-06-21 02:08:48 +02:00
Vladimir 'phcoder' Serbinenko
a29051ec7f Handle double redraw 2010-06-21 02:08:19 +02:00
Vladimir 'phcoder' Serbinenko
de24ab9b0d Fix grub_vga_palette_write 2010-06-21 02:07:45 +02:00