Commit graph

405 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
e1f270654e 2009-12-10 Vladimir Serbinenko <phcoder@gmail.com>
* kern/device.c (grub_device_iterate): Ignore errors during first scan.
	Fixes amarsh bug.
2009-12-10 13:26:22 +01:00
Carles Pina i Estany
e3069ec1a5 2009-12-08 Carles Pina i Estany <carles@pina.cat>
* include/grub/misc.h (grub_printf_): New declaration.
	* kern/misc.c (grub_printf_): New definition.
	* normal/main.c (grub_normal_reader_init): Use `grub_printf_' and `N_'
	instead of `grub_printf' and `_'.
	* normal/menu_entry.c (store_completion): Likewise.
	(run): Likewise.
	(grub_menu_entry_run): Likewise.
	* normal/menu_text.c (grub_wait_after_message): Likewise.
	(notify_booting): Likewise.
	(notify_fallback): Likewise.
	(notify_execution_failure): Likewise.
2009-12-08 00:08:52 +00:00
Robert Millan
fb954db0d5 2009-12-05 Robert Millan <rmh.grub@aybabtu.com>
* kern/ieee1275/openfw.c (grub_reboot): Disable for i386.  The         
        non-firmware-dependant one in realmode.S takes precedence.
2009-12-05 01:43:17 +00:00
Robert Millan
6b8474f8e8 2009-12-04 Robert Millan <rmh.grub@aybabtu.com>
* commands/halt.c: Replace misc arch-specific headers with
        `<grub/misc.h>'.
        * commands/reboot.c: Likewise.
        * commands/i386/pc/halt.c: Replace `<grub/machine/init.h>' with
        `<grub/misc.h>'.
        * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'.
        (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ...
        (kernel_img_SOURCES): ... to here.

        * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes.
        * include/grub/i386/pc/init.h: Likewise.
        * include/grub/powerpc/ieee1275/kernel.h: Likewise.
        * include/grub/sparc64/ieee1275/kernel.h: Likewise.

        * include/grub/misc.h (grub_reboot, grub_halt): New prototypes.

        * include/grub/i386/halt.h: Remove.
        * include/grub/i386/reboot.h: Likewise.

        * kern/i386/halt.c: Remove `<grub/cpu/halt.h>'.
2009-12-03 23:07:29 +00:00
Robert Millan
5239348f18 2009-12-02 Robert Millan <rmh.grub@aybabtu.com>
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"'.
2009-12-02 22:48:02 +00:00
Carles Pina i Estany
4a8572e9d8 2009-11-24 Carles Pina i Estany <carles@pina.cat>
* conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* gettext/gettex.c: Include <grub/i18n.h>.
	* include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from
 	  here ...
	* include/grub/i18n.h: ... to here
	* include/grub/i18n.h: ... to here.
	* kern/misc.c: Include <grub/i18n.h>
	(grub_gettext_dummy): Move above user.
