Commit graph

327 commits

Author SHA1 Message Date
fzielcke
afd5c11527 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
	`normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
	and `normal/script.c'.  Add `kern/rescue_reader.c',
	`kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c', 
	`script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
	`grub_script.tab.c'.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-05-04 17:49:57 +00:00
phcoder
cef17233d4 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
FreeBSD 64-bit support

	* conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S 
	and loader/i386/bsd_trampoline.S
	(bsd_mod_ASFLAGS): new variable
	* include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
	(FREEBSD_MODTYPE_KERNEL64): likewise
	(grub_bsd64_trampoline_start): likewise
	(grub_bsd64_trampoline_end): likewise
	(grub_bsd64_trampoline_selfjump): likewise
	(grub_bsd64_trampoline_gdt): likewise
	* include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
	* include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
	* kern/i386/loader.S (grub_unix_real_boot): moved from here ...
	* loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
	* include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type 
	of "attrib" member
	* loader/i386/bsd_pagetable.c: new file
	* loader/i386/bsd_trampoline.S: likewise
	* loader/i386/bsd.c (ALIGN_QWORD): new macro
	(ALIGN_VAR): likewise
	(entry_hi): new variable
	(kern_end_mdofs): likewise
	(is_64bit): likewise
	(grub_freebsd_add_meta): use ALIGN_VAR
	(grub_e820_mmap): new declaration
	(grub_freebsd_add_mmap): new function
	(grub_freebsd_add_meta_module): support 64 bit kernels
	(grub_freebsd_list_modules): use ALIGN_VAR
	(gdt_descriptor): new declaration
	(grub_freebsd_boot): support 64 bit kernels
	(grub_bsd_elf64_hook): new function
	(grub_bsd_load_elf): support elf64
2009-05-03 09:03:31 +00:00
bean
fc45fb586d 2009-05-03 Bean <bean123ch@gmail.com>
* Makefile.in (enable_efiemu): New variable.

	* conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
	set.
	(efiemu32.o): Use macro $< for source file, add $(srcdir) to include
	path.
	(efi64_c.o): Use macro $< for source file, add $(srcdir) to include
	path, add -mno-red-zone option.
	(efiemu64_s.o): Likewise.
	(efiemu64.o): Use macro $^ for source file.

	* configure.ac (--enable-efiemu): New option.
2009-05-03 06:39:37 +00:00
phcoder
bbee0f2b56 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
xnu support

	* conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
	(pkglib_MODULES): add xnu.mod
	(xnu_mod_SOURCES): new variable
	(xnu_mod_CFLAGS): likewise
	(xnu_mod_LDFLAGS): likewise
	(xnu_mod_ASFLAGS): likewise
	* conf/i386-pc.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/efi/efi.h (grub_efi_finish_boot_services): 
	new declaration
	* include/grub/i386/macho.h: new file
	* include/grub/i386/xnu.h: likewise
	* include/grub/macho.h: likewise
	* include/grub/machoload.h: likewise
	* include/grub/x86_64/macho.h: likewise
	* include/grub/x86_64/xnu.h: likewise
	* include/grub/xnu.h: likewise
	* kern/efi/efi.c (grub_efi_finish_boot_services): new function
	* kern/efi/mm.c (MAX_HEAP_SIZE): increase
	* loader/i386/efi/xnu.c: new file
	* loader/i386/pc/xnu.c: likewise
	* loader/i386/xnu.c: likewise
	* loader/i386/xnu_helper.S: likewise
	* loader/macho.c: likewise
	* loader/xnu.c: likewise
	* loader/xnu_resume.c: likewise
	* util/grub-dumpdevtree: likewise
	* include/grub/i386/pit.h: include grub/err.h
	(grub_pit_wait): export
	* util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2009-05-02 23:19:20 +00:00
phcoder
5caf964d75 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
Efiemu
 
	* conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
	_linux_efi, linux_efi. 
	new files in grub-emu 
	new targets efiemu32.o and efiemu64.o
	* loader/linux_normal_efiemu.c: likewise
	* loader/i386/efi/linux.c: added preliminary efiemu support
	* util/i386/pc/grub-install.in: add efiemu??.o to the list of 
	files to copy
	* include/grub/autoefi.h: new file
	* nclude/grub/i386/efiemu.h: likewise
	* include/grub/i386/pc/efiemu.h: likewise
	* include/grub/efi/api.h: add LL suffix when necessary
	new definitions relating to tables
	* include/grub/efiemu/efiemu.h: new file
	* include/grub/efiemu/runtime.h: likewise
	* efiemu/prepare.c: likewise
	* efiemu/loadcore_common.c: likewise
	* efiemu/loadcore64.c: likewise
	* efiemu/runtime/efiemu.sh: likewise
	* efiemu/runtime/efiemu.S: likewise
	* efiemu/runtime/efiemu.c: likewise
	* efiemu/runtime/config.h: likewise
	* efiemu/prepare32.c: likewise
	* efiemu/main.c: likewise
	* efiemu/modules/pnvram.c: likewise
	* efiemu/modules/i386: likewise
	* efiemu/modules/i386/pc: likewise
	* efiemu/modules/acpi.c: likewise
	* efiemu/i386/pc/cfgtables.c: likewise
	* efiemu/i386/loadcore64.c: likewise
	* efiemu/i386/loadcore32.c: likewise
	* efiemu/prepare64.c: likewise
	* efiemu/loadcore.c: likewise
	* efiemu/symbols.c: likewise
	* efiemu/mm.c: likewise
	* efiemu/loadcore32.c: likewise
2009-05-02 22:40:21 +00:00
phcoder
f8efe3ad2d 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
ACPI spoofing

	* commands/acpi.c: new file
	* commands/i386/pc/acpi.c: likewise
	* commands/efi/acpi.c: likewise
	* include/grub/acpi.h: likewise
	* conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
	(acpi_mod_SOURCES): new variable
	(acpi_mod_CFLAGS): likewise
	(acpi_mod_LDFLAGS): likewise
	* conf/i386-efi.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
2009-05-02 22:31:29 +00:00
phcoder
09d842b9c6 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
Mmap services

	* loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
	* loader/i386/linux.c (find_mmap_size): likewise
	(allocate_pages): likewise
	* loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
	(grub_fill_multiboot_mmap): likewise
	(grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
	* loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
	* include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
	(OPENBSD_MMAP_RESERVED): likewise
	* include/grub/i386/pc/memory.h: include grub/memory.h
	(grub_lower_mem): removed
	(grub_upper_mem): likewise
	(GRUB_MACHINE_MEMORY_ACPI): new definition
	(GRUB_MACHINE_MEMORY_NVS): likewise
	(GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
	(GRUB_MACHINE_MEMORY_HOLE): likewise
	(grub_machine_mmap_register): likewise
	(grub_machine_mmap_unregister): likewise
	(grub_machine_get_upper): likewise
	(grub_machine_get_lower): likewise
	(grub_machine_get_post64): likewise
	* include/grub/i386/efi/memory.h: new file
	* include/grub/x86_64/efi/memory.h: likewise
	* include/grub/efi/memory.h: likewise
	* conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
	(mmap_mod_SOURCES): new variable
	(mmap_mod_LDFLAGS): likewise
	(mmap_mod_ASFLAGS): likewise
	* conf/i386-coreboot.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-efi.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/types.h (UINT_TO_PTR): new macro
	(PTR_TO_UINT32): likewise
	(PTR_TO_UINT64): likewise
	* include/grub/memory.h: new file
	* mmap/i386/pc/mmap.c: likewise
	* mmap/i386/pc/mmap_helper.S: likewise
	* mmap/i386/uppermem.c: likewise
	* mmap/mmap.c: likewise
	* mmap/efi/mmap.c: likewise
	* kern/i386/coreboot/init.c (grub_machine_init): don't use 
	grub_upper_mem
	* kern/i386/pc/init.c (grub_lower_mem): removed variable
	(grub_upper_mem): likewise
	(grub_machine_init): don't use grub_upper_mem,
	make grub_lower_mem local
	* loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
	grub_mmap_iterate and grub_mmap_get_upper
	(grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2009-05-02 21:46:34 +00:00
bean
d558e6b5ac 2009-05-02 Bean <bean123ch@gmail.com>
* conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
	script/sh/parser.y.
	(pkglib_MODULES): Add normal.mod and sh.mod.
	(normal_SOURCES): New variable.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	(sh_mod_SOURCES): Likewise.
	(sh_mod_CFLAGS): Likewise.
	(sh_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
	script/sh/lexer.c_DEPENDENCIES.
	(kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
	kern/rescue_reader.c and kern/rescue_parser.c.
	(kernel_img_HEADERS): Remove rescue.h, add reader.h.
	(grub_emu_SOURCES): Change source files.
	(pkglib_MODULES): Remove normal.mod.
	(normal_SOURCES): Removed.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1276.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/command.h (grub_command_execute): New inline function.

	* include/grub/menu.h (grub_menu_entry): Removed commands field.

	* include/grub/normal.h: Remove <grub/setjmp.h>.
	(grub_fs_module_list): Moved to normal/autofs.c.
	(grub_exit_env): Removed.
	(grub_command_execute): Likewise.
	(grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
	parameter script.
	(read_command_list): New function declaration.
	(read_fs_list): Likewise.

	* include/parser.h: Include <grub/reader.h>.
	(grub_parser_split_cmdline): Change type of getline parameter.
	(grub_parser): New structure.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function declaration.
	(grub_register_rescue_parser): Likewise.
	(grub_parser_register): New inline function.
	(grub_parser_unregister): Likewise.
	(grub_parser_get_current): Likewise.
	(grub_parser_set_current): Likewise.

	* include/grub/reader.h: New file.
	* kern/reader.c: Likewise.
	* kern/rescue_parser.c: Likewise.
	* kern/rescue_reader.c: Likewise.
	* normal/autofs.c: Likewise.
	* normal/dyncmd.c: Likewise.

	* include/grub/rescue.h: Removed.
	* normal/command.h: Likewise.

	* include/grub/script.h: Moved to ...
	* include/grub/script_sh.h: ... Moved here.
	* normal/execute.c: Moved to ...
	* script/sh/execute.c: ... Moved here.
	* normal/function.c: Moved to ...
	* script/sh/function.c: ... Moved here.
	* normal/lexer.c: Moved to ...
	* script/sh/lexer.c: ... Moved here.
	* normal/parser.y: Moved to ...
	* script/sh/parser.y: ... Moved here.
	* normal/script.c: Moved to ...
	* script/sh/script.c: ... Moved here.

	* normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
	<grub/reader.h>.
	(grub_exit_env): Removed.
	(fs_module_list): Moved to normal/autofs.c.
	(grub_file_getline): Don't handle comment here.
	(free_menu): Skip removed field entry->commands.
	(grub_normal_menu_addentry): Removed as grub_menu_entry, removed
	script parameter.
	(read_config_file): Removed nested parameter, change getline function.
	(grub_enter_normal_mode): Removed.
	(grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
	(read_command_list): Likewise.
	(autoload_fs_module): Moved to normal/autofs.c.
	(read_fs_list): Likewise.
	(reader_nested): New variable.
	(grub_normal_execute): Run parser.sh to switch to sh parser.
	(grub_cmd_rescue): Removed.
	(cmd_normal): Removed.
	(grub_cmd_normal): Unregister itself at the beginning. Don't register
	rescue command.
	(grub_cmdline_run): New function.
	(grub_normal_reader_init): Likewise.
	(grub_normal_read_line): Likewise.
	(grub_env_write_pager): Likewise.
	(cmdline): New variable.
	(grub_normal_reader): Likewise.
	(GRUB_MOD_INIT): Register normal reader and set as current, register
	pager hook, register normal command with grub_register_command_prio,
	so that it won't show up in command.lst.
	(GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
	grub_fs_autoload_hook.

	* normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
	(grub_menu_execute_entry): Replace grub_script_execute with
	grub_parser_execute, change parameter to grub_command_execute.

	* normal/menu_text.c: Remove <grub/script.h>.

	* normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
	and <grub/parser.h>.
	(run): Change editor_getline to use new parser interface. Change
	parameter to grub_command_execute.

	* kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
	<grub/reader.h> and <grub/parser.h>.
	(grub_load_normal_mode): Execute normal command.
	(grub_main): Call grub_register_core_commands,
	grub_register_rescue_parser and grub_register_rescue_reader, use
	grub_reader_loop to enter input loop.

	* kern/parser.c (grub_parser_spli_cmdline): Change type of getline
	parameter.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function.

	* loader/i386/multiboot.c: Remove <grub/rescue.h>.
	* loader/multiboot2.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.

	* util/grub-emu.c (read_command_list): New dummy function.
2009-05-02 19:49:34 +00:00
davem
a1447506fe * util/sparc64/ieee1275/misc.c: New file.
* util/sparc64/ieee1275/grub-setup.c: New file.
	* util/sparc64/ieee1275/grub-ofpathname.c: New file.
	* util/sparc64/ieee1275/grub-mkimage.c: New file.
	* util/sparc64/ieee1275/grub-install.in: New file.
	* util/ieee1275/ofpath.c: New file.
	* util/ieee1275/devicemap.c: New file.
	* util/devicemap.c: New file.
	* util/deviceiter.c: New file.
	* kern/sparc64/ieee1275/init.c: New file.
	* include/grub/util/ofpath.h: New file.
	* include/grub/util/deviceiter.h: New file.
	* util/grub-mkdevicemap.c: Include deviceiter.h.
	Implement using grub_util_emit_devicemap_entry and
	grub_util_iterate_devices.
	* conf/i386-corebook.rmk: Build util/deviceiter.c and
	util/devicemap.c into grub-mkdevicemap
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Add rules to build boot block
	images and installation utilities.  Build kernel as image
	instead of as elf binary.  Use common rules as much as possible.
2009-04-22 09:57:39 +00:00
phcoder
0d5d565326 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Move loader out of the kernel

	* kern/loader.c: moved to ...
	* commands/boot.c: ... moved here
	* commands/minicmd.c (grub_mini_cmd_boot): moved to ...
	* commands/boot.c (grub_cmd_boot): moved here. All users updated
	* include/grub/kernel.h (grub_machine_fini): export
	* include/grub/loader.h (grub_loader_is_loaded): update declaration
	(grub_loader_set): likewise
	(grub_loader_unset): likewise
	(grub_loader_boot): likewise
	* conf/common.rmk: new module boot.mod
	(pkglib_MODULES): add boot.mod
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
	(grub_emu_SOURCES): likewise
	* conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise   
	* conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
2009-04-15 12:45:50 +00:00
phcoder
13c007813a 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Restore grub-emu

	* conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
	* conf/i386-coreboot.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
2009-04-15 12:32:08 +00:00
bean
d05f0df3eb 2009-04-14 Bean <bean123ch@gmail.com>
* Makefile.in (pkglib_DATA): Add handler.lst.
	(handler.lst): New rule.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* genhandlerlist.sh: New file.

	* genmk.rb: Add rules to generate handler.lst.

	* include/grub/normal.h (grub_file_getline): New function definition.
	(read_handler_list): Likewise.
	(free_handler_list): Likewise.

	* include/grub/term.h (grub_term_register_input): Add name parameter
	for auto generation of handler.lst.
	(grub_term_register_output): Likewise.

	* normal/handler.c: New file.

	* normal/main.c (get_line): Renamed to grub_file_getline.
	(read_config_file): Use the newly renamed grub_file_getline.
	(read_command_list): Likewise.
	(read_fs_list): Likewise.
	(grub_normal_execute): Call read_handler_list to parse handler.lst.
	(GRUB_MOD_FINI): Call free_handler_list to free handler list.

	* term/efi/console.c (grub_console_init): Add name parameter for auto
	generation of handler.lst.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/usb_keyboard.c: Likewise.
2009-04-14 18:12:14 +00:00
fzielcke
4484e01e46 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
* configure: Remove.
	* config.h.in: Likewise.
	* DISTLIST: Likewise.
	* conf/common.mk: Likewise.
	* conf/i386-coreboot.mk: Likewise.
	* conf/i386-efi.mk: Likewise.
	* conf/i386-ieee1275.mk: Likewise.
	* conf/i386.mk: Likewise.
	* conf/i386-pc.mk: Likewise.
	* conf/powerpc-ieee1275.mk: Likewise.
	* conf/sparc64-ieee1275.mk: Likewise.
	* conf/x86_64-efi.mk: Likewise.

	* INSTALL: Remove the sentence that Ruby and autoconf are only required if you
	develop on GRUB.
2009-04-14 16:11:26 +00:00
proski
1f1f580c2f 2009-04-13 Pavel Roskin <proski@gnu.org>
* conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
	Reported by John Stanley <jpsinthemix@verizon.net>
2009-04-14 01:54:06 +00:00
davem
96bd81ecf9 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
(grub_fstest_SOURCES): Likewise.
2009-04-13 20:35:59 +00:00
davem
e382e93a88 * genmk.rb: Add more flexible image type specification, also
pass --strip-unneeded to objcopy.
	* conf/i386-pc.rmk: Use *_FORMAT.
	* conf/i386-pc.mk: Rebuilt.
2009-04-13 06:37:50 +00:00
davem
0f005da92a Missed these in previous commits, sorry. 2009-04-11 08:33:35 +00:00
davem
a3f7515a6e * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
static libgcc.
	* configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
	* include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
	function, if present.
	(__bswapdi2): Likewise.
2009-04-11 08:24:49 +00:00
bean
e7e6862a4c 2009-04-10 Bean <bean123ch@gnail.com>
* include/grub/efi/api.h (grub_efi_configuration_table): Add packed
	attribute, otherwise the size would be wrong for i386 platform.

	* include/grub/pci.h (grub_pci_read_word): New inline function.
	(grub_pci_read_byte): Likewise.
	(grub_pci_write): Likewise.
	(grub_pci_write_word): Likewise.
	(grub_pci_write_byte): Likewise.

	* include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.

	* loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
	(find_framebuf): Scan pci to locate the frame buffer address.

	* commands/efi/fixvideo.c: New file.

	* commands/efi/loadbios.c: Likewise.

	* commands/memrw.c: Likewise.

	* util/grub-dumpbios.in: Likewise.

	* conf/common.rmk (grub-dumpbios): New utility.
	(pkglib_MODULES): New module memrw.mod.
	(memrw_mod_SOURCE): New macro.
	(memrw_mod_CFLAGS): Likewise.
	(memrw_mod_LDFLAGS): Likewise.

	* conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.

	* conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.
2009-04-10 15:33:34 +00:00
phcoder
ea761d4014 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
Parttool

	* parttool/pcpart.c: new file
	* commands/parttool.c: likewise
	* conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
	(parttool_mod_SOURCES): new variable
	(parttool_mod_CFLAGS): likewise
	(parttool_mod_LDFLAGS): likewise
	(pcpart_mod_SOURCES): likewise
	(pcpart_mod_CFLAGS): likewise
	(pcpart_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c 
	and parttool/pcpart.c
	* 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-ieee1275.rmk: likewise
2009-04-06 09:51:01 +00:00
phcoder
05aaebfb7b 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
Support for mtime and further expandability of dir command

	* include/grub/lib/datetime.h: moved to ...
	* include/grub/datetime.h: ... moved here and added 
	declaration of grub_unixtime2datetime. All users updated
	* include/grub/fs.h: new syntax for dir and mtime functionin 
	struct grub_fs 
	* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
	and GRUB_FSHELP_FLAGS_MASK
	* commands/ls.c (grub_ls_list_files): Write mtime in long format
	* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
	(grub_ext2_mtime): new function
	* fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
	(grub_hfsplus_mtime): new function
	* fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
	(GRUB_UFS_ATTR_FILE): likewise
	(GRUB_UFS_ATTR_LNK): likewise
	(struct grub_ufs_sblock): new fields mtime
	(grub_ufs_read_inode): new parameter to read inode to a separate buffer
	all users updated
	(grub_ufs_dir): mtime support
	(grub_ufs_mtime): new function
	* fs/affs.c (grub_affs_dir): use new dir syntax
	* fs/afs.c (grub_afs_dir): likewise
	* fs/cpio.c (grub_cpio_dir): likewise
	* fs/fat.c (grub_fat_find_dir): likewise
	* fs/hfs.c (grub_hfs_dir): likewise
	* fs/iso9660.c (grub_iso9660_dir): likewise
	* fs/jfs.c (grub_jfs_dir): likewise
	* fs/minix.c (grub_minix_dir): likewise
	* fs/ntfs.c (grub_ntfs_dir): likewise
	* fs/reiserfs.c (grub_reiserfs_dir): likewise
	* fs/sfs.c (grub_sfs_dir): likewise
	* fs/xfs.c (grub_xfs_dir): likewise
	* util/hostfs.c (grub_hostfs_dir): likewise
	* lib/datetime.c: moved to ...
	* normal/datetime.c: ... moved here
	(grub_unixtime2datetime): new function
	* kern/rescue.c (grub_rescue_print_files): use new dir syntax
	* normal/completition.c (iterate_dir): use new dir syntax
	* normal/misc.c (grub_normal_print_device_info): tell the 
	last modification time of a volume
	* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax 
	* conf/common.rmk: added lib/datetime.c to ls.mod
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c  
	(normal_mod_SOURCES): likewise
	(datetime_mod_SOURCES): Removed lib/datetime.c
	* 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
2009-04-05 20:19:05 +00:00
phcoder
04186a9ce2 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h 
	and command.h
	remove extraneous kernel_elf_HEADERS
2009-04-04 12:28:33 +00:00
okuji
6842cec424 Undo r2063. 2009-04-04 09:22:35 +00:00
bean
838c454296 2009-04-04 Bean <bean123ch@gnail.com>
* include/grub/efi/api.h (grub_efi_configuration_table): Add packed
	attribute, otherwise the size would be wrong for i386 platform.

	* include/grub/pci.h (grub_pci_read_word): New inline function.
	(grub_pci_read_byte): Likewise.
	(grub_pci_write): Likewise.
	(grub_pci_write_word): Likewise.
	(grub_pci_write_byte): Likewise.

	* include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.

	* loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
	(find_framebuf): Scan pci to locate the frame buffer address.

	* commands/efi/fixvideo.c: New file.

	* commands/efi/loadbios.c: Likewise.

	* commands/memrw.c: Likewise.

	* util/grub-dumpbios.in: Likewise.

	* conf/common.rmk (grub-dumpbios): New utility.
	(pkglib_MODULES): New module memrw.mod.
	(memrw_mod_SOURCE): New macro.
	(memrw_mod_CFLAGS): Likewise.
	(memrw_mod_LDFLAGS): Likewise.

	* conf/i386-efi.rmk (pkglig_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.

	* conf/x86_64.rmk (pkglig_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.
2009-04-04 08:08:01 +00:00
proski
3fcc20834c 2009-04-01 Pavel Roskin <proski@gnu.org>
* Makefile.in: Remove all references to MODULE_LDFLAGS, it's
	unused now.
	* genmk.rb: Likewise.
	* configure.ac: Likewise.
2009-04-01 16:17:20 +00:00
robertmh
a9368fd30c 2009-03-28 Robert Millan <rmh@aybabtu.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
        (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
        variables.  Use 16-bit loader.
        (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
        loader.
        * kern/i386/loader.S (grub_linux_boot): Rename to ...
        (grub_linux16_boot): ... this.  Update all users.
        * loader/i386/linux.c (grub_linux32_boot): Rename to ...
        (grub_linux_boot): ... this.  Update all users.

        * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
        (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
        commands to `linux16' and `initrd16'.
        (GRUB_MOD_FINI(linux)): Rename to ...
        (GRUB_MOD_FINI(linux16)): ... this.
