Use the same reboot approach on i386 coreboot and qemu as we do on
BIOS.
* conf/i386-coreboot.rmk (kernel_img_HEADERS): Add `cpu/reboot.h'.
(reboot_mod_SOURCES): Remove `kern/i386/reboot.c'.
* kern/i386/reboot.c: Remove.
* include/grub/i386/reboot.h (grub_reboot): Export function.
* kern/i386/pc/startup.S (grub_reboot): Move from here ...
* kern/i386/realmode.S (grub_reboot): ... to here. Jump to
0xf000:0xfff0 instead of 0xffff:0x0000.
[!GRUB_MACHINE_PCBIOS] (prot_to_real): Do not restore interrupts.
* kern/i386/qemu/startup.S: Include `"../realmode.S"'.
YYYY-MM-DD Carles Pina i Estany <carles@pina.cat>
* Makefile.in: Add uptrans target to help to update .pot file
* conf/common.rmk: Add grub-gettext_lib target, dependency and SOURCES, CFLAGS, LDFLAGS
* kern/misc.c: Define grub_gettext symbol and add implement grub_gettext_dummy function
* po/TODO: Temporary file with instructions of what Makefile.in will do
* po/ca.po: Catalan translation stub
* include/grub/misc.h: Define macro _(char *s). Declare grub_gettext_dummy and grub_gettext
* gettext/gettext.c: New file with gettext implementation
* normal/menu.c (print_message): add _( ) to some strings
* util/grub.d/10_linux.in: include grub-gettext_lib file. For the Linux menuentry, call eval_gettext
* util/grub.d/00_header.in: add locale_prefix and gettext locale detection and setting up the access to the mo directory
* util/grub-mkconfig_lib.in: add get_locale_lang
* util/grub-gettext_lib.in: new file
* include/grub/multiboot.h (struct grub_multiboot_header): Move
from here ...
* include/multiboot.h (struct multiboot_header): ... to here. Update
all users.
* include/grub/multiboot.h (struct grub_multiboot_info): Move
from here ...
* include/multiboot.h (struct multiboot_info): ... to here. Update
all users.
* include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
from here ...
* include/multiboot.h (struct multiboot_mmap_entry): ... to here.
Update all users.
* include/grub/multiboot.h (struct grub_mod_list): Move
from here ...
* include/multiboot.h (struct multiboot_mod_list): ... to here.
Update all users.
Misc cleanup.
* kern/command.c (grub_register_command_prio): Use
grub_zalloc() instead of explicitly zeroing data.
* kern/list.c: Include `<grub/mm.h>'.
(grub_named_list_find): Replace `0' with `NULL'.
* normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
(fs_module_list): Change type to `grub_named_list_t'. Update all
users.
* normal/dyncmd.c (read_command_list): Add space between function
call and parenthesis.
* normal/handler.c (read_handler_list): Likewise.
Fix memory corruption issue (spotted by Colin Watson).
* kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
causing returned size to be stored in an incorrect memory location.
Fix use of uninitialized value when storing the returned size.
Save space by inlining misc.c functions.
* kern/misc.c (grub_iswordseparator): Made static.
* kern/misc.c (grub_strcat): Moved from here ...
* include/grub/misc.h (grub_strcat): ... here. Inlined.
* kern/misc.c (grub_strncat): Moved from here ...
* include/grub/misc.h (grub_strncat): ... here. Inlined.
* kern/misc.c (grub_strcasecmp): Moved from here ...
* include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
* kern/misc.c (grub_strncasecmp): Moved from here ...
* include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
* kern/misc.c (grub_isalpha): Moved from here ...
* include/grub/misc.h (grub_isalpha): ... here. Inlined.
* kern/misc.c (grub_isdigit): Moved from here ...
* include/grub/misc.h (grub_isdigit): ... here. Inlined.
* kern/misc.c (grub_isgraph): Moved from here ...
* include/grub/misc.h (grub_isgraph): ... here. Inlined.
* kern/misc.c (grub_tolower): Moved from here ...
* include/grub/misc.h (grub_tolower): ... here. Inlined.
Fix a bug resulting in black screen when loading Linux using a
packed video mode.
* kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
function.
* include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
(grub_vbe_bios_getset_dac_palette_width): New function.
(grub_vbe_bios_get_dac_palette_width)
(grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
grub_vbe_bios_getset_dac_palette_width()).
* video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
check for return status.
(grub_vbe_get_video_mode_info): When getting information for a packed
mode (<= 8 bpp), obtain DAC palette width using
grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
{red,green,blue}_mark_size.
* kern/device.c (grub_device_iterate): Change struct part_ent to
hold the name, not a pointer to it. Use one grub_malloc() per
partition, not two. Free partition_name if grub_malloc() fails.
Set ents to NULL only before grub_partition_iterate() is called.
2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
* kern/ieee1275/openfw.c (grub_children_iterate)
(grub_devalias_iterate): Fix size evaluation for property or path
strings, which was broken since r2132.
* kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
segment 0x0 unconditionally, because the reference generated by
GAS is an absolute address.
Load BSD ELF modules
* conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
and loader/i386/bsd64.c
* include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
(FREEBSD_MODTYPE_ELF_MODULE): New definition
(FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
(grub_freebsd_load_elfmodule32): New declaration
(grub_freebsd_load_elfmoduleobj64): Likewise
(grub_freebsd_load_elf_meta32): Likewise
(grub_freebsd_load_elf_meta64): Likewise
(grub_freebsd_add_meta): Likewise
(grub_freebsd_add_meta_module): Likewise
* loader/i386/bsd.c (grub_freebsd_add_meta): Make global
(grub_freebsd_add_meta_module): Likewise and move module-specific
parts to grub_cmd_freebsd and grub_cmd_freebsd_module
(grub_cmd_freebsd): Add elf-kernel specific parts
based on grub_freebsd_add_meta_module
(grub_cmd_freebsd_module): Add type parsing moved from
grub_freebsd_add_meta_module
(grub_cmd_freebsd_module_elf): New function
(cmd_freebsd_module_elf): New variable
(GRUB_MOD_INIT): Register freebsd_module_elf
* loader/i386/bsd32.c: New file
* loader/i386/bsd64.c: Likewise
* loader/i386/bsdXX.c: Likewise
* kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
(grub_elf64_load): Likewise
* include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
All users updated
(grub_elf64_load_hook_t): Likewise
* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
the kernel.
* kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
and grub_at_keyboard_fini(), it's done on module load and
unload.