2009-11-24 21:42:14 +00:00
Carles Pina i Estany
b58fc33c4f Merging with trunk 2009-11-23 20:34:42 +00:00
Robert Millan
f84b481b35 Cheery-pick grub-emu split from experimental (rev 1361)
2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>

        * configure.ac: Detect all `emu' platforms.  Define
        GRUB_MACHINE_* macros in TARGET_CFLAGS.  Remove
        --enable-grub-emu logic.  Disable include/grub/machine
        symlink on `emu' platforms.

        * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
        * gensymlist.sh.in: Likewise.

        * include/grub/i386/coreboot/machine.h: Remove file.
        * include/grub/i386/efi/machine.h: Likewise.
        * include/grub/i386/ieee1275/machine.h: Likewise.
        * include/grub/i386/pc/machine.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/powerpc/ieee1275/machine.h: Likewise.
        * include/grub/sparc64/ieee1275/machine.h: Likewise.
        * include/grub/x86_64/efi/machine.h: Likewise.

        * commands/acpi.c: Remove `<grub/machine/machine.h>'.
        * commands/halt.c: Likewise.
        * commands/reboot.c: Likewise.
        * include/grub/autoefi.h: Likewise.
        * include/grub/i386/at_keyboard.h: Likewise.
        * include/grub/i386/kernel.h: Likewise.
        * include/grub/i386/loader.h: Likewise.
        * include/grub/i386/pc/memory.h: Likewise.
        * kern/dl.c: Likewise.
        * kern/i386/coreboot/init.c: Likewise.
        * loader/i386/bsd.c: Likewise.
        * loader/i386/linux.c: Likewise.
        * loader/multiboot_loader.c: Likewise.
        * term/i386/pc/serial.c: Likewise.
        * term/usb_keyboard.c: Likewise.

        * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
        `<grub/machine/machine.h>'
        [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
        * util/misc.c: Remove `<grub/machine/machine.h>' and
        `<grub/machine/time.h>'.

        * Makefile.in (enable_grub_emu): Remove variable.
        Include $(srcdir)/conf/any-emu.mk for the `emu' platform.

        * conf/any-emu.rmk: New file.
        * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
        (grub_emu_init.c): Move from here ...
        * conf/any-emu.rmk: ... to here.

        * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
        (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
        * conf/any-emu.rmk: ... to here.
2009-11-23 15:31:54 +00:00
Carles Pina i Estany
e5fb78c684 This commit is the same than gettext08.patch (see mailing list) 2009-11-22 12:50:46 +00:00
Carles Pina i Estany
0648f857ea Different changes following Robert's email 20091121230904.GA29740@thorin 2009-11-22 11:49:54 +00:00
Carles Pina i Estany
203ffbfa31 Adds gettext support in Grub. Building system needs to be improved and maybe userland utilites improved.
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
2009-11-13 20:39:33 +00:00
Robert Millan
8d0edf4abd 2009-11-13 Robert Millan <rmh.grub@aybabtu.com>
* 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.
2009-11-13 13:34:51 +00:00
Robert Millan
ac451143b2 2009-11-09 Robert Millan <rmh.grub@aybabtu.com>
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.
2009-11-09 14:45:28 +00:00
Robert Millan
b97b7b914b 2009-11-08 Robert Millan <rmh.grub@aybabtu.com>
* kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve
        error message for excessively large memory map.
2009-11-08 20:02:16 +00:00
Robert Millan
e4eb23732d 2009-11-08 Robert Millan <rmh.grub@aybabtu.com>
* kern/i386/multiboot_mmap.c (grub_machine_mmap_init): Improve error
        message for coreboot users.
2009-11-08 16:23:23 +00:00
robertmh
a50569e135 2009-11-01 Robert Millan <rmh.grub@aybabtu.com>
Based on patch from BVK Chaitanya  <bvk.groups@gmail.com>
        * kern/misc.c (grub_strchr, grub_strrchr): Fix to handle c == '\0'
        case.
2009-11-01 23:03:09 +00:00
robertmh
2ed19dfded 2009-10-28 Robert Millan <rmh.grub@aybabtu.com>
* kern/i386/coreboot/init.c (grub_exit): Reimplement in a way that
        doesn't cause an infinite call loop.
2009-10-28 22:02:54 +00:00
fzielcke
e0b37bb5b1 2009-09-21 Felix Zielcke <fzielcke@z-51.de>
* kern/term.c: Fix indentation.
2009-09-21 14:37:04 +00:00
robertmh
5c9f8d8427 2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
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.
2009-09-12 13:05:25 +00:00
fzielcke
44454e4c24 2009-09-08 Felix Zielcke <fzielcke@z-51.de>
* kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
	`help' if the command exists.
2009-09-08 15:00:28 +00:00
cjwatson
087c07c4fa 2009-09-03 Colin Watson <cjwatson@ubuntu.com>
* kern/i386/pc/startup.S: Fix typo.
2009-09-03 07:53:40 +00:00
phcoder
b5e7312c43 2009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
* kern/file.c (grub_file_read): Spelling fix
2009-08-30 20:19:09 +00:00
phcoder
6f07b921bc 2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
* kern/file.c (grub_file_read): Check offset.
	* fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
	* fs/jfs.c (grub_jfs_read_file): Likewise.
	* fs/ntfs.c (grub_ntfs_read): Likewise.
	* fs/reiserfs.c (grub_reiserfs_read): Likewise.
	* fs/minix.c (grub_minix_read_file): Correct offset check.
	* fs/ufs.c (grub_ufs_read_file): Likewise.
2009-08-28 16:29:34 +00:00
cjwatson
4cbe67e509 2009-08-28 Colin Watson <cjwatson@ubuntu.com>
2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>

	Add `getkeystatus' terminal method.  Add a new `keystatus' command
	to query it.

	* include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
	GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
	modifier key bitmasks.
	(struct grub_term_input): Add `getkeystatus' member.
	(grub_getkeystatus): Add prototype.
	* kern/term.c (grub_getkeystatus): New function.

	* include/grub/i386/pc/memory.h
	(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
	(struct grub_machine_bios_data_area): Define necessary parts of BIOS
	Data Area layout.
	* term/i386/pc/console.c (grub_console_getkeystatus): New function.
	(grub_console_term_input): Set `getkeystatus' member.
	* term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
	constants.
	(grub_usb_keyboard_getreport): Likewise.
	(grub_usb_keyboard_checkkey): Likewise.
	(grub_usb_keyboard_getkeystatus): New function.
	(grub_usb_keyboard_term): Set `getkeystatus' member.

	* commands/keystatus.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
	(keystatus_mod_SOURCES): New variable.
	(keystatus_mod_CFLAGS): Likewise.
	(keystatus_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
	commands/keystatus.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* DISTLIST: Add commands/keystatus.c.
2009-08-28 13:20:34 +00:00
phcoder
70f1161d13 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
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.
2009-08-24 19:40:40 +00:00
robertmh
f56a875639 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
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.
2009-08-04 21:28:19 +00:00
fzielcke
2366e356ce 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
* kern/file.c (grub_file_open): Revert to previous check with
	grub_errno.
2009-07-25 18:28:58 +00:00
phcoder
72b9658be2 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
* kern/parser.c (grub_parser_execute): Fix a bug causing truncated
	entries on failed boot.
2009-07-25 15:13:07 +00:00
fzielcke
7743527799 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
* kern/file.c (grub_file_open): Fix an error check.
2009-07-25 09:30:25 +00:00
proski
f76ce8896a 2009-07-21 Pavel Roskin <proski@gnu.org>
* kern/dl.c (grub_dl_check_header): Make static.
2009-07-21 20:18:44 +00:00
proski
5680109e00 2009-07-19 Pavel Roskin <proski@gnu.org>
* Makefile.in: Remove LIBLZO and enable_lzo.
	* conf/i386-pc.rmk: Remove lzo support.
	* configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
	* include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
	support.
	* kern/i386/pc/lzo1x.S: Remove.
	* kern/i386/pc/startup.S: Remove lzo support.
	* util/i386/pc/grub-mkimage.c: Likewise.
2009-07-19 20:23:33 +00:00
proski
eab58da22c 2009-07-16 Pavel Roskin <proski@gnu.org>
* kern/mm.c (grub_zalloc): New function.
	(grub_debug_zalloc): Likewise.
	* include/grub/mm.h: Declare grub_zalloc() and
	grub_debug_zalloc().
	* util/misc.c (grub_zalloc): New function.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
	instead of grub_malloc(), remove unneeded initializations.
	* bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
	* commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
	* commands/parttool.c (grub_cmd_parttool): Likewise.
	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	* disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* disk/raid6_recover.c (grub_raid6_recover): Likewise.
	* disk/usbms.c (grub_usbms_finddevs): Likewise.
	* efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
	* efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
	(grub_cmd_efiemu_pnvram): Likewise.
	* fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
	* fs/iso9660.c (grub_iso9660_mount): Likewise.
	(grub_iso9660_iterate_dir): Likewise.
	* fs/jfs.c (grub_jfs_opendir): Likewise.
	* fs/ntfs.c (list_file): Likewise.
	(grub_ntfs_mount): Likewise.
	* kern/disk.c (grub_disk_open): Likewise.
	* kern/dl.c (grub_dl_load_core): Likewise.
	* kern/elf.c (grub_elf_file): Likewise.
	* kern/env.c (grub_env_context_open): Likewise.
	(grub_env_set): Likewise.
	(grub_env_set_data_slot): Likewise.
	* kern/file.c (grub_file_open): Likewise.
	* kern/fs.c (grub_fs_blocklist_open): Likewise.
	* loader/i386/multiboot.c (grub_module): Likewise.
	* loader/xnu.c (grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	* normal/main.c (grub_normal_add_menu_entry): Likewise.
	(read_config_file): Likewise.
	* normal/menu_entry.c (make_screen): Likewise.
	* partmap/sun.c (sun_partition_map_iterate): Likewise.
	* script/sh/lexer.c (grub_script_lexer_init): Likewise.
	* script/sh/script.c (grub_script_parse): Likewise.
	* video/bitmap.c (grub_video_bitmap_create): Likewise.
	* video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* video/readers/png.c (grub_png_output_byte): Likewise.
	(grub_video_reader_png): Likewise.
2009-07-16 22:14:09 +00:00
proski
560ca572fa 2009-07-15 Pavel Roskin <proski@gnu.org>
* include/grub/disk.h (struct grub_disk_dev): Use enum for id.
	* kern/disk.c (struct grub_disk_cache): Likewise.
2009-07-15 19:45:44 +00:00
proski
17dc3751c2 2009-07-13 Pavel Roskin <proski@gnu.org>
* kern/dl.c: Force native word size to suppress warnings when
	compiling grub-emu.
2009-07-13 23:04:31 +00:00
proski
2df32b2c4a 2009-07-13 Pavel Roskin <proski@gnu.org>
* 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-13 22:21:49 +00:00
bean
75c59f59e7 2009-07-11 Bean <bean123ch@gmail.com>
* kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
	childname.
2009-07-11 03:59:15 +00:00
robertmh
0ae1bf88be 2009-07-10 Bean <bean123ch@gmail.com>
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.
2009-07-10 20:19:08 +00:00
proski
87a7339e7a 2009-07-01 Pavel Roskin <proski@gnu.org>
* kern/x86_64/efi/callwrap.S: Add missing newline at the end.
2009-07-02 00:21:07 +00:00
proski
c8d229882a 2009-07-01 Pavel Roskin <proski@gnu.org>
* kern/dl.c (grub_dl_resolve_symbol): Make static.
	* include/grub/dl.h: Remove grub_dl_resolve_symbol().
2009-07-01 16:00:34 +00:00
proski
2ef0084d80 2009-07-01 Pavel Roskin <proski@gnu.org>
* kern/mm.c: Use correct format to print size_t.
2009-07-01 15:39:21 +00:00
proski
3262295617 2009-07-01 Pavel Roskin <proski@gnu.org>
* include/grub/elf.h: Define Elf_Sword and Elf_Xword.
	* kern/i386/dl.c: Use ELF symbols without "32" or "64".
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/x86_64/dl.c: Likewise.
2009-07-01 14:49:22 +00:00
proski
85f2aab6f7 2009-06-28 Pavel Roskin <proski@gnu.org>
* kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
	fix a warning.
2009-06-29 03:37:42 +00:00
robertmh
8231fb77c6 2009-06-27 Pavel Roskin <proski@gnu.org>
2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>

        * include/grub/dl.h: Include grub/elf.h.
        (struct grub_dl): Add symtab field.
        * kern/dl.c [GRUB_MACHINE_QEMU]: Define
        GRUB_MODULES_MACHINE_READONLY.
        (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
        of the header for read-only modules.
        (grub_dl_unload): Free mod->symtab for read-only modules.
        * kern/i386/dl.c: Use mod->symtab.
        * kern/powerpc/dl.c: Likewise.
        * kern/sparc64/dl.c: Likewise.
        * kern/x86_64/dl.c: Likewise.

        * conf/i386-qemu.rmk: New file.
        * kern/i386/qemu/startup.S: Likewise.
        * kern/i386/qemu/mmap.c: Likewise.
        * boot/i386/qemu/boot.S: Likewise.
        * include/grub/i386/qemu/time.h: Likewise.
        * include/grub/i386/qemu/serial.h: Likewise.
        * include/grub/i386/qemu/kernel.h: Likewise.
        * include/grub/i386/qemu/console.h: Likewise.
        * include/grub/i386/qemu/boot.h: Likewise.
        * include/grub/i386/qemu/init.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/i386/qemu/loader.h: Likewise.
        * include/grub/i386/qemu/memory.h: Likewise.

        * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
        (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
        [qemu] (pkglib_IMAGES): Add `boot.img'.
        [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
        [qemu] (boot_img_FORMAT): New variables.
        [qemu] (bin_UTILITIES): Add `grub-mkimage'.
        [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
        [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
        [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
        [qemu] (kernel_img_FORMAT): New variables.

        * configure.ac: Recognise `i386-qemu'.

        * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
        (for no compression).
        [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
        a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
        `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
        `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
        ifdefs).
2009-06-27 11:18:10 +00:00
proski
c402ab1734 2009-06-26 Pavel Roskin <proski@gnu.org>
* include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
	* include/grub/elf.h: Define symbols without "32" or "64" based
	on GRUB_TARGET_WORDSIZE.
	* include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
	* efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
	ELF definitions.
	* efiemu/loadcore64.c: Likewise.
	* loader/i386/bsd32.c: Likewise.
	* loader/i386/bsd64.c: Likewise.
	* kern/dl.c: Remove own ELF definitions.
	* util/i386/efi/grub-mkimage.c: Likewise.
2009-06-27 03:01:42 +00:00
robertmh
9bbdfd4d3b 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
* kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
        segment 0x0 unconditionally, because the reference generated by
        GAS is an absolute address.
2009-06-22 22:48:20 +00:00
robertmh
387a140ce6 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
        * conf/i386-ieee1275.rmk: Likewise.
        * conf/i386-coreboot.rmk: Likewise.

        * kern/i386/pc/startup.S (grub_stop): Remove function.
        * kern/i386/ieee1275/startup.S: Likewise.
        * kern/i386/coreboot/startup.S: Likewise.
        * kern/i386/misc.S (grub_stop): New function.
2009-06-22 18:04:37 +00:00
robertmh
41da966565 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
* kern/i386/pc/startup.S (real_to_prot): Move from here ...
        * kern/i386/realmode.S (real_to_prot): ... to here.
2009-06-22 10:42:37 +00:00
robertmh
15355c7d2f 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
Fix asm file handling on ELF, and remove workarounds.

        * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
        and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
        * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
        * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
2009-06-21 17:24:30 +00:00
phcoder
3f3ec72b38 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
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
2009-06-21 15:48:10 +00:00
proski
c22a006a07 2009-06-17 Pavel Roskin <proski@gnu.org>
* 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.
2009-06-17 19:39:36 +00:00