2009-03-28 12:53:16 +00:00
proski
e4dd5a7ea9 2009-03-24 Pavel Roskin <proski@gnu.org>
* genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
	not just for compilation.
2009-03-24 14:01:23 +00:00
robertmh
c04d6e0548 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
Move multiboot helper out of kernel

        * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
        `loader/i386/multiboot_helper.S'.
        * conf/i386-coreboot.rmk: Likewise
        * conf/i386-ieee1275.rmk: Likewise

        * kern/i386/loader.S: Move multiboot helpers from here...
        * loader/i386/multiboot_helper.S: ...moved here
        * include/grub/i386/loader.h: Move declarations of multiboot
        helpers from here...
        * include/grub/i386/multiboot.h: ...moved here
        * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2009-03-22 12:28:00 +00:00
bean
b1b797cb1b 2009-03-21 Bean <bean123ch@gmail.com>
* commands/blocklist.c: Add include file <grub/command.h>, remove
	<grub/normal.h> and <grub/arg.h>.
	(grub_cmd_blocklist): Use the new command interface.
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* commands/boot.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/crc.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/halt.c: Likewise.
	* commands/handler.c: Likewise.
	* commands/hdparm.c: Likewise.
	* commands/help.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/lsmmap.c: Likewise.
	* commands/lspci.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/read.c: Likewise.
	* commands/reboot.c: Likewise.
	* commands/search.c: Likewise.
	* commands/sleep.c: Likewise.
	* commands/test.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/videotest.c: Likewise.
	* commands/i386/cpuid.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/pxecmd.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* disk/loopback.c: Likewise.
	* font/font_cmd.c: Likewise.
	* hello/hello.c: Likewise.
	* loader/efi/appleloader.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/terminfo.c: Likewise.

	* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
	* term/i386/pc/vga.c: Likewise.
	* video/readers/jpeg.c: Likewise.
	* video/readers/png.c: Likewise.
	* video/readers/tga.c: Likewise.

	* util/grub-fstest (cmd_loopback): Removed.
	(cmd_blocklist): Likewise.
	(cmd_ls): Likewise.
	(grub_register_command): Likewise.
	(grub_unregister_command): Likewise.
	(execute_command): Use grub_command_find to locate command and execute
	it.

	* include/grub/efi/chainloader.h: Removed.
	* loader/efi/chainloader_normal.c: Likewise.
	* loader/i386/bsd_normal.c: Likewise.
	* loader/i386/pc/chainloader_normal.c: Likewise.
	* loader/i386/pc/multiboot_normal.c: Likewise.
	* loader/linux_normal.c: Likewise.
	* loader/multiboot_loader_normal.c: Likewise.
	* loader/powerpc/ieee1275/linux_normal.c: Likewise.

	* gencmdlist.sh: Scan new registration command grub_register_extcmd
	and grub_register_command_p1.

	* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
	kern/command.c, lib/arg.c and commands/extcmd.c.
	(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
	(minicmd_mod_SOURCES): New variable.
	(minicmd_mod_CFLAGS): Likewise.
	(minicmd_mod_LDFLAGS): Likewise.
	(extcmd_mod_SOURCES): Likewise.
	(extcmd_mod_CFLAGS): Likewise.
	(extcmd_mod_LDFLAGS): Likewise.
	(boot_mod_SOURCES): Removed.
	(boot_mod_CFLAGS): Likewise.
	(boot_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
	kern/corecmd.c.
	(kernel_img_HEADERS): Add command.h.
	(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
	commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
	and lib/arg.c.
	(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
	_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
	remove the corresponding normal mode command.
	(normal_mod_SOURCES): Remove normal/arg.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/arg.h: Move from here ...
	* include/grub/lib/arg.h: ... to here.

	* normal/arg.c: Move from here ...
	* lib/arg.c: ... to here.

	* commands/extcmd.c: New file.
	* commands/minicmd.c: Likewise.
	* include/grub/command.h: Likewise.
	* include/grub/extcmd.h: Likewise.
	* kern/command.c: Likewise.
	* kern/corecmd.c: Likewise.

	* kern/list.c (grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(grub_prio_list_insert): Likewise.

	* kern/rescue.c (grub_rescue_command): Removed.
	(grub_rescue_command_list): Likewise.
	(grub_rescue_register_command): Likewise.
	(grub_rescue_unregister_command): Likewise.
	(grub_rescue_cmd_boot): Move to minicmd.c
	(grub_rescue_cmd_help): Likewise.
	(grub_rescue_cmd_info): Likewise.
	(grub_rescue_cmd_boot): Likewise.
	(grub_rescue_cmd_testload): Likewise.
	(grub_rescue_cmd_dump): Likewise.
	(grub_rescue_cmd_rmmod): Likewise.
	(grub_rescue_cmd_lsmod): Likewise.
	(grub_rescue_cmd_exit): Likewise.
	(grub_rescue_print_devices): Moved to corecmd.c.
	(grub_rescue_print_files): Likewise.
	(grub_rescue_cmd_ls): Likewise.
	(grub_rescue_cmd_insmod): Likewise.
	(grub_rescue_cmd_set): Likewise.
	(grub_rescue_cmd_unset): Likewise.
	(attemp_normal_mode): Use grub_command_find to get normal module.
	(grub_enter_rescue_mode): Use grub_register_core_commands to register
	commands, remove grub_rescue_regiter_command calls.

	* normal/command.c (grub_regiser_command): Removed.
	(grub_unregister_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(rescue_command): Likewise.
	(export_command): Moved to corecmd.c.
	(set_command): Removed.
	(unset_command): Likewise.
	(insmod_command): Likewise.
	(rmmod_command): Likewise.
	(lsmod_command): Likewise.
	(grub_command_init): Likewise.

	* normal/completion.c (iterate_command): Use cmd->prio to check for
	active command.
	(complete_arguments): Use grub_extcmd_t structure to find options.
	(grub_normal_do_completion): Change function grub_iterate_commands to
	grub_command_iterate.

	* normal/execute.c (grub_script_execute_cmd): No need to parse
	argument here.

	* normal/main.c (grub_dyncmd_dispatcher): New function.
	(read_command_list): Register unload commands as dyncmd.
	(grub_cmd_normal): Use new command interface, register rescue,
	unregister normal at entry, register normal, unregister rescue at exit.

	* include/grub/list.h (grub_list_test_t): New type.
	(grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(GRUB_AS_NAMED_LIST_P): New macro.
	(GRUB_AS_PRIO_LIST): Likewise.
	(GRUB_AS_PRIO_LIST_P): Likewise.
	(GRUB_PRIO_LIST_PRIO_MASK): New constant.
	(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
	(grub_prio_list): New structure.
	(grub_prio_list_insert): New function.
	(grub_prio_list_remove): New inline function.

	* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
	(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
	(GRUB_COMMAND_FLAG_MENU): Likewise.
	(GRUB_COMMAND_FLAG_BOTH): Likewise.
	(GRUB_COMMAND_FLAG_TITLE): Likewise.
	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
	(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
	(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
	(grub_command): Likewise.
	(grub_register_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(grub_command_init): Likewise.
	(grub_arg_parse): Likewise.
	(grub_arg_show_help): Likewise.

	* include/grub/rescue.h (grub_rescue_register_command): Removed.
	(grub_rescue_unregister_command): Likewise.

	* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
	grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
	grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.

	* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
	grub_rescue_cmd_initrd.
	* include/grub/i386/loader.h: Likewise.
	* include/grub/x86_64/loader.h: Likewise.

	* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
bean
1f4147aaf0 2009-03-21 Bean <bean123ch@gmail.com>
* util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
	instead of stat in mingw environment.

	* util/misc.c (grub_millisleep): Use Sleep in mingw environment.

	* aclocal.m4 (grub_CHECK_LINK_DIR): New function.

	* configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
	AC_CONFIG_LINKS.
2009-03-21 07:48:28 +00:00
robertmh
8cf83a279b 2009-03-14 Robert Millan <rmh@aybabtu.com>
Fix build on powerpc.
        * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2009-03-14 15:18:59 +00:00
fzielcke
b7b50e5f31 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and 
	`kern/handler.c'.
