Colin Watson
63c734a63e
* commands/i386/pc/sendkey.c (keysym_table): Rename "numlock" to
...
"numcenter" (I misunderstood the purpose of this entry).
* docs/grub.texi (sendkey): Likewise.
2010-08-20 00:15:23 +01:00
Colin Watson
c4d1654256
* commands/i386/pc/sendkey.c (options): Remove "keep" from all
...
status flag options; simply omitting the option is equivalent and
simpler. Rename "wait" to "pause". Rename "sysreq" to "sysrq".
(keysym_table): Rename "num5numlock" to "numlock".
(grub_cmd_sendkey): Reinitialise `andmask' and `ormask', so that we
can uniformly say that only the last of multiple `sendkey'
invocations has any effect.
* docs/grub.texi (sendkey): New section.
2010-08-20 00:05:14 +01:00
Colin Watson
93541d660d
* commands/i386/pc/sendkey.c (options): Fix three typos.
2010-08-19 21:53:50 +01:00
Vladimir 'phcoder' Serbinenko
b4ece5e11e
Implement sendkey support.
...
* commands/i386/pc/sendkey.c: New file.
* conf/i386-pc.rmk (pkglib_MODULES): Add sendkey.mod.
(sendkey_mod_SOURCES): New variable.
(sendkey_mod_CFLAGS): Likewise.
(sendkey_mod_LDFLAGS): Likewise.
2010-08-19 21:03:14 +02:00
Colin Watson
51f1f5afab
* configure.ac: Move AM_INIT_AUTOMAKE after AC_CANONICAL_TARGET to
...
fix warnings from Autoconf.
2010-08-18 11:15:08 +01:00
Colin Watson
9da94e0576
* acinclude.m4 (grub_ASM_USCORE): Use a more accurate grep pattern,
...
to avoid false positives with some assemblers that output things
like "someprefix_func" as part of their output.
2010-08-18 11:08:00 +01:00
Robert Millan
729a0f2e0c
2010-08-15 Robert Millan <rmh@gnu.org>
...
* kern/emu/misc.c (grub_get_libzfs_handle): Handle libzfs_init()
errors.
* kern/emu/getroot.c (find_root_device_from_libzfs): Handle
grub_get_libzfs_handle() errors.
2010-08-15 22:48:23 +02:00
Robert Millan
f3710e088c
2010-08-14 Robert Millan <rmh@gnu.org>
...
* kern/emu/misc.c (grub_find_zpool_from_dir): Abort function if
filesystem is not ZFS.
2010-08-14 16:53:25 +02:00
BVK Chaitanya
7a3c13dea5
Fix for misspelled color names defaulting to black/black (bug
...
reported by Doug Nazar)
* include/grub/normal.h (grub_parse_color_name_pair): Add return
status to prototype.
* normal/color.c (grub_parse_color_name_pair): Return failure
status.
(grub_env_write_color_normal): Ignore bad color names.
(grub_env_write_color_highlight): Likewise.
* normal/main.c (GRUB_MOD_INIT): Set default color names.
2010-08-12 20:52:42 +05:30
BVK Chaitanya
ab8ba50d75
"shift" command support to GRUB script.
...
* include/grub/script_sh.h (grub_script_shift): New prototype.
* script/execute.c (grub_script_shift): New function.
* script/main.c (grub_script_init): Register shift command.
(grub_script_fini): Unregister shift command.
* util/grub-script-check.c (grub_script_cmd_shift): New function.
* tests/grub_script_shift.in: New testcase.
* conf/tests.rmk: Rules for new testcase.
2010-08-12 12:07:27 +05:30
BVK Chaitanya
4d61999e33
"continue" command support to GRUB script.
...
* script/execute.c (grub_script_execute_cmdwhile): Continue support.
(grub_script_break): Continue support.
* script/main.c (grub_script_init): Register continue command.
(grub_script_fini): Unregister continue command.
* tests/grub_script_continue.in: New testcase.
* conf/tests.rmk: Rules for new testcase.
2010-08-12 11:48:21 +05:30
BVK Chaitanya
4df51e0007
"break" command support to GRUB script.
...
* conf/common.rmk: Rule updates to grub-script-check.
* include/grub/misc.h (grub_min): New function.
* include/grub/script_sh.h (grub_script_init): New prototype.
(grub_script_fini): New prototype.
(grub_script_break): New prototype.
* script/main.c (grub_script_init): New function.
(grub_script_fini): New function.
* script/execute.c (grub_script_break): New function.
* normal/main.c: Calls to grub_script_{init,fini}.
* util/grub-script-check.c (grub_script_break): New function.
* tests/grub_script_break.in: New testcase.
* conf/tests.rmk: Rules for new test case.
2010-08-12 09:35:15 +05:30
BVK Chaitanya
f12c842082
Function parameters support to GRUB script.
...
* script/yylex.l (VARIABLE): Regular expression update.
* script/function.c (grub_script_function_call): Moved ...
* script/execute.c (grub_script_function_call): ... to here.
(grub_script_execute_arglist_to_argv): Removed.
(grub_script_arglist_to_argv): New function.
* script/argv.c: New file.
(grub_script_argv_free): New function.
(grub_script_argv_next): Likewise.
(grub_script_argv_append): Likewise.
(grub_script_argv_split_append): Likewise.
* include/grub/script_sh.h (grub_script_argv): New struct.
(grub_script_argv_free): New function.
(grub_script_argv_next): Likewise.
(grub_script_argv_append): Likewise.
(grub_script_argv_split_append): Likewise.
* conf/common.rmk (normal.mod): New source script/argv.c.
* tests/grub_script_echo1.in: More tests.
* tests/grub_script_vars1.in: Likewise.
* tests/grub_script_functions.in: New test case.
* conf/tests.rmk: Rules for new testcase.
2010-08-12 09:20:58 +05:30
BVK Chaitanya
8022b74825
Remove grub_script_cmdblock struct.
...
* include/grub/script_sh.h: Remove grub_script_cmdblock.
* script/parser.y: Likewise.
* script/execute.c: Rename cmdblock suffix to cmdlist.
* script/script.c: Likewise.
* util/grub-script-check.c: Likewise.
2010-08-12 09:04:37 +05:30
Yves Blusseau
79a6ba6101
2010-08-11 Yves Blusseau <blusseau@zetam.org>
...
* .bzrignore: add grub-macho2img
2010-08-11 13:24:37 +02:00
Vladimir 'phcoder' Serbinenko
d04b9414a8
* kern/i386/qemu/init.c (grub_qemu_init_cirrus): Fix compilation error.
2010-08-11 04:25:56 +02:00
Vladimir 'phcoder' Serbinenko
f947ab49b0
Remove the dump of sm712 initialisation sequence.
...
* include/grub/pci.h (GRUB_PCI_CLASS_SUBCLASS_VGA): New const.
* include/grub/vga.h (GRUB_VGA_IO_ARX_READ): New register.
(GRUB_VGA_IO_MISC_WRITE): Likewise.
(GRUB_VGA_CR_*): Added many registers.
(GRUB_VGA_SR_*): Likewise.
(GRUB_VGA_GR_*): Likewise.
(grub_vga_write_arx): New function.
(grub_video_hw_config): New struct.
(grub_vga_set_geometry): New function.
* kern/i386/qemu/init.c (load_palette): Use grub_vga_write_arx and
GRUB_PCI_CLASS_SUBCLASS_VGA.
* video/cirrus.c (grub_video_cirrus_setup): Use grub_vga_set_geometry.
* video/sm712.c (grub_sm712_write_reg): New function
(grub_sm712_read_reg): Likewise.
(grub_sm712_sr_write): Likewise.
(grub_sm712_gr_write): Likewise.
(grub_sm712_cr_write): Likewise.
(grub_sm712_write_arx): Likewise.
(grub_sm712_cr_shadow_write): Likewise.
(grub_sm712_write_dda_lookup): Likewise.
(grub_video_sm712_setup): Initialise the video rather then
blindly replay the dump.
(main) [TEST]: Add a routine to be able to compile as standalone for
tests.
* video/sm712_init.c (sm712_init): Removed.
(sm712_sr_seq1): New array.
(sm712_sr_seq2): Likewise.
2010-08-11 04:18:07 +02:00
Vladimir 'phcoder' Serbinenko
f0206638bf
* include/grub/vga.h: Add missing grub/pci.h include.
2010-08-11 04:00:06 +02:00
Yves Blusseau
2764da3ba2
2010-08-10 Yves Blusseau <blusseau@zetam.org>
...
* util/grub-macho2img.c (main): fix typo
2010-08-10 16:32:48 +02:00
Vladimir 'phcoder' Serbinenko
cf0c775ed4
* include/grub/vga.h (grub_vga_gr_write): Add GRUB_MACHINE_PCI_IO_BASE.
...
(grub_vga_gr_read): Likewise.
(grub_vga_cr_write): Likewise.
(grub_vga_cr_read): Likewise.
(grub_vga_sr_write): Likewise.
(grub_vga_sr_read): Likewise.
(grub_vga_palette_read): Likewise.
(grub_vga_palette_write): Likewise.
* video/sm712.c (GRUB_SM712_REG_BASE): New definition.
(grub_sm712_sr_read): New function.
(grub_video_sm712_setup): Use grub_vga_sr_write and grub_sm712_sr_read.
* video/sm712_init.c (sm712_init): Substract GRUB_MACHINE_PCI_IO_BASE.
2010-08-10 13:43:43 +02:00
Robert Millan
07f360e92d
2010-08-09 Robert Millan <rmh@gnu.org>
...
* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Filter
out unused variables on non-ZFS build.
2010-08-09 17:44:24 +02:00
Robert Millan
346c207240
2010-08-08 Robert Millan <rmh@gnu.org>
...
Fix path generation for sub-filesystems in ZFS.
* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): Add
missing slash.
2010-08-09 00:11:19 +02:00
Robert Millan
7117542069
2010-08-08 Robert Millan <rmh@gnu.org>
...
* util/grub-fstest.c (read_file, cmd_cmp): Improve error message.
2010-08-08 22:47:32 +02:00
Robert Millan
0d8286f328
2010-08-08 Robert Millan <rmh@gnu.org>
...
* util/grub.d/10_kfreebsd.in: When files required for ZFS do not
exist, issue a proper error message (rely on `ls' for translated
strings).
2010-08-08 16:27:58 +02:00
Robert Millan
55dd292477
2010-08-08 Robert Millan <rmh@gnu.org>
...
Fix grub-probe invocation.
* util/grub.d/10_kfreebsd.in: s/label/fs_label/g.
2010-08-08 15:45:33 +02:00
Robert Millan
d3dd9e80f6
2010-08-04 Robert Millan <rmh@gnu.org>
...
* configure.ac: Remove checks for getfsstat() and getmntany().
Add checks for `<sys/param.h>' and `<sys/mount.h>'.
* kern/emu/misc.c [HAVE_GETMNTANY]: Remove `<sys/mnttab.h>'.
[HAVE_SYS_PARAM_H]: Include `<sys/param.h>'.
[HAVE_SYS_MOUNT_H]: Include `<sys/mount.h>'.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_mount_point_from_dir): Remove
function.
(grub_find_zpool_from_dir): Use statfs() instead of indirect matching
via find_mount_point_from_dir() and getfsstat() / getmntany().
2010-08-04 14:45:58 +02:00
Robert Millan
0de22aa997
2010-08-04 Robert Millan <rmh@gnu.org>
...
* include/grub/emu/misc.h (grub_find_mount_point_from_dir)
(grub_find_zpool_from_mount_point): Merge into ...
(grub_find_zpool_from_dir): ... this.
* kern/emu/misc.c: Likewise.
* kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Replace
grub_find_mount_point_from_dir() / grub_find_zpool_from_mount_point()
with grub_find_zpool_from_dir().
* kern/emu/getroot.c (find_root_device_from_libzfs): Likewise.
2010-08-04 13:29:13 +02:00
Robert Millan
62858144fe
2010-08-04 Robert Millan <rmh@gnu.org>
...
Support OpenSolaris in ZFS device resolution.
* configure.ac: Check for getmntany().
* kern/emu/misc.c [HAVE_GETMNTANY]: Include `<sys/mnttab.h>'.
[HAVE_GETMNTANY] (grub_find_zpool_from_mount_point): Add OpenSolaris
support.
2010-08-04 00:15:29 +02:00
Robert Millan
9dd6fd50b4
2010-08-03 Robert Millan <rmh@gnu.org>
...
Fix grub-emu build.
* include/grub/util/misc.h: Move `<grub/util/libzfs.h>' to ...
* include/grub/emu/misc.h: ... here.
* include/grub/util/misc.h (grub_get_libzfs_handle): Move function ...
* include/grub/emu/misc.h (grub_get_libzfs_handle): ... here.
* util/misc.c: Remove `<grub/util/libzfs.h>'.
[HAVE_LIBZFS] (libzfs_handle, fini_libzfs)
(grub_get_libzfs_handle): Move to ...
* kern/emu/misc.c [HAVE_LIBZFS] (__libzfs_handle, fini_libzfs)
(grub_get_libzfs_handle): ... here.
2010-08-03 23:51:48 +02:00
BVK Chaitanya
c9f7ff97cf
* script/execute.c (grub_script_execute_cmdline): Check for NULL
...
as command name case.
2010-08-03 11:56:36 +05:30
Colin Watson
a870a783be
* disk/raid.c (insert_array): Select unique numbers for named arrays
...
as well, for use as keys in the disk cache.
2010-08-02 09:51:23 -05:00
Robert Millan
c7db243b92
2010-08-01 Robert Millan <rmh@gnu.org>
...
* util/grub.d/10_kfreebsd.in: Initialize ${kfreebsd_device} as the
kFreeBSD device name, except on ZFS where the filesystem label is
used.
(kfreebsd_entry): On ZFS root, load `opensolaris.ko', `zfs.ko' and
`/boot/zfs/zpool.cache'.
Set mountfrom kernel variable using ${kfreebsd_device}.
2010-08-01 23:21:09 +02:00
Robert Millan
f7abdefbdd
2010-08-01 Robert Millan <rmh@gnu.org>
...
Make it even harder to use uninitialized `libzfs_handle' (and
make the interface a bit simpler).
* include/grub/util/misc.h (grub_util_init_libzfs)
(libzfs_handle): Remove.
(grub_get_libzfs_handle): New prototype.
* util/misc.c [HAVE_LIBZFS] (libzfs_handle): Add `static'
attribute.
(grub_util_init_libzfs): Remove.
(grub_get_libzfs_handle): New function.
* kern/emu/getroot.c (find_root_device_from_libzfs): Use
grub_get_libzfs_handle() to obtain a libzfs handle instead of
accessing `libzfs_handle' directly.
2010-08-01 23:12:24 +02:00
Robert Millan
c882acc031
2010-08-01 Robert Millan <rmh@gnu.org>
...
* include/grub/emu/misc.h (grub_find_mount_point_from_dir)
(grub_find_zpool_from_mount_point): New function prototypes.
* kern/emu/getroot.c [HAVE_GETFSSTAT]: Move `<sys/mount.h>' to ...
* kern/emu/misc.c [HAVE_GETFSSTAT]: ... here.
* kern/emu/getroot.c (find_mount_point_from_dir): Move to ...
* kern/emu/misc.c (grub_find_mount_point_from_dir): ... this. Remove
`static' attribute.
* kern/emu/getroot.c (find_root_device_from_libzfs): Split code for
finding zpool from mount point into ...
* kern/emu/misc.c (grub_find_zpool_from_mount_point): ... this.
* kern/emu/misc.c (grub_make_system_path_relative_to_its_root): When
requested path is part of a ZFS pool, use
grub_find_zpool_from_mount_point() to detect its filesystem name,
and generate a path with `/fsname@path' syntax.
2010-08-01 22:59:02 +02:00
Colin Watson
8bfe31d82b
* include/grub/util/libzfs.h (libzfs_init): Set argument list to
...
(void) rather than () so that this is a proper prototype.
2010-08-01 16:41:46 -05:00
Vladimir 'phcoder' Serbinenko
553df63d76
* lib/arg.c (grub_arg_show_help): Add the necessary spacing.
2010-08-01 21:01:05 +02:00
Vladimir 'phcoder' Serbinenko
8687cf071e
* kern/emu/getroot.c (find_mount_point_from_dir): Compile only if
...
[HAVE_LIBZFS && HAVE_LIBNVPAIR]
2010-08-01 16:11:27 +02:00
Colin Watson
ea9be8eadb
* util/grub-mkrescue.in: Remove ${efi_dir} after building efi.img.
2010-08-01 11:30:03 -05:00
Colin Watson
6eea041aa4
* script/yylex.l (NAME): Remove [:digit:], redundant with [:alnum:].
2010-08-01 11:28:12 -05:00
Colin Watson
2cfb45df5e
* docs/grub.texi (Simple configuration): Document GRUB_CMDLINE_XEN
...
and GRUB_CMDLINE_XEN_DEFAULT. Recommend setting
GRUB_GFXPAYLOAD_LINUX=text rather than unsetting it in order to
disable gfxpayload.
(Shell-like scripting): Add real content.
(Serial terminal): Suggest `terminal_input serial; terminal_output
serial' rather than putting the two commands on separate lines,
since console input will be inoperative after the first command.
(menuentry): Document --class, --users, and --hotkey options.
(terminfo): Describe what `visually-ordered UTF-8' means (thanks,
Vladimir Serbinenko).
2010-08-01 11:25:09 -05:00
Vladimir Serbinenko
7decd202a7
* kern/misc.c (grub_memset): Optimise to reduce cache stalls.
...
Also-By: Colin Watson <cjwatson@ubuntu.com>
2010-08-01 09:44:36 -05:00
Robert Millan
deb0caa38e
2010-08-01 Robert Millan <rmh@gnu.org>
...
Prevent accidental use of uninitialized libzfs_handle.
* util/grub-probe.c (main): Move grub_util_init_libzfs() call to ...
* kern/emu/getroot.c (find_root_device_from_libzfs): ... here.
* util/misc.c (grub_util_init_libzfs): Make this function idempotent.
2010-08-01 15:23:44 +02:00
Colin Watson
ce04ef47e2
* util/grub.d/20_linux_xen.in: Don't use UUID for LVM root (matching
...
util/grub.d/10_linux.in). Fixes Debian bug #591093 .
2010-08-01 08:54:10 -05:00
Robert Millan
ebf53056b8
2010-08-01 Robert Millan <rmh@gnu.org>
...
* kern/emu/getroot.c: Include `<grub/util/misc.h>'.
2010-08-01 14:47:14 +02:00
Robert Millan
3710bb6b96
2010-07-31 Robert Millan <rmh@gnu.org>
...
* util/grub.d/10_kfreebsd.in: Make module handling more generic.
2010-08-01 02:14:07 +02:00
Robert Millan
8072efebf2
2010-07-31 Robert Millan <rmh@gnu.org>
...
* kern/emu/misc.c: Add missing license header.
2010-07-31 18:45:57 +02:00
Robert Millan
3169f4c76a
2010-07-31 Robert Millan <rmh@gnu.org>
...
* configure.ac: Check for `libzfs.h' and `libnvpair.h'.
* include/grub/util/libnvpair.h: Include `<config.h>'.
[HAVE_LIBNVPAIR_H]: Include `<libnvpair.h>' instead of
declaring libnvpair prototypes ourselves.
* include/grub/util/libzfs.h: Include `<config.h>'.
[HAVE_LIBZFS_H]: Include `<libzfs.h>' instead of
declaring libzfs prototypes ourselves.
(libzfs_handle): Moved to ...
* include/grub/util/misc.h (libzfs_handle): ... here.
Include `<grub/util/libzfs.h>'.
2010-07-31 12:22:01 +02:00
Robert Millan
c9a00aeeaa
2010-07-30 Robert Millan <rmh@gnu.org>
...
* include/grub/emu/misc.h: Add missing license header.
2010-07-30 22:01:10 +02:00
Robert Millan
a184f9c801
2010-07-30 Robert Millan <rmh@gnu.org>
...
Enable `grub-probe -t device' resolution on ZFS.
* configure.ac: Check for getfsstat(), libzfs and libnvpair.
* include/grub/util/libnvpair.h: New file.
* include/grub/util/libzfs.h: New file.
* kern/emu/getroot.c: Include `<assert.h>' and `<error.h>'.
[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Include `<grub/util/libzfs.h>' and
`<grub/util/libnvpair.h>'.
[HAVE_GETFSSTAT]: Include `<sys/mount.h>'.
(find_mount_point_from_dir): New static function.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (find_root_device_from_libzfs): New
function.
[HAVE_LIBZFS && HAVE_LIBNVPAIR] (grub_guess_root_device): Use
find_root_device_from_libzfs() before ressorting to find_root_device().
* include/grub/util/misc.h (grub_util_init_libzfs): New function
prototype.
* util/misc.c: Include `<grub/util/libzfs.h>'.
(grub_util_init_libzfs): New function.
[HAVE_LIBZFS] (libzfs_handle): New global variable.
[HAVE_LIBZFS] (fini_libzfs): New static function.
(grub_util_init_libzfs): New function.
* util/grub-probe.c (main): Call grub_util_init_libzfs().
2010-07-30 21:43:12 +02:00
Robert Millan
f7790cdd5d
2010-07-30 Robert Millan <rmh@gnu.org>
...
* include/grub/emu/misc.h (grub_make_system_path_relative_to_its_root)
(xmalloc, xrealloc, xstrdup, xasprintf): Add
`warn_unused_result' attribute.
* include/grub/misc.h (grub_strdup, grub_strndup, grub_strlen)
(grub_xasprintf, grub_xvasprintf): Likewise.
* include/grub/emu/misc.h (xasprintf): Remove duplicate prototype.
2010-07-30 11:27:02 +02:00
Robert Millan
0806b63c09
2010-07-29 Robert Millan <rmh@gnu.org>
...
* util/grub-probe.c (PRINT_FS_LABEL): New enum value.
(probe): Handle `PRINT_FS_LABEL'.
(main): Handle `-t fs_label'.
2010-07-29 18:46:42 +02:00
Robert Millan
9f841f5cbf
2010-07-29 Robert Millan <rmh@gnu.org>
...
* configure.ac: Remove grub-mkisofs checks.
2010-07-29 15:06:39 +02:00
Vladimir 'phcoder' Serbinenko
463711215f
* util/ieee1275/grub-install.in: Don't use empty grub_device.
...
Reported by: Lennart Sorensen.
2010-07-28 18:25:48 +03:00
Vladimir 'phcoder' Serbinenko
0ac33bf5eb
* util/grub.d/00_header.in: Remove compatibility with terminal.mod
...
prior to terminal_input/terminal_output separation. It's been over 1.5
years and those versions weren't widely deployed.
2010-07-21 06:44:38 +02:00
Colin Watson
697e053c44
real name for Michael Guntsche
2010-07-22 09:44:19 +01:00
Colin Watson
a9600892c1
* disk/raid.c (insert_array): Don't count named arrays when looking
...
for unused array numbers.
Reported and tested by: maru.
2010-07-22 09:38:06 +01:00
Colin Watson
c03507dfb8
* bus/usb/emu/usb.c (grub_usb_poll_devices): Add a dummy
...
implementation of this so that grub-emu links again, with a note
that this should support hotplugging in the future.
2010-07-20 23:16:32 +01:00
Colin Watson
b26f1c1160
* kern/emu/getroot.c (grub_util_get_grub_dev): Use xasprintf.
2010-07-20 23:09:45 +01:00
Colin Watson
efc9d7f175
* disk/loopback.c (grub_cmd_loopback): Don't leak a grub_file_t
...
handle on failure.
(grub_loopback_close): Remove empty function.
(grub_loopback_dev): Remove close method.
2010-07-20 22:14:26 +01:00
Colin Watson
dd8ff5c9e9
Disable EFI cursor when the EFI console becomes inactive.
...
* term/efi/console.c (grub_efi_console_init): New function.
(grub_efi_console_fini): New function.
(grub_console_term_output): Register init and fini methods.
2010-07-20 22:00:18 +01:00
Vladimir 'phcoder' Serbinenko
5e3bec6716
* tests/util/grub-shell-tester.in: Remove bashism and declare as
...
sh script.
2010-07-20 22:10:23 +02:00
Vladimir 'phcoder' Serbinenko
afaec079d1
* disk/loopback.c (grub_loopback): Replace filename with file.
...
(delete_loopback): Handle new semantics.
(grub_cmd_loopback): Likewise.
(grub_loopback_iterate): Likewise.
(grub_loopback_close): Likewise.
2010-07-20 21:56:00 +02:00
Vladimir 'phcoder' Serbinenko
a6a11f3cac
* util/i386/efi/grub-install.in: Revert to platform-specific behaviour
...
with -p "".
Reported by: Tito Keitel.
2010-07-20 20:36:11 +02:00
Vladimir 'phcoder' Serbinenko
64a638b0d9
* docs/grub.texi (Naming convention): Document new naming convention.
2010-07-20 20:22:52 +02:00
Vadim Solomin
ab8ba95760
2010-07-20 Vadim Solomin <vadic052@gmail.com>
...
2010-07-20 Colin Watson <cjwatson@ubuntu.com>
Generate device.map in something closer to the old ordering.
* util/deviceiter.c (struct device): New declaration.
(compare_file_names): Rename to ...
(compare_devices): ... this. Sort by kernel name in preference to
the stable by-id name, but keep the latter as a fallback comparison.
Update header comment.
(grub_util_iterate_devices) [__linux__]: Construct and sort an array
of `struct device' rather than of plain file names.
Also-By: Colin Watson <cjwatson@ubuntu.com>
2010-07-20 17:14:00 +01:00
Thomas Frauendorfer
a29d6a4bc5
* lib/i386/relocator_asm.S [! __x86_64__]: Don't try to disable amd64
...
on i386.
2010-07-20 15:59:56 +02:00
Vladimir 'phcoder' Serbinenko
39d824e8f9
* commands/acpi.c (setup_common_tables): Use sizeof instead of
...
hardcoding size.
(setv1table): Likewise.
2010-07-20 14:42:32 +02:00
Felix Zielcke
f058276b19
2010-07-20 Colin Watson <cjwatson@ubuntu.com>
...
* disk/raid.c (insert_array): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
* kern/emu/getroot.c (get_mdadm_name) [__linux__]: New function.
(grub_util_get_grub_dev): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
(grub_util_get_grub_dev) [__linux__]: Get the array name from mdadm
if possible.
* util/i386/pc/grub-setup.c (main): Handle md/* devices.
* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Add start_sector
parameter. Set its pointer target to 0.
* disk/mdraid_linux.c (grub_mdraid_detect): Add start_sector
parameter. Set its pointer target to 0 for 0.9 metadata, or to the
`data_offset' value from the superblock for 1.x metadata.
* disk/raid.c (grub_raid_read): Offset reads by the start sector of
data on the device.
(insert_array): Record the start sector of data on the device.
(grub_raid_register): Pass start_sector parameters to
grub_raid_list->detect and insert_array.
* include/grub/raid.h (struct grub_raid_array): Add start_sector
member.
(struct grub_raid): Add start_sector parameter to `detect'.
* disk/mdraid_linux.c (struct grub_raid_super_1x): Remove
__attribute__ ((packed)), leaving a comment.
(grub_mdraid_detect): Split out 0.9 and 1.x detection to ...
(grub_mdraid_detect_09): ... here and ...
(grub_mdraid_detect_1x): ... here.
2010-07-20 Peter Henn <peter.henn@web.de>
* disk/mdraid_linux.c (grub_mdraid_detect): Fix calculation of 1.x
chunk size and disk size, which are already given as sector counts
as distinct from the 0.90 units. Fetch the correct device number
from the role table instead of using the table index.
2010-07-20 Felix Zielcke <fzielcke@z-51.de>
* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Set array->name to NULL.
* disk/mdraid_linux.c (grub_raid_super_1x): New structure.
(WriteMostly1): New macro.
Set array->name to NULL for metadata format 0.90. Add support for
metadata 1.x. Fix some comments.
* disk/raid.c (): Add support for name based RAID arrays. Fix a
few comments.
* util/getroot.c (grub_util_get_grub_dev): Add support for
/dev/md/name style devices.
Also-By: Peter Henn <peter.henn@web.de>
Also-By: Colin Watson <cjwatson@ubuntu.com>
2010-07-20 11:26:27 +01:00
Colin Watson
4b761da902
* .bzrignore: Ignore 20_linux_xen.
2010-07-20 11:20:23 +01:00
Colin Watson
5771289a14
* util/import_unicode.py: Remove unnecessary imports.
2010-07-17 19:27:18 +01:00
Aleš Nesrsta
5dab68dfa4
Hotplugging and USB hub support.
...
* bus/usb/ohci.c (grub_ohci_td): Add convenience fields.
(grub_ohci): Likewise.
(GRUB_OHCI_REG_CONTROL_BULK_ENABLE): New definition.
(GRUB_OHCI_REG_CONTROL_CONTROL_ENABLE): Likewise.
(GRUB_OHCI_RESET_CONNECT_CHANGE): Likewise.
(GRUB_OHCI_CTRL_EDS): Likewise.
(GRUB_OHCI_BULK_EDS): Likewise.
(GRUB_OHCI_TDS): Likewise.
(GRUB_OHCI_ED_ADDR_MASK): Likewise.
(grub_ohci_ed_phys2virt): New function.
(grub_ohci_virt_to_phys): Likewise.
(grub_ohci_td_phys2virt): Likewise.
(grub_ohci_td_virt2phys): Likewise.
(grub_ohci_pci_iter): Allocate memory and don't wait for stable
attachment.
(grub_ohci_find_ed): New function.
(grub_ohci_alloc_td): Likewise.
(grub_ohci_free_td): Likewise.
(grub_ohci_free_tds): Likewise.
(grub_ohci_transfer): Use previously allocated memory.
(grub_ohci_portstatus): Reset status changed bit.
(grub_ohci_detect_dev): Supply status changed.
(grub_ohci_fini_hw): Free memory.
(grub_ohci_restore_hw): Reallocate memory.
* bus/usb/uhci.c (grub_uhci_portstatus): Don't reset on disable.
Reset status change.
(grub_uhci_detect_dev): Supply status_change.
* bus/usb/usb.c (attach_hooks): New var.
(grub_usb_device_attach): New function.
(grub_usb_register_attach_hook_class): Likewise.
(grub_usb_unregister_attach_hook_class): Likewise.
* bus/usb/usbhub.c (grub_usb_hub_add_dev): Handle errors correctly.
(grub_usb_add_hub): Reset connection changed bit.
(attach_root_port): New function.
(grub_usb_root_hub): Likewise.
(poll_nonroot_hub): Likewise.
(grub_usb_poll_devices): Likewise.
* commands/usbtest.c (grub_cmd_usbtest): Poll devices before listing.
* disk/usbms.c (grub_usbms_open): Use device hooks.
(grub_usbms_iterate) :Poll devices.
(grub_usbms_finddevs): Split into ...
(grub_usbms_attach): ... this ...
(grub_usbms_attach): ... and this.
* include/grub/usb.h (grub_usb_controller_dev): Supply status_changed
in detect_dev.
(grub_usb_interface): New fields attached and detach_hook.
(grub_usb_attach_hook_class): New type.
(grub_usb_attach_desc): New struct.
(grub_usb_register_attach_hook_class): New function.
(grub_usb_unregister_attach_hook_class): Likewise.
(grub_usb_poll_devices): Likewise.
(grub_usb_device_attach): Likewise.
* include/grub/usbtrans.h (GRUB_USB_HUB_FEATURE_C_CONNECTED): New const.
(GRUB_USB_HUB_STATUS_C_CONNECTED): Likewise.
2010-07-17 03:06:34 +02:00
Vladimir 'phcoder' Serbinenko
3222efaff3
* include/grub/bsdlabel.h (GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION): New definition.
...
* partmap/bsdlabel.c (bsdlabel_partition_map_iterate): Use FreeBSD
delta determination style. Works with most NetBSD partitions too.
2010-07-17 01:57:48 +02:00
Vladimir 'phcoder' Serbinenko
139b714a93
* kern/partition.c [GRUB_UTIL]: Add missing util/misc.h inclusion.
...
* partmap/bsdlabel.c [GRUB_UTIL]: Likewise.
2010-07-17 01:55:01 +02:00
Vladimir 'phcoder' Serbinenko
986aad56c1
* disk/scsi.c (grub_scsi_open): Fix incorrect pointer dereference.
2010-07-17 01:52:41 +02:00
Anton Blanchard
99be513c3b
* loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Do not reject
...
ET_DYN files.
2010-07-14 16:47:45 +01:00
Grégoire Sutre
18075f6254
Fix condition in Makefile.in's LINGUAS assignment.
2010-07-14 16:47:28 +02:00
Grégoire Sutre
8d9a5b15e3
Discard improperly nested partitions.
2010-07-14 11:26:17 +02:00
Colin Watson
19563c25c1
* Makefile.in (.SUFFIX): Spell correctly, as ...
...
(.SUFFIXES): ... this. Fixes bug where `make foo' (where foo is a
bare module name without `.mod', e.g. `test') tried to invoke a
Modula-2 compiler.
2010-07-13 12:24:07 +01:00
Colin Watson
1a1f1e6794
* README: Point to the Info manual.
2010-07-13 12:20:32 +01:00
Jiro SEKIBA
811b0dcab8
* fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate
...
2nd superblock position from partition size.
2010-07-13 11:47:30 +02:00
Colin Watson
e4f4eafc91
* Makefile.in (MAINTAINER_CLEANFILES): Remove
...
unicode/UnicodeData.txt, unicode/BidiMirroring.txt, and
unicode/ArabicShaping.txt again; these are inputs to autogen.sh, not
outputs.
2010-07-10 22:37:05 +01:00
Vladimir 'phcoder' Serbinenko
4274c30fbc
Restructure SCSI .id handling.
...
Reported and tested by: Aleš Nesrsta.
* disk/ata.c (grub_atapi_close): Removed. All users updated.
(grub_atapi_dev): Changed .name to "ata". New field .id.
* disk/usbms.c (grub_usbms_close): Removed. All users updated.
(grub_usbms_dev): New field .id.
* disk/scsi.c (grub_scsi_iterate): Generate name.
(grub_scsi_open): Parse name.
* include/grub/scsi.h (grub_make_scsi_id): New function.
(grub_scsi_dev): Change iterate and open to number instead of naming
busses. All users updated.
(grub_scsi): Remove name. Add .bus.
2010-07-10 02:59:33 +02:00
Vladimir 'phcoder' Serbinenko
5bc24388fb
* commands/help.c (grub_cmd_help): Fix a typo.
2010-07-10 02:40:41 +02:00
Vladimir 'phcoder' Serbinenko
249975ba6b
* normal/term.c (put_glyphs_terminal): Fix state->num_lines counting.
...
Reported and tested by: Colin Watson.
2010-07-10 02:23:48 +02:00
Vladimir 'phcoder' Serbinenko
3eaac1a13e
* util/grub-mkrescue.in: Don't use tar GNU-ism since it's not necessary
...
in this context.
2010-07-10 02:15:49 +02:00
Vladimir 'phcoder' Serbinenko
becce1b16a
* tests/util/grub-shell.in: Remove bashisms and declare as sh script.
2010-07-07 17:51:26 +02:00
Colin Watson
f7bf0918aa
* term/gfxterm.c (grub_gfxterm_background_image_cmd): Fix
...
indentation.
2010-07-07 14:12:16 +01:00
Colin Watson
0b0f9620f2
* conf/common.rmk (grub_probe_SOURCES): Add disk/raid5_recover.c
...
and disk/raid6_recover.c.
* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
* conf/sparc64-ieee1275.rmk (grub_setup_SOURCES): Likewise.
2010-07-06 19:27:55 +01:00
Colin Watson
1e54546914
* term/gfxterm.c (repaint_schedulded): Rename to ...
...
(repaint_scheduled): ... this. Update all callers.
(repaint_was_schedulded): Rename to ...
(repaint_was_scheduled): ... this. Update all callers.
2010-07-06 18:31:45 +01:00
Colin Watson
5357687a55
* util/deviceiter.c (grub_util_iterate_devices): Skip MD devices,
...
which we expect to be handled by upper layers.
2010-07-06 15:10:36 +01:00
BVK Chaitanya
29d7e783d2
* bus/usb/usbhub.c: #include time.h header.
2010-07-06 14:53:55 +05:30
Colin Watson
37582066cd
* fs/reiserfs.c (grub_reiserfs_iterate_dir): Zero out first byte of
...
entry_name also for entries without stat blocks (e.g. ".."); fixes
corruption of the first entry in a directory.
2010-07-06 09:51:42 +01:00
Colin Watson
c8c069533f
* util/grub.d/00_header.in: Process GRUB_THEME and GRUB_BACKGROUND
...
after setting gfxterm as the active terminal. GRUB_BACKGROUND
doesn't work otherwise.
2010-07-06 09:42:37 +01:00
Vladimir 'phcoder' Serbinenko
75d959ea7c
Revert latest two Aleš' commits
2010-07-06 01:55:26 +02:00
starous
f1f7d19ead
ChangeLog & usbhub.c correction
2010-07-05 20:34:27 +02:00
Colin Watson
e75056f162
* docs/grub.texi (Features): Update list of supported file systems.
...
(GNU/Linux): Update for GRUB 2.
(Serial terminal): Remove mention of --disable-serial, which was a
GRUB Legacy configure option. Update instructions to use
`terminal_input' and `terminal_output' rather than `terminal'.
(Vendor power-on keys): Copy-edit. Add cross-references to `Simple
configuration' and `Installing GRUB using grub-install'.
(Menu entry editor): Update for GRUB 2.
(terminfo): Add vt100-color, ieee1275, and dumb terminal types.
Document new -a, -u, and -v options.
(initrd): New section.
(initrd16): New section.
(linux): New section.
(linux16): New section.
(search): The `var' argument to `--set' is optional.
(GRUB only offers a rescue shell): Go into a little more detail on
drive ordering.
2010-07-05 11:08:04 +01:00
Colin Watson
5cf691510f
* Makefile.in: Set LINGUAS to empty if ENABLE_NLS is undefined.
2010-07-05 09:29:02 +01:00
Colin Watson
fcda2a1f80
fix typo in reporter name
2010-07-05 01:45:25 +01:00
Colin Watson
e3f90044e1
* Makefile.in (MAINTAINER_CLEANFILES): Add unicode/UnicodeData.txt,
...
unicode/BidiMirroring.txt, unicode/ArabicShaping.txt, and unidata.c.
2010-07-05 01:24:10 +01:00
Colin Watson
38d8f4f3f7
* util/i386/pc/grub-setup.c (setup): Rename prefix to
...
install_prefix, in line with install_dos_part and install_bsd_part.
Add new prefix variable, which is copied to install_prefix after
comparing core.img in memory with the one read from disk in the
no-embedding case, and use that rather than overwriting
install_prefix immediately when installing to a partition.
Fixes Debian bug #586621 ; based on patches by Matt Kraai and M. Vefa
Bicakci.
2010-07-05 01:09:00 +01:00
Grégoire Sutre
57ebd41ef1
Avoid == in test command, it's not portable.
2010-07-05 00:45:14 +02:00
Colin Watson
cb7f64b229
* kern/emu/getroot.c [__GNU__]: Include <sys/mman.h> for munmap.
2010-07-04 22:00:45 +01:00
Vladimir 'phcoder' Serbinenko
72a2026d33
missing ChangeLog commit.
2010-07-04 14:29:01 +02:00
Grégoire Sutre
6b654bb0a5
Do not embed when there are multiple (top-level) partmaps.
2010-07-04 11:13:31 +02:00
Vladimir 'phcoder' Serbinenko
df3eb88f04
Bidi and diacritics support.
...
* Makefile.in (widthspec.bin): New target.
(widthspec.h): Likewise.
(TARGET_CFLAGS): Add -DHAVE_UNIFONT_WIDTHSPEC=1 if font was available.
* autogen.sh: Generate unidata.c.
* commands/cat.c (grub_cmd_cat): Don't use grub_putchar.
* commands/ls.c (grub_ls_list_devices): Likewise.
(grub_ls_list_files): Likewise.
* commands/minicmd.c (grub_mini_cmd_cat): Likewise.
(grub_mini_cmd_lsmod): Likewise.
* commands/read.c: Likewise.
* kern/corecmd.c (grub_core_cmd_ls): Likewise.
* kern/rescue_reader.c (grub_rescue_read_line): Likewise.
* lib/arg.c (grub_arg_show_help): Likewise.
* lib/crypto.c (grub_password_get): Likewise.
* normal/auth.c (grub_username_get): Likewise.
* normal/misc.c (grub_normal_print_device_info): Likewise.
* commands/help.c (grub_cmd_help): Use grub_unicode_aglomerate_comb.
* conf/common.rmk (grub_mkfont_SOURCES): Add unidata.c.
(gfxmenu_mod_SOURCES): Add gfxmenu/font.c.
(normal/charset.c_DEPENDENCIES): New variable.
(normal_mod_SOURCES): Add normal/charset.c and unidata.c.
(pkglib_MODULES): Remove charset.mod.
(charset_mod_SOURCES): Removed.
(charset_mod_CFLAGS): Likewise.
(charset_mod_LDFLAGS): Likewise.
(pkglib_MODULES) [ieee1275]: Remove terminfo.mod.
* conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Add term/terminfo.c
and term/tparm.c.
* conf/sparc64-ieee1275.rmk (kernel_img_SOURCES): Likewise.
* conf/i386-ieee1275.rmk (kernel_img_SOURCES): Likewise.
(kernel_img_HEADERS): Add terminfo.h.
* font/font.c (ascii_glyph_lookup): Return NULL on failure.
Fill ->font. Reverse ascii bitmaps.
(grub_font_get_xheight): New function.
* font/font.c (grub_font_get_string_width): Moved from here ...
* gfxmenu/font.c (grub_font_get_string_width): ... here.
* font/font.c (grub_font_draw_string): Moved from here ...
* gfxmenu/font.c (grub_font_draw_string): ... here.
* font/font.c (grub_font_dup_glyph): New function.
(grub_font_blit_glyph): Likewise.
(grub_font_blit_glyph_mirror): Likewise.
(blit_comb): Likewise.
(grub_font_construct_dry_run): Likewise.
(grub_font_get_constructed_device_width): Likewise.
(grub_font_construct_glyph): Likewise.
* include/grub/charset.h (grub_ucs4_to_utf8): New proto.
* include/grub/misc.h (grub_utf8_to_ucs4): Moved from here ...
* include/grub/charset.h (grub_utf8_to_ucs4): ... here.
* include/grub/font.h (GRUB_FONT_CODE_CHAR_MASK): New constant.
(GRUB_FONT_CODE_RIGHT_JOINED): Likewise.
(GRUB_FONT_CODE_LEFT_JOINED): Likewise.
(grub_font_get_xheight): New proto.
(grub_font_get_constructed_device_width): Likewise.
(grub_font_construct_glyph): Likewise.
* include/grub/font.h (grub_font_get_string_width): Moved from here ...
* include/grub/gfxmenu_view.h (grub_font_get_string_width): ... here.
* include/grub/font.h (grub_font_draw_string): Moved from here ...
* include/grub/gfxmenu_view.h (grub_font_draw_string): ... here.
* include/grub/i386/vga_common.h (grub_console_putchar): Moved from here..
* include/grub/i386/pc/console.h (grub_console_putchar): ... here.
* include/grub/i386/vga_common.h (grub_console_real_putchar): Removed.
(grub_console_getcharwidth): Likewise.
* include/grub/misc.h (grub_xputs): New proto.
(grub_puts): Inlined.
* include/grub/normal.h (grub_print_ucs4): Add margin specification.
(grub_normal_get_line_counter): Removed.
(grub_install_newline_hook): Likewise.
(grub_normal_get_char_counter): New proto.
(grub_normal_reset_more): Likewise.
(grub_xputs_normal): Likewise.
* include/grub/powerpc/ieee1275/console.h: Removed.
* include/grub/sparc64/ieee1275/console.h: Likewise.
* include/grub/term.h (GRUB_TERM_CODE_TYPE_MASK): New definition.
(GRUB_TERM_CODE_TYPE_ASCII): Likewise.
(GRUB_TERM_CODE_TYPE_CP437): Likewise.
(GRUB_TERM_CODE_TYPE_UTF8_LOGICAL): Likewise.
(GRUB_TERM_CODE_TYPE_UTF8_VISUAL): Likewise.
(GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS): Likewise.
(grub_term_input): Pass reference to self. All users updated.
(grub_term_output): Pass grub_unicode_glyph to putchar and getcharwidth.
Pass reference to self. New fields normal_color, highlight_color and
data. All users updated.
(grub_putchar): Removed.
(grub_putcode): Remove EXPORT_FUNC since it's not in kernel anymore.
(grub_unicode_estimate_width): New function.
(grub_term_getcharwidth): Add defaults.
(GRUB_TERM_DEFAULT_NORMAL_COLOR): New definition.
(GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR): Likewise.
(GRUB_TERM_DEFAULT_STANDARD_COLOR): Likewise.
(grub_cls): Remove EXPORT_FUNC.
(grub_setcolorstate): Inline.
(grub_newline_hook): Removed.
* include/grub/terminfo.h: Rewritten. All users updated.
* include/grub/unicode.h: New file.
* include/grub/video.h (grub_video_signed_rect): New type.
* kern/emu/console.c (grub_console_highlight_color): Removed.
(grub_console_normal_color): Likewise.
(grub_console_standard_color): Made static.
(grub_ncurses_putchar): Remove mapping.
(grub_ncurses_getcharwidth): Removed.
(grub_ncurses_term_output): Declare as GRUB_TERM_CODE_TYPE_ASCII.
(grub_ncurses_setcolor): Removed.
(grub_ncurses_getcolor): Likewise.
* kern/i386/pc/startup.S (grub_console_real_putchar): Renamed to ...
(grub_console_putchar): ... this.
(grub_console_putchar): Handle argument difference.
* kern/ieee1275/init.c (grub_machine_init): Split console_init into
console_init_early and console_init_lately.
* kern/sparc64/ieee1275/init.c (grub_machine_init): Likewise.
* kern/misc.c (grub_puts): Removed.
(grub_vprintf): Store UTF-8 string instead of outputting it directly.
(grub_vsnprintf_real): Remove str = NULL support.
* kern/misc.c (grub_utf8_to_ucs4): Move from here ...
* normal/charset.c (grub_utf8_to_ucs4): ... here.
* kern/term.c (grub_putcode): Renamed to ...
(grub_putcode_dumb): ... this. Pass grub_unicode_glyph instead of code.
(grub_putchar): Removed.
(grub_xputs_dumb): New function.
(grub_xputs): New variable.
* lib/charset.c: Move from here ...
* normal/charset.c: ... to here.
(grub_ucs4_to_utf8): New function.
(grub_ucs4_to_utf8_alloc): Use grub_ucs4_to_utf8.
(join_types): New variable.
(unpack_join): New function.
(bidi_types): New variable.
(unpack_bidi): New function.
(get_bidi_type): Likewise.
(get_join_type): Likewise.
(is_mirrored): Likewise.
(grub_unicode_get_comb_type): Likewise.
(grub_unicode_estimate_width) [HAVE_UNIFONT_WIDTHSPEC]: Likewise.
(is_type_after): Likewise.
(grub_unicode_aglomerate_comb): Likewise.
(bidi_line_wrap): Likewise.
(grub_bidi_line_logical_to_visual): Likewise.
(grub_bidi_logical_to_visual): Likewise.
(grub_unicode_mirror_code): Likewise.
(grub_unicode_shape_code): Likewise.
* normal/cmdline.c (grub_cmdline_get): Reset more counter.
Don't use grub_putchar.
* normal/main.c (grub_normal_init_page): Use grub_putcode.
(grub_normal_reader_init): Likewise.
(grub_xputs_saved): New variable.
(GRUB_MOD_INIT): Set grub_xputs.
(GRUB_MOD_FINI): Restore grub_xputs.
* normal/menu.c (grub_wait_after_message): Don't use grub_putchar.
(menu_init): Avoid printing gfxmenu error.
(show_menu): Use grub_normal_get_char_counter.
* normal/menu_entry.c (update_screen): Fix out-of-array.
(complete): Avoid NULL dereferencing.
* grub_menu_entry_run (grub_menu_entry_run): Don't use putchar.
* normal/menu_text.c (print_spaces): Removed.
(grub_print_ucs4): Likewise.
(grub_print_message_indented): Use grub_print_ucs4.
(print_message): Use grub_putcode.
(print_entry): Hanlde diacritics.
* normal/term.c (term_state): New type.
(grub_more_lines): Removed.
(term_states): New variable.
(grub_normal_line_counter): Renamed to ..
(grub_normal_char_counter): ...this. All users updated.
(grub_normal_get_line_counter): Renamed to ...
(grub_normal_get_char_counter): ... this.
(grub_normal_reset_more): New function.
(process_newline): Removed.
(print_more): New function.
(grub_install_newline_hook): Removed.
(map_code): New function.
(grub_puts_terminal): Use grub_print_ucs4.
(putglyph): New function.
(putcode_real): Likewise.
(grub_putcode): Use putcode_real.
(get_maxwidth): New function.
(get_startwidth): Likewise.
(print_ucs4_terminal): Likewise.
(find_term_state): Likewise.
(put_glyphs_terminal): Likewise.
(print_backlog): Likewise.
(print_ucs4_real): Likewise.
(grub_print_ucs4): Likewise.
(grub_xputs_normal): Likewise.
* term/efi/console.c (grub_console_putchar): Output diacritics.
(grub_console_getcharwidth): Removed.
(grub_console_term_output): Declare as GRUB_TERM_CODE_TYPE_UCS4_VISUAL.
* term/gfxterm.c (clear_char): Free chars.
(scroll_up): Avoid leaking memory.
(grub_gfxterm_putchar): Support diacritics.
(grub_video_term): Declare as GRUB_TERM_CODE_TYPE_UCS4_VISUAL.
* term/i386/pc/console.c (grub_console_term_output): Declare as
GRUB_TERM_CODE_TYPE_VGA.
* term/i386/pc/vga.c (grub_vga_term): Declare as
GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS.
* term/i386/pc/vga_text.c (grub_vga_text_term): Declare as
GRUB_TERM_CODE_TYPE_VGA.
* term/i386/vga_common.c (map_char): Removed.
(grub_console_putchar): Likewise.
(grub_console_getcharwidth): Likewise.
* term/ieee1275/ofconsole.c: Simplify using terminfo.
(colors): Reordered to match terminfo.
(grub_ofconsole_normal_color): Removed.
(grub_ofconsole_writeesc): Likewise.
(grub_ofconsole_highlight_color): Likewise.
(grub_ofconsole_getcharwidth): Likewise.
(grub_ofconsole_setcolorstate): Likewise.
(grub_ofconsole_setcolor): Likewise.
(grub_ofconsole_getcolor): Likewise.
(grub_ofconsole_readkey): Renamed to ...
(readkey): ... this. Remove escape sequence handling. Return -1 on no
key.
(grub_ofconsole_checkkey): Removed.
(grub_ofconsole_getkey): Likewise.
(grub_ofconsole_getxy): Likewise.
(grub_ofconsole_gotoxy): Likewise.
(grub_ofconsole_cls): Likewise.
(grub_ofconsole_refresh): Likewise.
(grub_ofconsole_terminfo_input): New struct.
(grub_ofconsole_terminfo_output): Likewise.
(grub_ofconsole_term_input): Use terminfo.
(grub_ofconsole_term_output): Likewise.
(grub_console_init): Split into ...
(grub_console_init_early): ...this and ...
(grub_console_init_lately): ...this. Use terminfo.
(grub_ofconsole_putchar): Renamed to ...
(put): ... this. Remove mapping.
(grub_ofconsole_term_output): Declare as GRUB_TERM_CODE_TYPE_ASCII.
* term/serial.c: Simplify using terminfo.
(xpos): Removed.
(ypos): Likewise.
(keep_track): Likewise.
(registered): Likewise.
(input_buf): Likewise.
(npending): Likewise.
(serial_translate_key_sequence): Likewise.
(fill_input_buf): Likewise.
(grub_serial_checkkey): Likewise.
(grub_serial_getkey): Likewise.
(grub_serial_getxy): Likewise.
(grub_serial_gotoxy): Likewise.
(grub_serial_putchar): Likewise.
(grub_serial_cls): Likewise.
(grub_serial_setcolorstate): Likewise.
(grub_serial_setcursor): Likewise.
(serial_hw_init): Use serial_hw_fetch.
(grub_serial_terminfo_input): New variable.
(grub_serial_terminfo_output): Likewise.
(grub_serial_term_input): Use terminfo.
(grub_serial_term_output): Likewise.
* term/terminfo.c (putstr): Use put.
(grub_terminfo_all_free): New function
(grub_terminfo_set_current): New types vt100-color, ieee1275 and dumb.
(grub_terminfo_output_register): New function.
(grub_terminfo_output_unregister): Likewise.
(grub_terminfo_getxy): Likewise.
(grub_terminfo_readkey): Likewise.
(grub_terminfo_checkkey): Likewise.
(grub_terminfo_getkey): Likewise.
(grub_terminfo_input_init): Likewise.
(print_terminfo): Likewise.
(grub_cmd_terminfo): Handle encoding.
(grub_terminfo_gotoxy): Track position.
(grub_terminfo_cls): Likewise.
(grub_terminfo_putchar): Likewise.
(grub_terminfo_setcolorstate): Handle colors
(grub_terminfo_cursor_on): This ...
(grub_terminfo_cursor_off): ... and this merged into ...
(grub_terminfo_setcursor): ... this.
* term/tparm.c (grub_terminfo_tparm): Avoid NULL dereferencing.
* unicode/ArabicShaping.txt: New file (imported from Unicode).
* unicode/BidiMirroring.txt: Likewise.
* unicode/UnicodeData.txt: Likewise.
* unicode/COPYING: Likewise.
* util/grub-editenv.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/grub-fstest.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/grub-mkdevicemap.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/grub-probe.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/grub-script-check.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/i386/pc/grub-setup.c (grub_putchar): Removed.
(grub_xputs_real): New function.
(grub_xputs): New variable.
* util/import_unicode.py: New file.
* util/grub-mkfont.c (ft_errmsgs): New array.
(grub_glyph_info): Make bitmap a pointer.
(file_formats): New type WIDTH_SPEC.
(grub_font_info): New members glyphs_unsorted, glyphs_sorted, num_glyphs.
(options): Add width-spec.
(help): Likewise.
(add_char): Renamed to ...
(add_glyph): ... this.
(add_glyph): Use index. Show freetype errors. Cut blank space at borders.
(glyph_replace): New type.
(subst_rightjoin), (subst_leftjoin), (subst_medijoin): New variables.
(add_char): New function.
(add_subst): Likewise.
(process_cursive): Likewise.
(add_font): Handle GSUB.
(write_font_width_spec): New function.
(main): Sort glyphs.
* commands/minicmd.c (grub_mini_cmd_clear): Moved from here ...
* normal/main.c (grub_mini_cmd_clear): ..here. All users updated.
* kern/term.c (grub_cls): Moved from here...
* normal/term.c (grub_cls): ... here.
2010-07-02 22:16:35 +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
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
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
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
4f9613a3a0
Support >3GiB and <16MiB RAM in i386-qemu.
...
* kern/i386/qemu/mmap.c (QEMU_CMOS_MEMSIZE2_HIGH): New const.
(QEMU_CMOS_MEMSIZE2_LOW): Likewise.
(grub_lower_mem): Removed.
(grub_upper_mem): Likewise.
(mem_size): Made static.
(above_4g): New variable.
(grub_machine_mmap_init): Detect small mem_size and above_4g.
(grub_machine_mmap_iterate): Order in ascending order and add above_4g
support.
2010-06-20 14:22:34 +02:00
Vladimir 'phcoder' Serbinenko
05e5187978
Cirrus 5446 and Bochs video cards support.
...
* conf/i386.rmk (pkglib_MODULES): Add video_cirrus.mod and
video_bochs.mod
(video_cirrus_mod_SOURCES): New variable.
(video_cirrus_mod_CFLAGS): Likewise.
(video_cirrus_mod_LDFLAGS): Likewise.
(video_bochs_mod_SOURCES): Likewise.
(video_bochs_mod_CFLAGS): Likewise.
(video_bochs_mod_LDFLAGS): Likewise.
* include/grub/vga.h: New file.
* include/grub/video_fb.h (grub_video_fb_doublebuf_blit_init): Removed.
(grub_video_fb_set_page_t): New type.
(grub_video_fb_setup): New prototype.
(grub_video_fb_swap_buffers): Likewise.
(grub_video_fb_get_info_and_fini): Likewise.
* term/i386/pc/vga_text.c (CRTC_ADDR_PORT): Moved to include/grub/vga.h.
(CRTC_DATA_PORT): Likewise.
(CRTC_CURSOR): Likewise.
(CRTC_CURSOR_ADDR_HIGH): Likewise.
(CRTC_CURSOR_ADDR_LOW): Likewise.
(CRTC_CURSOR_DISABLE): Likewise.
(update_cursor): Use grub_vga_cr_write.
(grub_vga_text_setcursor): Likewise.
* video/bochs.c: New file.
* video/fb/video_fb.c (render_target): Moved into framebuffer variable.
(palette): Likewise.
(palette_size): Likewise.
(framebuffer): New variable.
(grub_video_fb_init): Use 'framebuffer'.
(grub_video_fb_fini): Likewise.
(grub_video_fb_get_info): Likewise.
(grub_video_fb_get_palette): Likewise.
(grub_video_fb_set_palette): Likewise.
(grub_video_fb_set_viewport): Likewise.
(grub_video_fb_get_viewport): Likewise.
(grub_video_fb_map_color): Likewise.
(grub_video_fb_map_rgb): Likewise.
(grub_video_fb_map_rgba): Likewise.
(grub_video_fb_unmap_color): Likewise.
(grub_video_fb_unmap_color_int): Likewise.
(grub_video_fb_fill_rect): Likewise.
(grub_video_fb_blit_bitmap): Likewise.
(grub_video_fb_blit_render_target): Likewise.
(grub_video_fb_scroll): Likewise.
(grub_video_fb_create_render_target): Likewise.
(grub_video_fb_doublebuf_blit_init): Likewise.
(grub_video_fb_set_active_render_target): Handle doublebuffering.
(doublebuf_pageflipping_update_screen): New function.
(doublebuf_pageflipping_init): Likewise.
(grub_video_fb_setup): Likewise.
(grub_video_fb_swap_buffers): Likewise.
(grub_video_fb_get_info_and_fini): Likewise.
* video/i386/pc/vbe.c (framebuffer): Remove all doublebuffering fields.
All users updated.
(doublebuf_pageflipping_commit): Restructured into ...
(doublebuf_pageflipping_set_page): ... this.
(doublebuf_pageflipping_update_screen): Removed.
(doublebuf_pageflipping_init): Likewise.
(double_buffering_init): Likewise.
(grub_video_vbe_setup): Use grub_video_fb_setup.
(grub_video_vbe_swap_buffers): Removed.
(grub_video_vbe_set_active_render_target): Likewise.
(grub_video_vbe_get_active_render_target): Likewise.
(grub_video_vbe_get_info_and_fini): Use grub_video_fb_get_info_and_fini.
(grub_video_vbe_adapter): Use grub_video_fb_swap_buffers,
grub_video_fb_set_active_render_target and
grub_video_fb_get_active_render_target.
* video/i386/pc/vga.c (SEQUENCER_ADDR_PORT): Move to include/grub/vga.h.
(SEQUENCER_DATA_PORT): Likewise.
(MAP_MASK_REGISTER): Likewise.
(CRTC_ADDR_PORT): Likewise.
(CRTC_DATA_PORT): Likewise.
(START_ADDR_HIGH_REGISTER): Likewise.
(START_ADDR_LOW_REGISTER): Likewise.
(GRAPHICS_ADDR_PORT): Likewise.
(GRAPHICS_DATA_PORT): Likewise.
(READ_MAP_REGISTER): Likewise.
(INPUT_STATUS1_REGISTER): Likewise.
(INPUT_STATUS1_VERTR_BIT): Likewise.
(get_map_mask): Use grub_vga_sr_read.
(set_map_mask): Use grub_vga_sr_write.
(set_read_map): Use grub_vga_gr_write.
(set_start_address): Use grub_vga_cr_write.
* video/sm712.c (framebuffer): Remove leftover fields.
2010-06-20 14:15:20 +02:00
Colin Watson
4321c64aff
* util/grub-mkconfig.in: Capitalise and export GRUB_PREFIX. Stop
...
setting GRUB_VIDEO_BACKEND. Make it available as a user override
instead. Replace the gfxterm backend check with a check that
${GRUB_PREFIX}/video.lst is non-empty.
* util/grub.d/00_header.in: Use GRUB_PREFIX rather than computing it
again.
(load_video): New generated function. Call it before loading
gfxterm rather than loading ${GRUB_VIDEO_BACKEND}.
* util/grub.d/10_linux.in (linux_entry): Call load_video.
* util/grub.d/30_os-prober.in (osx_entry): Likewise.
* docs/grub.texi (Simple configuration): Document
GRUB_VIDEO_BACKEND.
Use video functions in linux and xnu loaders.
* conf/i386-pc.rmk (xnu_mod_SOURCES): Remove loader/i386/pc/xnu.c.
* conf/x86-efi.rmk (xnu_mod_SOURCES): Remove loader/i386/efi/xnu.c.
* include/grub/i386/xnu.h (grub_xnu_set_video): Removed.
* loader/i386/efi/linux.c (grub_linux_setup_video): Copied from
loader/i386/pc/linux.c.
(grub_linux_boot): Resynced with loader/i386/pc/linux.c.
(find_line_len): Removed.
(find_framebuf): Likewise.
(grub_cmd_linux): Declare grub_linux_boot as possibly returning.
* loader/i386/efi/xnu.c: Removed.
* loader/i386/pc/xnu.c: Moved from here...
* loader/i386/xnu.c: ...here.
Enable priorities in video drivers.
* include/grub/video.h (grub_video_adapter_prio_t): New type.
(grub_video_adapter): New field prio.
(grub_video_register): Respect prio when inserting.
* video/efi_gop.c (grub_video_gop_adapter): Add prio.
* video/efi_uga.c (grub_video_uga_adapter): Likewise.
* video/emu/sdl.c (grub_video_sdl_adapter): Likewise.
* video/i386/pc/vbe.c (grub_video_vbe_adapter): Likewise.
* video/i386/pc/vga.c (grub_video_vga_adapter): Likewise.
* video/ieee1275.c (grub_video_ieee1275_adapter): Likewise.
* video/sm712.c (grub_video_sm712_adapter): Likewise.
Fix SDL driver ID.
* include/grub/video.h (grub_video_driver_id_t): New value
GRUB_VIDEO_DRIVER_SDL.
* video/emu/sdl.c (grub_video_sdl_adapter): Add id.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-06-20 13:37:18 +02:00
Colin Watson
7d24e434c5
* util/i386/pc/grub-setup.c (usage): Pass an extra `program_name'
...
argument to printf.
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:54:04 +01:00
Colin Watson
c88a83f644
* util/i386/pc/grub-setup.c (usage): Fix syntax error.
...
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:49:50 +01:00
Colin Watson
094dfb699e
* util/i386/pc/grub-setup.c (usage): Warn against running grub-setup
...
directly, and recommend grub-install instead.
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:20:43 +01:00