2009-03-11 08:25:22 +00:00
fzielcke
6377ef3a1d forgot to run ./autogen.sh 2009-03-09 09:50:50 +00:00
fzielcke
a83ea1d20a 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
	`fs/ext2.c'.
2009-03-09 09:02:52 +00:00
robertmh
9304eef146 2009-03-04 Robert Millan <rmh@aybabtu.com>
Filter /etc/grub.d/10_* so that only add-ons for native kernels are
        installed.

        * Makefile.in (host_kernel): New variable.
        * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
        scripts instead of just the windows one.
        * configure.ac: Initialize and AC_SUBST `host_kernel'.
2009-03-04 22:00:41 +00:00
fzielcke
2ba60b6286 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
	`kern/handler.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-03-04 14:08:05 +00:00
bean
71b9f36193 2009-03-01 Bean <bean123ch@gmail.com>
* commands/terminal.c: Removed.

	* commands/handler.c: New file.

	* include/grub/list.h: Likewise.

	* include/grub/handler.h: Likewise.

	* kern/list.c: Likewise.

	* kern/handler.c: Likewise.

	* kern/term.h: Include header file <grub/handler.h>.
	(grub_term_input): Move next field to the beginning.
	(grub_term_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_term_register_input): Changed to inline function.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.
	(grub_term_iterate_input): Removed.
	(grub_term_iterate_output): Likewise.

	* kern/term.c (grub_term_list_input): Removed.
	(grub_term_list_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_cur_term_input): Change varaible as macro.
	(grub_cur_term_output): Likewise.
	(grub_term_register_input): Removed.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_iterate_input): Likewise.
	(grub_term_iterate_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.

	* util/grub-editenv.c: Include header file <grub/handler.h>.
	(grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/grub-fstest.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/grub-probe.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_outout_class): Likewise.

	* conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
	(terminal_mod_SOURCES): Likewise.
	(terminal_mod_CFLAGS): Likewise.
	(terminal_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_img_SOURCES): Add list.c and handler.c.
	(kernel_img_HEADERS): Add list.h and handler.h.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.
2009-03-01 17:51:44 +00:00
robertmh
4b6bf4f97c 2009-02-27 Robert Millan <rmh@aybabtu.com>
* loader/i386/pc/multiboot.c: Move from here ...
        * loader/i386/multiboot.c: ... to here.  Update all users.
2009-02-27 21:19:00 +00:00
robertmh
6374daf387 2009-02-21 Robert Millan <rmh@aybabtu.com>
Implement USB keyboard support (based on patch by Marco Gerards)

        * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
        (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
        (usb_keyboard_mod_LDFLAGS): New variables.

        * term/usb_keyboard.c: New file.
2009-02-21 14:55:06 +00:00
chrfranke
9ff516f3eb 2009-02-14 Christian Franke <franke@computer.org>
* commands/hdparm.c: New file.  Provides `hdparm' command
	which sends ATA commands via grub_disk_ata_pass_through ().

	* conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.

	* disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
	and <grub/cpu/io.h> to include/grub/ata.h.
	(enum grub_ata_addressing_t): Move to include/grub/ata.h.
	(GRUB_CDROM_SECTOR_SIZE): Remove.
	(GRUB_ATA_*): Move to include/grub/ata.h.
	(GRUB_ATAPI_*): Likewise.
	(enum grub_ata_commands): Likewise.
	(enum grub_ata_timeout_milliseconds): Likewise.
	(struct grub_ata_device): Likewise.
	(grub_ata_regset): Likewise.
	(grub_ata_regget): Likewise.
	(grub_ata_regset2): Likewise.
	(grub_ata_regget2): Likewise.
	(grub_ata_check_ready): Likewise.
	(grub_ata_wait_not_busy): Remove static, exported in
	include/grub/ata.h.
	(grub_ata_wait_drq): Likewise.
	(grub_ata_pio_read): Likewise.

	* disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
	function for hdparm.mod.

	* include/grub/ata.h: New file, contains declarations from
	disk/ata.c.
	(enum grub_ata_commands): Add new commands for commands/hdparm.c.

	* include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
	(grub_disk_ata_pass_through): New exported variable.

	* kern/disk.c (grub_disk_ata_pass_through): New variable.
2009-02-14 12:57:55 +00:00
cbennett
772e23dad2 2009-02-13 Colin D Bennett <colin@gibibit.com>
Support multiple fallback entries, and provide an API to support
	executing default+fallback menu entries.  Renamed the `terminal' menu
	viewer to `text'.

	* include/grub/normal.h (grub_normal_text_menu_viewer): New global
	variable declaration.
	(grub_menu_execute_callback): New structure declaration.
	(grub_menu_execute_callback_t): New typedef.
	(grub_menu_execute_with_fallback): New function declaration.
	(grub_menu_get_entry): Likewise.
	(grub_menu_get_timeout): Likewise.
	(grub_menu_set_timeout): Likewise.

	* normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.

	* normal/menu.c (grub_wait_after_message): Moved to
	`normal/menu_text.c'.
	(draw_border): Likewise.
	(print_message): Likewise.
	(print_entry): Likewise.
	(print_entries): Likewise.
	(grub_menu_init_page): Likewise.
	(get_entry_number): Likewise.
	(print_timeout): Likewise.
	(run_menu): Likewise.
	(grub_menu_execute_entry): Likewise.
	(show_text_menu): Likewise.
	(get_and_remove_first_entry_number): New function.
	(grub_menu_execute_with_fallback): Likewise.
	(get_entry): Renamed to ...
	(grub_menu_get_entry): .. this and made it global.
	(get_timeout): Renamed to ...
	(grub_menu_get_timeout): ... this and made it global.
	(set_timeout): Renamed to ...
	(grub_menu_set_timeout): ... this and made it global.
	(grub_normal_terminal_menu_viewer): Renamed to ...
	(grub_normal_text_menu_viewer): ... this.

	* normal/menu_text.c: New file.  Extracted text-menu-specific code
	from normal/menu.c.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.
2009-02-13 20:06:27 +00:00
fzielcke
06ff20fcfe 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
* fs/fat.c (grub_fat_mount): Fix wrong comparison.

	Based on patch from Javier Martín.
2009-02-10 09:50:08 +00:00
fzielcke
96da94074c 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
* conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
	to avoid false posivites with FAT.
	(grub_fstest_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-02-09 18:00:36 +00:00
robertmh
56978920b1 2009-02-08 Robert Millan <rmh@aybabtu.com>
* Makefile.in (host_os, host_cpu): New variables.
        (target_os): Remove.  Update all users.
2009-02-08 19:59:32 +00:00
robertmh
d64399b562 2009-02-08 Marco Gerards <marco@gnu.org>
* Makefile.in (enable_grub_emu_usb): New variable.
        * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
        (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
        `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
        (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
        (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
        `usbtest.mod' and `usbms.mod'.
        (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
        (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
        (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
        (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
        (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
        variables.

        * disk/usbms.c: New file.

        * include/grub/usb.h: Likewise.

        * include/grub/usbtrans.h: Likewise.

        * include/grub/usbdesc.h: Likewise.

        * bus/usb/usbtrans.c: Likewise.

        * bus/usb/ohci.c: Likewise.

        * bus/usb/uhci.c: Likewise.

        * bus/usb/usbhub.c: Likewise.

        * bus/usb/usb.c: Likewise.

        * commands/usbtest.c: Likewise.

        * util/usb.c: Likewise.

        * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.

        * configure.ac: Test for libusb presence.

        * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2009-02-08 17:58:32 +00:00
robertmh
f821ce593a 2009-02-08 Robert Millan <rmh@aybabtu.com>
* fs/cpio.c: Split tar functionality to ...
        * fs/tar.c: ... here (new file).  Update all users.
2009-02-07 23:38:01 +00:00
robertmh
0bb5115e67 2009-02-07 Robert Millan <rmh@aybabtu.com>
* conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
        position of `disk/lvm.c\' to ensure grub_init_all() always picks it
        after the RAID stuff.
2009-02-07 20:55:48 +00:00
fzielcke
e507a2c14f 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
	`#'.
2009-02-03 13:34:52 +00:00
fzielcke
d2c2b4cdb9 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2009-02-03 13:22:26 +00:00
chaac
6fa42fa65a 2009-01-31 Colin D Bennett <colin@gibibit.com>
* normal/main.c: Add include to grub/menu_viewer.h. 
	(free_menu_entry_classes): Added.
	(grub_normal_menu_addentry): Added class property handling.
	(grub_normal_execute): Changed to use new menu viewer for menu viewing.
	(GRUB_MOD_INIT(normal)): Added register for text based menu viewer.

	* normal/menu_viewer.c: New file.

	* normal/menu.c (run_menu_entry): Renamed to ...
	(grub_menu_execute_entry): ... this and	made it as global.
	(grub_menu_run): Renamed to ...
	(show_text_menu): ... this and made it local.
	(show_text_menu): Adapt to new function names.
	(grub_normal_terminal_menu_viewer): New global variable.

	* include/grub/menu.h: New file.

	* include/grub/menu_viewer.h: New file.

	* include/grub/normal.h: Added include to grub/menu.h.
	(grub_menu_entry): Moved to include/grub/menu.h.
	(grub_menu_entry_t): Likewise.
	(grub_menu): Likewise.
	(grub_menu_t): Likewise.
	(grub_normal_terminal_menu_viewer): Added.
	(grub_menu_execute_entry): Likewise.
	(grub_menu_run): Removed.

	* DISTLIST: Added include/grub/menu.h.
	Added include/grub/menu_viewer.h.
	Added normal/menu_viewer.c.

2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>

	* normal/execute.c (grub_script_execute_menuentry): Changed to use
	arglist for menutitle arguments.

	* normal/main.c (grub_normal_menu_addentry): Likewise.

	* normal/parser.y (menuentry): Likewise.

	* normal/script.c (grub_script_create_cmdmenu): Likewise.

	* include/grub/script.h (grub_script_cmd_menuentry): Likewise.
	(grub_script_create_cmdmenu): Likewise.

	* include/grub/normal.h (grub_normal_menu_addentry): Likewise.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
	changes.

	* conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2009-01-31 09:15:43 +00:00